HTTP interface for administration
You can get information about ArangoDB servers, toggle the maintenance mode, shut down server nodes, and start actions like compaction
Information
Get the server version
details boolean
If set to
true
and if the user account you authenticate with has administrate access to the_system
database, the response contains adetails
attribute with additional information about included components and their versions. The attribute names and internals of thedetails
object may vary depending on platform and ArangoDB version.
Examples
Return the version information
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/version'
Return the version information with details
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/version?details=true'
Get the storage engine type
Examples
Return the active storage engine:
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/engine'
Get the system time
time
attribute. This contains the
current system time as a Unix timestamp with microsecond precision.Get server status information
200 OK
Status information was returned successfully.
serverInfo* object
Information about the server status.
progress* object
Startup and recovery information.
You can check for changes to determine whether progress was made between two calls, but you should not rely on specific values as they may change between ArangoDB versions. The values are only expected to change during the startup and shutdown, i.e. while
maintenance
istrue
.You need to start arangod with the
--server.early-connections
startup option enabled to be able to query the endpoint during the startup process. If authentication is enabled, then you need to use the super-user JWT for the request because the user management is not available during the startup.
Response Body application/json object
Examples
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_admin/status'
Return whether or not a server is available
Return availability information about a server.
This is a public API so it does not require authentication. It is meant to be used only in the context of server monitoring.
503 Service Unavailable
HTTP 503 will be returned in case the server is during startup or during shutdown, is set to read-only mode or is currently a follower in an Active Failover deployment setup.
In addition, HTTP 503 will be returned in case the fill grade of the scheduler queue exceeds the configured high-water mark (adjustable via startup option
--server.unavailability-queue-fill-grade
), which by default is set to 75 % of the maximum queue length.
Get the required database version (deprecated)
GET /_api/version
instead.Returns the database version that this server requires.
The version is returned in the version
attribute of the result.
Get information about the deployment
Retrieves deployment information for support purposes. The endpoint returns data about the ArangoDB version used, the host (operating system, server ID, CPU and storage capacity, current utilization, a few metrics) and the other servers in the deployment (in case of cluster deployments).
As this API may reveal sensitive data about the deployment, it can only be
accessed from inside the _system
database. In addition, there is a policy
control startup option --server.support-info-api
that controls if and to whom
the API is made available.
200 OK
deployment* object
An object with at least a
type
attribute, indicating the deployment mode.In case of a
"single"
server, additional information is provided in the top-levelhost
attribute.In case of a
"cluster"
, there is aservers
object that contains a nested object for each Coordinator and DB-Server, using the server ID as key. Each object holds information about the ArangoDB instance as well as the host machine. There are additional attributes for the number ofagents
,coordinators
,dbServers
, andshards
.
Response Body application/json object
Examples
Query support information from a single server
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_admin/support-info'
Query support information from a cluster
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_admin/support-info'
Server mode
Return whether or not a server is in read-only mode
Return mode information about a server. The json response will contain
a field mode
with the value readonly
or default
. In a read-only server
all write operations will fail with an error code of 1004
(ERROR_READ_ONLY).
Creating or dropping of databases and collections will also fail with error code 11
(ERROR_FORBIDDEN).
This API requires authentication.
Set the server mode to read-only or default
Update mode information about a server. The JSON response will contain
a field mode
with the value readonly
or default
. In a read-only server
all write operations will fail with an error code of 1004
(ERROR_READ_ONLY).
Creating or dropping of databases and collections will also fail with error
code 11
(ERROR_FORBIDDEN).
This is a protected API. It requires authentication and administrative server rights.
License
The endpoints for license management allow you to view the current license status and update the license of your ArangoDB Enterprise Edition deployment.
Get information about the current license
200 OK
Returns the license information.
status string
The
status
key allows you to confirm the state of the installed license on a glance. The possible values are as follows:good
: The license is valid for more than 2 weeks.expiring
: The license is valid for less than 2 weeks.expired
: The license has expired. In this situation, no new Enterprise Edition features can be utilized.read-only
: The license is expired over 2 weeks. The instance is now restricted to read-only mode.
Response Body application/json object
Examples
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_admin/license'
Set a new license
- The request body has to contain the Base64-encoded string wrapped in double quotes.
Examples
curl --header 'accept: application/json' --dump - --data '"eyJncmFudCI6...(Base64-encoded license string)..."' -X PUT http://localhost:8529/_admin/license
Shutdown
Start the shutdown sequence
soft boolean
Introduced in: v3.7.12, v3.8.1, v3.9.0
If set to
true
, this initiates a soft shutdown. This is only available on Coordinators. When issued, the Coordinator tracks a number of ongoing operations, waits until all have finished, and then shuts itself down normally. It will still accept new operations.This feature can be used to make restart operations of Coordinators less intrusive for clients. It is designed for setups with a load balancer in front of Coordinators. Remove the designated Coordinator from the load balancer before issuing the soft-shutdown. The remaining Coordinators will internally forward requests that need to be handled by the designated Coordinator. All other requests will be handled by the remaining Coordinators, reducing the designated Coordinator’s load.
The following types of operations are tracked:
- AQL cursors (in particular streaming cursors)
- Transactions (in particular stream transactions)
- Pregel runs (conducted by this Coordinator)
- Ongoing asynchronous requests (using the
x-arango-async: store
HTTP header) - Finished asynchronous requests, whose result has not yet been collected
- Queued low priority requests (most normal requests)
- Ongoing low priority requests
Query the soft shutdown progress
Introduced in: v3.7.12, v3.8.1, v3.9.0
This call reports progress about a soft Coordinator shutdown (see
documentation of DELETE /_admin/shutdown?soft=true
).
In this case, the following types of operations are tracked:
- AQL cursors (in particular streaming cursors)
- Transactions (in particular stream transactions)
- Pregel runs (conducted by this Coordinator)
- Ongoing asynchronous requests (using the
x-arango-async: store
HTTP header) - Finished asynchronous requests, whose result has not yet been collected
- Queued low priority requests (most normal requests)
- Ongoing low priority requests
This API is only available on Coordinators.
Miscellaneous actions
Compact all databases
This endpoint can be used to reclaim disk space after substantial data deletions have taken place, by compacting the entire database system data.
The endpoint requires superuser access.
Examples
curl -X PUT --header 'accept: application/json' --dump - 'http://localhost:8529/_admin/compact'
Reload the routing table
_routing
system collection if it
exists, and makes Foxx rebuild its local routing table on the next request.Echo a request
Execute a script
Executes the JavaScript code in the body on the server as the body
of a function with no arguments. If you have a return
statement
then the return value you produce will be returned as content type
application/json
. If the parameter returnAsJSON
is set to
true
, the result will be a JSON object describing the return value
directly, otherwise a string produced by JSON.stringify will be
returned.
Note that this API endpoint will only be present if the server was
started with the option --javascript.allow-admin-execute true
.
The default value of this option is false
, which disables the execution of
user-defined code and disables this API endpoint entirely.
This is also the recommended setting for production.
Endpoints
/_api/endpoint
endpoint is deprecated. For cluster deployments, you can
use /_api/cluster/endpoints
instead to find all current Coordinator endpoints.
See Cluster.An ArangoDB server can listen for incoming requests on multiple endpoints.
The endpoints are normally specified either in the arangod configuration
file or on the command-line, using the --server.endpoint
startup option.
The default endpoint for ArangoDB is tcp://127.0.0.1:8529
(IPv4 localhost on
port 8529 over the HTTP protocol).
Note that all endpoint management operations can only be accessed via
the default _system
database and none of the other databases.
List the endpoints of a single server (deprecated)
Returns an array of all configured endpoints the server is listening on.
The result is a JSON array of JSON objects, each with "entrypoint"
as
the only attribute, and with the value being a string describing the
endpoint.
Examples
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/endpoint'