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.
The response is a JSON object with an attribute “mode”. The “mode” can either be “readonly”, if the server is in read-only mode, or “default”, if it is not. Please note that the JSON object with “mode” is only returned in case the server does not respond with HTTP response code 503.
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 during startup and shutdown, and in case the server is set to read-only mode.
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 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'
Startup options
The permissions required to use the /_admin/options*
endpoints depends on the
setting of the --server.options-api
startup option.
Get the startup option configuration
Return the effective configuration of the queried arangod instance as set by startup options on the command-line and via a configuration file.
The endpoint can only be accessed via the _system
database.
In addition, the --server.options-api
startup option controls the
required privileges to access the option endpoints and allows you to
disable them entirely. The option can have the following values:
disabled
: the option endpoints are disabledjwt
: the option endpoints can only be accessed using a superuser JWT (default)admin
: the option endpoints can only be accessed by users with Administrate access level for the_system
databasepublic
: every user with access to the_system
database can access the option endpoints
Get the available startup options
Return the startup options available to configure the queried arangod
instance, similar to the --dump-options
startup option.
The endpoint can only be accessed via the _system
database.
In addition, the --server.options-api
startup option controls the
required privileges to access the option endpoints and allows you to
disable them entirely. The option can have the following values:
disabled
: the option endpoints are disabledjwt
: the option endpoints can only be accessed using a superuser JWT (default)admin
: the option endpoints can be accessed by admin users in the_system
database only.public
: every user with access to the_system
database can access the option endpoints.
200 OK
An object with startup option names as keys and sub-objects as values. The structure of each sub-object is as follows:
section
(string): The part before the dot of a startup option (--section.param
), or""
if it is a general option that doesn’t belong to a sectiondescription
(string): A succinct explanation of the startup optionlongDescription
(string, optional): Additional details about the startup option if availablecategory
(string): Either"option"
for regular options or"command"
if using the option performs an action and then terminates the processhidden
(boolean): Whether the option is uncommon. If yes, then the--help
command does not list it, but--help-all
lists every startup optiontype
(string): the data type of the option, typically one of"uint64"
,"uint32"
,"int64"
,"int32"
,"double"
,"boolean"
,"string"
,"string..."
experimental
(boolean): Whether the option relates to a feature that is not ready for production yetobsolete
(boolean): Whether the option has been deprecated and no effect anymoreenterpriseOnly
(boolean): Whether the option is only available in the Enterprise Edition. The Community Edition does have most of the Enterprise Edition startup options and they are thus not reportedrequiresValue
(boolean): Whether the option can be specified without a value to enable itos
(array of strings): The operating systems the startup option is supported on, always["linux"]
component
(array of strings): A list of server roles the startup option is available on. If it is supported by all cluster node types as well as the single server deployment mode, then the value is["coordinator", "dbserver", "agent", "single"]
introducedIn
(array of strings|null): A list of versions the startup option has been added in. Does not include later minor and major versions then the current version, and the information may get removed once all listed versions reach their end of lifedeprecatedIn
(array of strings|null): A list of versions the startup option has been marked for deprecation in. It can still be used until fully removed. Does not include later minor and major versions then the current version, and the information may get removed once all listed versions reach their end of lifevalues
(string, optional): A description of the possible values you can setdefault
(any, optional): The standard value if the option is not setdynamic
(boolean): Whether the default value is calculated based on the target host configuration, e.g. available memoryrequired
(boolean): Whether the option must be specifiedbase
(number, optional): the unit for a numeric optionminValue
(number, optional): The minimum value for a numeric optionmaxValue
(number, optional): The maximum value for a numeric optionminInclusive
(boolean, optional): Whether the minimum value is included in the allowed value rangemaxInclusive
(boolean, optional): Whether the maximum value is included in the allowed value range
Response Body application/json object
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)
- 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)
- 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'