ArangoDB v3.10 reached End of Life (EOL) and is no longer supported.
This documentation is outdated. Please see the most recent stable version.
API Changes in ArangoDB 3.8
A summary of the changes to the HTTP API and other interfaces that are relevant for developers, like maintainers of drivers and integrations for ArangoDB
HTTP RESTful API
Collection API
The following changes affect the behavior of the RESTful collection APIs at
endpoints starting with path /_api/collection/:
The collection properties indexBuckets, journalSize, doCompact and
isVolatile only had a meaning for the MMFiles storage engine, which is not
available anymore since ArangoDB 3.7.
ArangoDB 3.8 now removes any special handling for these obsolete collection properties, meaning these attributes will not be processed by the server and not be returned by any server APIs. Using these attributes in any API call will be ignored, and will not trigger any errors.
Client applications and tests that rely on the behavior that setting any of these obsolete properties produces an error on the server side may need to be adjusted now.
Www-Authenticate response header
ArangoDB 3.8 adds back the Www-Authenticate response header for HTTP server
responses with a status code of 401. Returning the Www-Authenticate header for
401 responses is required by the HTTP/1.1 specification and was also advertised
functionality in the ArangoDB documentation, but wasn’t happening in practice.
Now the functionality of returning Www-Authenticate response headers for HTTP
401 responses is restored, along with the already advertised functionality of
suppressing this header in case the client sends an X-Omit-Www-Authenticate
header with the request.
This change should not have any impact for client applications that use ArangoDB as a database only. It may have an effect for Foxx applications that use HTTP 401 status code responses and that will now see this extra header getting returned.
Endpoint return value changes
The endpoint
/_api/replication/clusterInventoryreturns, among other things, an array of the existing collections. Each collection has aplanVersionattribute, which in ArangoDB 3.8 is now hard-coded to the value of 1.Before 3.7, the most recent Plan version from the agency was returned inside
planVersionfor each collection. In 3.7, the attribute contained the Plan version that was in use when the in-memory LogicalCollection object was last constructed. The object was always reconstructed in case the underlying Plan data for the collection changed, or when a collection contained links to ArangoSearch Views. This made the attribute relatively useless for any real-world use cases, and so we are now hard-coding it to simplify the internal code. Using the attribute in client applications is also deprecated.The endpoint
/_api/transactionpreviously would allow users to list, query, commit, and abort transactions operating in any database as long as the user had sufficient permissions. Now the endpoint will restrict operations to transactions within the current database.The HTTP API for starting a Pregel run
/_api/control-pregelnow returns the Pregel execution number as a stringified execution number, e.g. “12345” instead of 12345. This is not downwards-compatible, so all client applications that depend on the return value being a numeric value need to be adjusted to handle a string return value and convert that string into a number.Changed the encoding of revision IDs returned by the below listed REST APIs.
Introduced in: v3.8.8
GET /_api/collection/<collection-name>/revision: The revision ID was previously returned as numeric value, and now it is returned as a string value with either numeric encoding or HLC-encoding inside.GET /_api/collection/<collection-name>/checksum: The revision ID in therevisionattribute was previously encoded as a numeric value in single server, and as a string in cluster. This is now unified so that therevisionattribute always contains a string value with either numeric encoding or HLC-encoding inside.
Endpoints added
The cursor API endpoint
PUT /_api/cursor/<cursor-id>to retrieve more data from an existing AQL query cursor is now also available underPOST /_api/cursor/<cursor-id>.The new POST API is a drop-in replacement for the existing PUT API and functionally equivalent to it. The benefit of using the POST API is that HTTP POST requests will not be considered as idempotent, so proxies may not retry them if they fail. This was the case with the existing PUT API, as HTTP PUT requests can be considered idempotent according to the HTTP specification .
The POST API is not yet used by ArangoDB 3.8, including the web UI and the client tools. This is to ensure the compatibility of 3.8 with earlier versions, which may be in use during upgrade to 3.8, or with one of the 3.8 client tools. The PUT API will remain fully functional in this version of ArangoDB and the next. The following version of ArangoDB will switch to using the POST variant instead of the PUT for its own requests, including web UI and client tools. Driver maintainers should eventually move to the POST variant of the cursor API as well. This is safe for drivers targeting 3.8 or higher.
The new REST endpoint at GET
/_admin/log/entriescan be used to retrieve server log messages in a more intuitive format than the already existing API at GET/_admin/log.The new API returns all matching log messages in an array, with one array entry per log message. Each log message is returned as an object containing the properties of the log message:
{ "total" : 13, "messages": [ { "id" : 12, "topic" : "general", "level" : "INFO", "date" : "2021-02-07T01:00:21Z", "message" : "[cf3f4] {general} ArangoDB (version 3.8.0-devel enterprise [linux]) is ready for business. Have fun!" }, { "id" : 11, "topic" : "general", "level" : "INFO", "date" : "2021-02-07T01:00:21Z", "message" : "[99d80] {general} You are using a milestone/alpha/beta/preview version ('3.8.0-devel') of ArangoDB" } ] }The previous API returned an object with 5 attributes at the top-level instead, which contained arrays with the attribute values of all log messages:
{ "totalAmount" : 13, "lid" : [ 12, 11 ], "topic" : [ "general", "general" ], "level" : [ 3, 3 ], "timestamp" : [ 1612659621, 1612659621 ], "text" : [ "[cf3f4] {general} ArangoDB (version 3.8.0-devel enterprise [linux]) is ready for business. Have fun!", "[99d80] {general} You are using a milestone/alpha/beta/preview version ('3.8.0-devel') of ArangoDB" ] }The old API endpoint GET
/_admin/logfor retrieving log messages is now deprecated, although it will stay available for some time.Added endpoint for new version “v2” of the metrics API:
GET /_admin/metrics/v2will return Prometheus-format of the server metrics.The old endpoint
GET /_admin/metricsis still supported but is considered to be obsolete from 3.8 on and will be removed in a future version. Also see Features and Improvements in 3.8.In the new API V2, there are quite a lot more metrics than in previous versions and a lot have been renamed to follow Prometheus conventions. Below is a list of renamed metrics:
/_admin/metrics/_admin/metrics/v2arangodb_agency_cache_callback_countarangodb_agency_cache_callback_numberarangodb_agency_callback_countarangodb_agency_callback_numberarangodb_agency_callback_registeredarangodb_agency_callback_registered_totalarangodb_agency_read_no_leaderarangodb_agency_read_no_leader_totalarangodb_agency_read_okarangodb_agency_read_ok_totalarangodb_agency_supervision_accum_runtime_msecarangodb_agency_supervision_accum_runtime_msec_totalarangodb_agency_supervision_accum_runtime_wait_for_replication_msecarangodb_agency_supervision_accum_runtime_wait_for_replication_msec_totalarangodb_agency_supervision_failed_server_countarangodb_agency_supervision_failed_server_totalarangodb_agency_write_no_leaderarangodb_agency_write_no_leader_totalarangodb_agency_write_okarangodb_agency_write_ok_totalarangodb_aql_all_queryarangodb_aql_all_query_totalarangodb_aql_slow_queryarangodb_aql_slow_query_totalarangodb_aql_total_query_time_msecarangodb_aql_total_query_time_msec_totalarangodb_collection_lock_acquisition_microsarangodb_collection_lock_acquisition_micros_totalarangodb_collection_lock_sequential_modearangodb_collection_lock_sequential_mode_totalarangodb_collection_lock_timeouts_exclusivearangodb_collection_lock_timeouts_exclusive_totalarangodb_collection_lock_timeouts_writearangodb_collection_lock_timeouts_write_totalarangodb_collection_truncatesarangodb_collection_truncates_totalarangodb_collection_truncates_replicationarangodb_collection_truncates_replication_totalarangodb_connection_connections_currentarangodb_connection_pool_connections_currentarangodb_connection_leases_successfularangodb_connection_pool_leases_successful_totalarangodb_connection_pool_connections_createdarangodb_connection_pool_connections_created_totalarangodb_connection_pool_leases_failedarangodb_connection_pool_leases_failed_totalarangodb_document_writesarangodb_document_writes_totalarangodb_document_writes_replicationarangodb_document_writes_replication_totalarangodb_dropped_followers_countarangodb_dropped_followers_totalarangodb_heartbeat_failuresarangodb_heartbeat_failures_totalarangodb_http_request_statistics_async_requestsarangodb_http_request_statistics_async_requests_totalarangodb_http_request_statistics_http_delete_requestsarangodb_http_request_statistics_http_delete_requests_totalarangodb_http_request_statistics_http_get_requestsarangodb_http_request_statistics_http_get_requests_totalarangodb_http_request_statistics_http_head_requestsarangodb_http_request_statistics_http_head_requests_totalarangodb_http_request_statistics_http_options_requestsarangodb_http_request_statistics_http_options_requests_totalarangodb_http_request_statistics_http_patch_requestsarangodb_http_request_statistics_http_patch_requests_totalarangodb_http_request_statistics_http_post_requestsarangodb_http_request_statistics_http_post_requests_totalarangodb_http_request_statistics_http_put_requestsarangodb_http_request_statistics_http_put_requests_totalarangodb_http_request_statistics_other_http_requestsarangodb_http_request_statistics_other_http_requests_totalarangodb_http_request_statistics_superuser_requestsarangodb_http_request_statistics_superuser_requests_totalarangodb_http_request_statistics_total_requestsarangodb_http_request_statistics_total_requests_totalarangodb_http_request_statistics_user_requestsarangodb_http_request_statistics_user_requests_totalarangodb_intermediate_commitsarangodb_intermediate_commits_totalarangodb_load_current_accum_runtime_msecarangodb_load_current_accum_runtime_msec_totalarangodb_load_plan_accum_runtime_msecarangodb_load_plan_accum_runtime_msec_totalarangodb_maintenance_action_accum_queue_time_msecarangodb_maintenance_action_accum_queue_time_msec_totalarangodb_maintenance_action_accum_runtime_msecarangodb_maintenance_action_accum_runtime_msec_totalarangodb_maintenance_action_done_counterarangodb_maintenance_action_done_totalarangodb_maintenance_action_duplicate_counterarangodb_maintenance_action_duplicate_totalarangodb_maintenance_action_failure_counterarangodb_maintenance_action_failure_totalarangodb_maintenance_action_registered_counterarangodb_maintenance_action_registered_totalarangodb_maintenance_agency_sync_accum_runtime_msecarangodb_maintenance_agency_sync_accum_runtime_msec_totalarangodb_maintenance_phase1_accum_runtime_msecarangodb_maintenance_phase1_accum_runtime_msec_totalarangodb_maintenance_phase2_accum_runtime_msecarangodb_maintenance_phase2_accum_runtime_msec_totalarangodb_network_forwarded_requestsarangodb_network_forwarded_requests_totalarangodb_network_request_timeoutsarangodb_network_request_timeouts_totalarangodb_process_statistics_major_page_faultsarangodb_process_statistics_major_page_faults_totalarangodb_process_statistics_minor_page_faultsarangodb_process_statistics_minor_page_faults_totalarangodb_refused_followers_countarangodb_refused_followers_totalarangodb_replication_cluster_inventory_requestsarangodb_replication_cluster_inventory_requests_totalarangodb_replication_dump_apply_timearangodb_replication_dump_apply_time_totalarangodb_replication_dump_bytes_receivedarangodb_replication_dump_bytes_received_totalarangodb_replication_dump_documentsarangodb_replication_dump_documents_totalarangodb_replication_dump_requestsarangodb_replication_dump_requests_totalarangodb_replication_dump_request_timearangodb_replication_dump_request_time_totalarangodb_replication_failed_connectsarangodb_replication_failed_connects_totalarangodb_replication_initial_chunks_requests_timearangodb_replication_initial_chunks_requests_time_totalarangodb_replication_initial_docs_requests_timearangodb_replication_initial_docs_requests_time_totalarangodb_replication_initial_insert_apply_timearangodb_replication_initial_insert_apply_time_totalarangodb_replication_initial_keys_requests_timearangodb_replication_initial_keys_requests_time_totalarangodb_replication_initial_lookup_timearangodb_replication_initial_lookup_time_totalarangodb_replication_initial_remove_apply_timearangodb_replication_initial_remove_apply_time_totalarangodb_replication_initial_sync_bytes_receivedarangodb_replication_initial_sync_bytes_received_totalarangodb_replication_initial_sync_docs_insertedarangodb_replication_initial_sync_docs_inserted_totalarangodb_replication_initial_sync_docs_removedarangodb_replication_initial_sync_docs_removed_totalarangodb_replication_initial_sync_docs_requestedarangodb_replication_initial_sync_docs_requested_totalarangodb_replication_initial_sync_docs_requestsarangodb_replication_initial_sync_docs_requests_totalarangodb_replication_initial_sync_keys_requestsarangodb_replication_initial_sync_keys_requests_totalarangodb_replication_synchronous_requests_total_numberarangodb_replication_synchronous_requests_total_number_totalarangodb_replication_synchronous_requests_total_timearangodb_replication_synchronous_requests_total_time_totalarangodb_replication_tailing_apply_timearangodb_replication_tailing_apply_time_totalarangodb_replication_tailing_bytes_receivedarangodb_replication_tailing_bytes_received_totalarangodb_replication_tailing_documentsarangodb_replication_tailing_documents_totalarangodb_replication_tailing_follow_tick_failuresarangodb_replication_tailing_follow_tick_failures_totalarangodb_replication_tailing_markersarangodb_replication_tailing_markers_totalarangodb_replication_tailing_removalsarangodb_replication_tailing_removals_totalarangodb_replication_tailing_requestsarangodb_replication_tailing_requests_totalarangodb_replication_tailing_request_timearangodb_replication_tailing_request_time_totalarangodb_scheduler_queue_full_failuresarangodb_scheduler_queue_full_failures_totalarangodb_scheduler_threads_startedarangodb_scheduler_threads_started_totalarangodb_scheduler_threads_stoppedarangodb_scheduler_threads_stopped_totalarangodb_server_statistics_server_uptimearangodb_server_statistics_server_uptime_totalarangodb_shards_leader_countarangodb_shards_leader_numberarangodb_shards_total_countarangodb_shards_numberarangodb_sync_wrong_checksumarangodb_sync_wrong_checksum_totalarangodb_transactions_abortedarangodb_transactions_aborted_totalarangodb_transactions_committedarangodb_transactions_committed_totalarangodb_transactions_expiredarangodb_transactions_expired_totalarangodb_transactions_startedarangodb_transactions_started_totalarangodb_v8_context_createdarangodb_v8_context_created_totalarangodb_v8_context_creation_time_msecarangodb_v8_context_creation_time_msec_totalarangodb_v8_context_destroyedarangodb_v8_context_destroyed_totalarangodb_v8_context_enteredarangodb_v8_context_entered_totalarangodb_v8_context_enter_failuresarangodb_v8_context_enter_failures_totalarangodb_v8_context_exitedarangodb_v8_context_exited_totalrocksdbengine_throttle_bpsrocksdb_engine_throttle_bpsrocksdb_write_stallsarangodb_rocksdb_write_stalls_totalrocksdb_write_stopsarangodb_rocksdb_write_stops_total
Endpoints augmented
The REST endpoint at GET
/_api/engine/statsnow returns useful information in cluster setups too. Previously calling this API on a Coordinator always produced an empty JSON object result, whereas now it will produce a JSON object with one key per DB-Server. The mapped value per DB-Server are the engine statistics for this particular server.The return value structure is different to the return value structure in single server, where the return value is a simple JSON object with the statistics at the top level.
The REST endpoint for creating indexes, POST
/_api/index, can now handle the attributeestimates, which determines if the to-be-created index should maintain selectivity estimates or not. If not specified, the default value for this attribute istruefor indexes of type “persistent”, so that selectivity estimates are maintained. They can be optionally turned off by setting the attribute tofalse. Turning off selectivity estimates can have a slightly positive effect on write performance. The attribute will only be picked up for indexes of type “persistent”, “hash” and “skiplist” (where the latter two are aliases for “persistent” nowadays).The REST endpoint at GET
/_api/collection/<collection>/checksumnow also works in cluster setups. In previous versions, this endpoint was not supported in cluster setups and returned HTTP 501 (Not implemented).The HTTP REST API endpoint
POST /_api/cursorcan now handle an additional sub-attributefillBlockCachefor itsoptionsattribute.fillBlockCachecontrols whether the to-be-executed query should populate the RocksDB block cache with the data read by the query. This is an optional attribute, and its default value istrue, meaning that the block cache will be populated (introduced in v3.8.1).The metrics endpoints include the following new traffic accounting metrics:
Introduced in: v3.8.9
arangodb_client_user_connection_statistics_bytes_receivedarangodb_client_user_connection_statistics_bytes_sentarangodb_http1_connections_total
Endpoints deprecated
The API endpoints /_admin/statistics and /_admin/statistics-description are
now deprecated in favor of the new metrics API endpoint /_admin/metrics/v2.
The metrics endpoint provides a lot more information than the statistics
endpoints, and will also be augmented with more metrics in the future.
The statistics endpoints will still be functional in 3.8, but will eventually
be removed in a future version of ArangoDB.
The REST API endpoint /_api/export is also deprecated in ArangoDB 3.8. This
endpoint was previously only present in single server, but never supported in
cluster deployments. The purpose of the endpoint was to provide the full data
of a collection without holding collection locks for a long time, which was
useful for the MMFile storage engine with its collection-level locks. If the
functionality provided by this endpoint is still required by client
applications, running a streaming AQL query to export the collection data can
be used as a substitution.
Endpoints removed
The API endpoint /_admin/repair/distributeShardsLike for repairing the
distributeShardsLike settings of cluster collections introduced before
version 3.2.12 or 3.3.4 respectively, is now deprecated and removed from
documentation.
There should not be any reasons to use this API with 3.8 or higher, and there was never any driver or official script support for it. The endpoint will be removed in ArangoDB 3.9.
JavaScript API
- The JavaScript API for starting a Pregel run
/_api/control-pregelnow returns the Pregel execution number as a stringified execution number, e.g. “12345” instead of 12345. This is not downwards-compatible. Foxx services, arangosh scripts etc. that depend on the return value being a numeric value may need to be adjusted to handle a string return value and convert that string into a number.
ArangoDB Server Environment Variables
The new environment variable TZ_DATA can be used to specify the path to the
directory containing the timezone information database for ArangoDB.
That directory is normally named tzdata and is shipped with ArangoDB releases.
It is normally not required to set this environment variable, but it may be
necessary in unusual setups with non-conventional directory layouts and paths.

