Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions site/content/3.11/develop/http-api/administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ paths:
# Technically accepts all of the following methods: HEAD, GET, POST, PATCH, PUT, DELETE
operationId: getVersion
description: |
Returns the server name and version number. The response is a JSON object
with the following attributes:
Returns the server name and version number.
parameters:
- name: database-name
in: path
Expand Down Expand Up @@ -246,7 +245,6 @@ paths:
operationId: getEngine
description: |
Returns the storage engine the server is configured to use.
The response is a JSON object with the following attributes:
parameters:
- name: database-name
in: path
Expand Down Expand Up @@ -329,12 +327,14 @@ paths:
properties:
error:
description: |
boolean flag to indicate whether an error occurred (`false` in this case)
A flag indicating that no error occurred.
type: boolean
example: false
code:
description: |
the HTTP status code
The HTTP response status code.
type: integer
example: 200
time:
description: |
The current system time as a Unix timestamp with microsecond precision of the server
Expand Down Expand Up @@ -959,7 +959,7 @@ paths:
in: query
required: false
description: |
Set to `true` to change the license even if it expires sooner than the current one.
Whether to change the license even if it expires sooner than the current one.
schema:
type: boolean
default: false
Expand All @@ -968,7 +968,7 @@ paths:
application/json:
schema:
description: |
The request body has to contain the Base64-encoded string wrapped in double quotes.
The request body has to contain the Base64-encoded license string wrapped in double quotes.
type: string
example: eyJncmFudCI6...(Base64-encoded license string)...
responses:
Expand All @@ -995,7 +995,7 @@ paths:
example: false
code:
description: |
The HTTP status code.
The HTTP response status code.
type: integer
example: 201
'400':
Expand All @@ -1019,12 +1019,12 @@ paths:
example: true
code:
description: |
The HTTP status code.
The HTTP response status code.
type: integer
example: 400
errorNum:
description: |
The ArangoDB error number.
The ArangoDB error number for the error that occurred.
type: integer
errorMessage:
description: |
Expand All @@ -1050,12 +1050,12 @@ paths:
example: true
code:
description: |
The HTTP status code.
The HTTP response status code.
type: integer
example: 501
errorNum:
description: |
The ArangoDB error number.
The ArangoDB error number for the error that occurred.
type: integer
errorMessage:
description: |
Expand Down
32 changes: 20 additions & 12 deletions site/content/3.11/develop/http-api/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ If you use a tool like cURL, you can manually specify this header as follows:
curl -H 'Authorization: Basic dXNlcjpwYXNz' ...
```

However, cURL can also take care of the authentication for you:
However, cURL can also take care of the authentication and specifically the
encoding of the credentials for you:

```
curl -u user:pass ...
Expand All @@ -114,19 +115,19 @@ For more information on JWT please consult RFC7519 and [jwt.io](https://jwt.io).

### JWT user tokens

To authenticate with a specific user you need to supply a JWT token containing
the `preferred_username` field with the username.
To authenticate with a specific user account, you need to supply a JWT token
containing the `preferred_username` field with the username.
You can either let ArangoDB generate this token for you via an API call
or you can generate it yourself (only if you know the JWT secret).

ArangoDB offers a RESTful API to generate user tokens for you if you know the
username and password. To do so send a POST request to:
username and password. To do so, send a POST request to this endpoint:

```
/_open/auth
```

… containing `username` and `password` JSON-encoded like so:
The request body needs to contain the `username` and `password` JSON-encoded like so:

```json
{
Expand Down Expand Up @@ -203,7 +204,8 @@ paths:
type: string
responses:
'200':
description: ''
description: |
Successfully created a session token.
content:
application/json:
schema:
Expand Down Expand Up @@ -304,7 +306,8 @@ paths:
type: string
responses:
'200':
description: ''
description: |
Successfully retrieved the JWT secret information.
content:
application/json:
schema:
Expand All @@ -318,12 +321,14 @@ paths:
properties:
error:
description: |
boolean flag to indicate whether an error occurred (`false` in this case)
A flag indicating that no error occurred.
type: boolean
example: false
code:
description: |
the HTTP status code - 200 in this case
The HTTP response status code.
type: integer
example: 200
result:
description: |
The result object.
Expand Down Expand Up @@ -370,7 +375,8 @@ paths:
will be _HTTP 403 Forbidden_.
responses:
'200':
description: ''
description: |
Successfully reloaded the JWT secrets.
content:
application/json:
schema:
Expand All @@ -384,12 +390,14 @@ paths:
properties:
error:
description: |
boolean flag to indicate whether an error occurred (`false` in this case)
A flag indicating that no error occurred.
type: boolean
example: false
code:
description: |
the HTTP status code - 200 in this case
The HTTP response status code.
type: integer
example: 200
result:
description: |
The result object.
Expand Down
47 changes: 30 additions & 17 deletions site/content/3.11/develop/http-api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@ paths:
properties:
error:
description: |
boolean flag to indicate whether an error occurred (`true` in this case)
A flag indicating that an error occurred.
type: boolean
example: true
code:
description: |
the HTTP status code - 200
The HTTP response status code.
type: integer
example: 200
endpoints:
description: |
A list of active cluster endpoints.
Expand Down Expand Up @@ -196,15 +198,17 @@ paths:
properties:
error:
description: |
always `false`
A flag indicating that no error occurred.
type: boolean
example: false
code:
description: |
the HTTP status code, always 200
The HTTP response status code.
type: integer
example: 200
errorNum:
description: |
the server error number
The ArangoDB error number for the error that occurred.
type: integer
role:
description: |
Expand Down Expand Up @@ -302,12 +306,14 @@ paths:
properties:
error:
description: |
Whether an error occurred. `false` in this case.
A flag indicating that no error occurred.
type: boolean
example: false
code:
description: |
The status code. `200` in this case.
The HTTP response status code.
type: integer
example: 200
result:
description: |
The result object with the status. This attribute is omitted if the DB-Server
Expand Down Expand Up @@ -395,8 +401,9 @@ paths:
properties:
error:
description: |
Whether an error occurred. `false` in this case.
A flag indicating that no error occurred.
type: boolean
example: false
code:
description: |
The status code. `200` in this case.
Expand Down Expand Up @@ -659,12 +666,14 @@ paths:
properties:
code:
description: |
The status code.
type: number
The HTTP response status code.
type: integer
example: 200
error:
description: |
Whether an error occurred. `false` in this case.
A flag indicating that no error occurred.
type: boolean
example: false
result:
description: |
The result object.
Expand Down Expand Up @@ -866,12 +875,14 @@ paths:
properties:
code:
description: |
The status code.
type: number
The HTTP response status code.
type: integer
example: 200
error:
description: |
Whether an error occurred. `false` in this case.
A flag indicating that no error occurred.
type: boolean
example: false
result:
description: |
The result object.
Expand Down Expand Up @@ -1283,12 +1294,14 @@ paths:
properties:
code:
description: |
The status code.
type: number
The HTTP response status code.
type: integer
example: 200
error:
description: |
Whether an error occurred. `false` in this case.
A flag indicating that no error occurred.
type: boolean
example: false
result:
description: |
The result object.
Expand Down
Loading