HTTP Interface for Endpoints
The ArangoDB server can listen for incoming requests on multiple endpoints.
The endpoints are normally specified either in ArangoDB's configuration file or on the command-line, using the "--server.endpoint" option. The default endpoint for ArangoDB is tcp://127.0.0.1:8529 or tcp://localhost:8529.
The number of endpoints can also be changed at runtime using the API described below. Each endpoint can optionally be restricted to a specific list of databases only, thus allowing the usage of different port numbers for different databases.
This may be useful in multi-tenant setups. A multi-endpoint setup may also be useful to turn on encrypted communication for just specific databases.
The HTTP interface provides operations to add new endpoints at runtime, and optionally restrict them for use with specific databases. The interface also can be used to update existing endpoints or remove them at runtime.
Please note that all endpoint management operations can only be accessed via the default database (_system) and none of the other databases.
Managing Endpoints via HTTP
Return list of all endpoints
returns a list of all endpoints
GET /_api/endpoint
Returns an array of all configured endpoints the server is listening on. For each endpoint, the array of allowed databases is returned too if set.
The result is a JSON object which has the endpoints as keys, and an array of mapped database names as values for each endpoint.
If an array of mapped databases is empty, it means that all databases can be accessed via the endpoint. If an array of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the arry will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly.
Note: retrieving the array of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error.
Example:
shell> curl --dump - http://localhost:8529/_api/endpoint
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
{
"endpoint" : "http://127.0.0.1:55269"
}
]
Return Codes
- 200: is returned when the array of endpoints can be determined successfully.
- 400: is returned if the action is not carried out in the system database.
- 405: The server will respond with HTTP 405 if an unsupported HTTP method is used.
Examples
shell> curl --dump - http://localhost:8529/_api/endpoint
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
{
"endpoint" : "http://127.0.0.1:55269"
}
]