ArangoDB v3.13 is under development and not released yet. This documentation is not final and potentially incomplete.

HTTP interface for named graphs

The HTTP API for named graphs lets you manage General Graphs, SmartGraphs, EnterpriseGraphs, and SatelliteGraphs

The HTTP API for named graphs is called Gharial.

You can manage all types of ArangoDB’s named graphs with Gharial:

The examples use the following example graphs:

Social Graph:

Social Example Graph

Knows Graph:

Social Example Graph

Management

List all graphs

GET /_db/{database-name}/_api/gharial
Lists all graphs stored in this database.
Path Parameters
  • The name of the database.

Query Parameters
    HTTP Headers
      Responses
      • Is returned if the module is available and the graphs can be listed.

          Response Body application/json object
        • The HTTP response status code.

        • A flag indicating that no error occurred.

        • A list of all named graphs.

          • The properties of the named graph.

            • The internal id value of this graph.

            • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

            • An array of definitions for the relations of the graph. Each has the following type:

              • Name of the edge collection, where the edges are stored in.

              • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

              • List of node collection names.

                Edges in collection can only be inserted if their _to is in any of the collections here.

            • Whether the graph is a Disjoint SmartGraph.

            • Whether the graph is a SatelliteGraph.

            • Whether the graph is a SmartGraph.

            • The name of the graph.

            • Number of shards created for every new collection in the graph.

            • An array of additional node collections. Documents in these collections do not have edges within this graph.

            • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

              Default: The replicationFactor defined by the database.

            • Name of the sharding attribute in the SmartGraph case.

            • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

      Examples

      curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial
      Show output

      Create a graph

      POST /_db/{database-name}/_api/gharial
      The creation of a graph requires the name of the graph and a definition of its edges.
      Path Parameters
      • The name of the database.

      Query Parameters
      • Define if the request should wait until everything is synced to disk. Changes the success HTTP response status code.

      HTTP Headers
        Request Body application/json object
        • An array of definitions for the relations of the graph. Each has the following type:

          • Name of the edge collection, where the edges are stored in.

          • A list of node collection names. Edges you later insert into collection can only reference vertices from these collections in their _from attribute (if you use the interface for named graphs).

          • A list of node collection names. Edges you later insert into collection can only reference vertices from these collections in their _to attribute (if you use the interface for named graphs).

        • Whether to create a Disjoint SmartGraph instead of a regular SmartGraph.

        • Define if the created graph should be smart.

        • Name of the graph.

        • Options for creating collections within this graph. It can contain the following attributes:

          • The number of shards that is used for every collection within this graph. Cannot be modified later.

          • The replication factor used when initially creating collections for this graph. Can be set to "satellite" to create a SatelliteGraph, which then ignores numberOfShards, minReplicationFactor, and writeConcern.

            Default: The replicationFactor defined by the database.

          • An array of collection names that is used to create SatelliteCollections for a (Disjoint) SmartGraph using SatelliteCollections. Each array element must be a string and a valid collection name. The collection type cannot be modified later.

          • Required to create a SmartGraph.

            The attribute name that is used to smartly shard the nodes of a graph. Every node in this SmartGraph has to have this attribute. Cannot be modified later.

          • Write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

        • An array of additional node collections. Documents in these collections do not have edges within this graph.

        Responses
        • Is returned if the graph can be created and waitForSync is enabled for the _graphs collection, or given in the request. The response body contains the graph configuration that has been stored.

            Response Body application/json object
          • The HTTP response status code.

          • A flag indicating that no error occurred.

          • The information about the newly created graph.

            • The internal id value of this graph.

            • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

            • An array of definitions for the relations of the graph. Each has the following type:

              • Name of the edge collection, where the edges are stored in.

              • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

              • List of node collection names.

                Edges in collection can only be inserted if their _to is in any of the collections here.

            • Whether the graph is a Disjoint SmartGraph.

            • Whether the graph is a SatelliteGraph.

            • Whether the graph is a SmartGraph.

            • The name of the graph.

            • Number of shards created for every new collection in the graph.

            • An array of additional node collections. Documents in these collections do not have edges within this graph.

            • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

            • Name of the sharding attribute in the SmartGraph case.

            • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

        • Is returned if the graph can be created and waitForSync is disabled for the _graphs collection and not given in the request. The response body contains the graph configuration that has been stored.

            Response Body application/json object
          • The HTTP response status code.

          • A flag indicating that no error occurred.

          • The information about the newly created graph.

            • The internal id value of this graph.

            • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

            • An array of definitions for the relations of the graph. Each has the following type:

              • Name of the edge collection, where the edges are stored in.

              • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

              • List of node collection names.

                Edges in collection can only be inserted if their _to is in any of the collections here.

            • Whether the graph is a Disjoint SmartGraph.

            • Whether the graph is a SatelliteGraph.

            • Whether the graph is a SmartGraph.

            • The name of the graph.

            • Number of shards created for every new collection in the graph.

            • An array of additional node collections. Documents in these collections do not have edges within this graph.

            • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

            • Name of the sharding attribute in the SmartGraph case.

            • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

        • Returned if the request is in a wrong format.

            Response Body application/json object
          • The HTTP response status code.

          • A flag indicating that an error occurred.

          • A descriptive error message.

          • The ArangoDB error number for the error that occurred.

        • Returned if your user has insufficient rights. In order to create a graph, you need to have at least the following privileges:

          • Administrate access on the database.
          • Read Only access on every collection used within this graph.

            Response Body application/json object
          • The HTTP response status code.

          • A flag indicating that an error occurred.

          • A descriptive error message.

          • The ArangoDB error number for the error that occurred.

        • Returned if there is a conflict storing the graph. This can occur either if a graph with this name already exists, or if there is an edge definition with the same edge collection but different from and to node collections in any other graph.

            Response Body application/json object
          • The HTTP response status code.

          • A flag indicating that an error occurred.

          • A descriptive error message.

          • The ArangoDB error number for the error that occurred.

        Examples

        Create a General Graph. This graph type does not make use of any sharding strategy and is useful on the single server.

        curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial' <<'EOF'
        {
          "name": "myGraph",
          "edgeDefinitions": [
            {
              "collection": "edges",
              "from": [
                "startNodes"
              ],
              "to": [
                "endNodes"
              ]
            }
          ]
        }
        EOF
        Show output

        Create a SmartGraph. This graph uses 9 shards and is sharded by the “region” attribute.

        curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial' <<'EOF'
        {
          "name": "smartGraph",
          "edgeDefinitions": [
            {
              "collection": "edges",
              "from": [
                "startNodes"
              ],
              "to": [
                "endNodes"
              ]
            }
          ],
          "orphanCollections": [
            "orphanNodes"
          ],
          "isSmart": true,
          "options": {
            "replicationFactor": 2,
            "numberOfShards": 9,
            "smartGraphAttribute": "region"
          }
        }
        EOF
        Show output

        Create a disjoint SmartGraph. This graph uses 9 shards and is sharded by the “region” attribute. Note that as you are using a disjoint version, you can only create edges between nodes sharing the same region.

        curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial' <<'EOF'
        {
          "name": "disjointSmartGraph",
          "edgeDefinitions": [
            {
              "collection": "edges",
              "from": [
                "startNodes"
              ],
              "to": [
                "endNodes"
              ]
            }
          ],
          "orphanCollections": [
            "orphanNodes"
          ],
          "isSmart": true,
          "options": {
            "isDisjoint": true,
            "replicationFactor": 2,
            "numberOfShards": 9,
            "smartGraphAttribute": "region"
          }
        }
        EOF
        Show output

        Create a SmartGraph with a satellite node collection. It uses the collection “endNodes” as a satellite collection. This collection is cloned to all servers, all other node collections are split into 9 shards and are sharded by the “region” attribute.

        curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial' <<'EOF'
        {
          "name": "smartGraph",
          "edgeDefinitions": [
            {
              "collection": "edges",
              "from": [
                "startNodes"
              ],
              "to": [
                "endNodes"
              ]
            }
          ],
          "orphanCollections": [
            "orphanNodes"
          ],
          "isSmart": true,
          "options": {
            "replicationFactor": 2,
            "numberOfShards": 9,
            "smartGraphAttribute": "region",
            "satellites": [
              "endNodes"
            ]
          }
        }
        EOF
        Show output

        Create an EnterpriseGraph. This graph uses 9 shards, it does not make use of specific sharding attributes.

        curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial' <<'EOF'
        {
          "name": "enterpriseGraph",
          "edgeDefinitions": [
            {
              "collection": "edges",
              "from": [
                "startNodes"
              ],
              "to": [
                "endNodes"
              ]
            }
          ],
          "orphanCollections": [],
          "isSmart": true,
          "options": {
            "replicationFactor": 2,
            "numberOfShards": 9
          }
        }
        EOF
        Show output

        Create a SatelliteGraph. A SatelliteGraph does not use shards, but uses “satellite” as replicationFactor. Make sure to keep this graph small as it is cloned to every server.

        curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial' <<'EOF'
        {
          "name": "satelliteGraph",
          "edgeDefinitions": [
            {
              "collection": "edges",
              "from": [
                "startNodes"
              ],
              "to": [
                "endNodes"
              ]
            }
          ],
          "orphanCollections": [],
          "options": {
            "replicationFactor": "satellite"
          }
        }
        EOF
        Show output

        Get a graph

        GET /_db/{database-name}/_api/gharial/{graph}
        Selects information for a given graph. Returns the edge definitions as well as the orphan collections, or returns an error if the graph does not exist.
        Path Parameters
        • The name of the database.

        • The name of the graph.

        Query Parameters
          HTTP Headers
            Responses
            • Returns the graph if it can be found. The result has the following format:

                Response Body application/json object
              • The HTTP response status code.

              • A flag indicating that no error occurred.

              • The information about the newly created graph

                • The internal id value of this graph.

                • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                • An array of definitions for the relations of the graph. Each has the following type:

                  • Name of the edge collection, where the edges are stored in.

                  • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                  • List of node collection names.

                    Edges in collection can only be inserted if their _to is in any of the collections here.

                • Whether the graph is a Disjoint SmartGraph.

                • Whether the graph is a SatelliteGraph.

                • Whether the graph is a SmartGraph.

                • The name of the graph.

                • Number of shards created for every new collection in the graph.

                • An array of additional node collections. Documents in these collections do not have edges within this graph.

                • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                • Name of the sharding attribute in the SmartGraph case.

                • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

            • Returned if no graph with this name can be found.

                Response Body application/json object
              • The HTTP response status code.

              • A flag indicating that an error occurred.

              • A descriptive error message.

              • The ArangoDB error number for the error that occurred.

            Examples

            curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/gharial/myGraph'
            Show output

            Drop a graph

            DELETE /_db/{database-name}/_api/gharial/{graph}
            Drops an existing graph object by name. Optionally all collections not used by other graphs can be dropped as well.
            Path Parameters
            • The name of the database.

            • The name of the graph.

            Query Parameters
            • Drop the collections of this graph as well. Collections are only dropped if they are not used in other graphs.

            HTTP Headers
              Responses
              • Is returned if the graph can be dropped.

                  Response Body application/json object
                • The HTTP response status code.

                • A flag indicating that no error occurred.

                • Always true.

              • Returned if your user has insufficient rights. In order to drop a graph, you need to have at least the following privileges:

                • Administrate access on the database.

                  Response Body application/json object
                • The HTTP response status code.

                • A flag indicating that an error occurred.

                • A descriptive error message.

                • The ArangoDB error number for the error that occurred.

              • Returned if no graph with this name can be found.

                  Response Body application/json object
                • The HTTP response status code.

                • A flag indicating that an error occurred.

                • A descriptive error message.

                • The ArangoDB error number for the error that occurred.

              Examples

              curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social?dropCollections=true
              Show output

              List node collections

              GET /_db/{database-name}/_api/gharial/{graph}/vertex
              Lists all node collections within this graph, including orphan collections.
              Path Parameters
              • The name of the database.

              • The name of the graph.

              Query Parameters
                HTTP Headers
                  Responses
                  • Is returned if the collections can be listed.

                      Response Body application/json object
                    • The HTTP response status code.

                    • The list of all node collections within this graph. Includes the node collections used in edge definitions as well as orphan collections.

                    • A flag indicating that no error occurred.

                  • Returned if no graph with this name can be found.

                      Response Body application/json object
                    • The HTTP response status code.

                    • A flag indicating that an error occurred.

                    • A descriptive error message.

                    • The ArangoDB error number for the error that occurred.

                  Examples

                  curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex
                  Show output

                  Add a node collection

                  Adding a node collection on its own to a graph adds it as an orphan collection. If you want to use an additional node collection for graph relations, add it by adding a new edge definition or modifying an existing edge definition instead.

                  POST /_db/{database-name}/_api/gharial/{graph}/vertex
                  Adds a node collection to the set of orphan collections of the graph. If the collection does not exist, it is created.
                  Path Parameters
                  • The name of the database.

                  • The name of the graph.

                  Query Parameters
                    HTTP Headers
                      Request Body application/json object
                      • The name of the node collection to add to the graph definition.

                      • A JSON object to set options for creating node collections.

                        • An array of collection names that is used to create SatelliteCollections for a (Disjoint) SmartGraph using SatelliteCollections. Each array element must be a string and a valid collection name. The collection type cannot be modified later.

                      Responses
                      • Is returned if the collection can be created and waitForSync is enabled for the _graphs collection, or given in the request. The response body contains the graph configuration that has been stored.

                          Response Body application/json object
                        • The HTTP response status code.

                        • A flag indicating that no error occurred.

                        • The information about the modified graph.

                          • The internal id value of this graph.

                          • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                          • An array of definitions for the relations of the graph. Each has the following type:

                            • Name of the edge collection, where the edges are stored in.

                            • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                            • List of node collection names.

                              Edges in collection can only be inserted if their _to is in any of the collections here.

                          • Whether the graph is a Disjoint SmartGraph.

                          • Whether the graph is a SatelliteGraph.

                          • Whether the graph is a SmartGraph.

                          • The name of the graph.

                          • Number of shards created for every new collection in the graph.

                          • An array of additional node collections. Documents in these collections do not have edges within this graph.

                          • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                          • Name of the sharding attribute in the SmartGraph case.

                          • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                      • Is returned if the collection can be created and waitForSync is disabled for the _graphs collection, or given in the request. The response body contains the graph configuration that has been stored.

                          Response Body application/json object
                        • The HTTP response status code.

                        • A flag indicating that no error occurred.

                        • The information about the newly created graph

                          • The internal id value of this graph.

                          • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                          • An array of definitions for the relations of the graph. Each has the following type:

                            • Name of the edge collection, where the edges are stored in.

                            • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                            • List of node collection names.

                              Edges in collection can only be inserted if their _to is in any of the collections here.

                          • Whether the graph is a Disjoint SmartGraph.

                          • Whether the graph is a SatelliteGraph.

                          • Whether the graph is a SmartGraph.

                          • The name of the graph.

                          • Number of shards created for every new collection in the graph.

                          • An array of additional node collections. Documents in these collections do not have edges within this graph.

                          • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                          • Name of the sharding attribute in the SmartGraph case.

                          • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                      • Returned if the request is in an invalid format.

                          Response Body application/json object
                        • The HTTP response status code.

                        • A flag indicating that an error occurred.

                        • A descriptive error message.

                        • The ArangoDB error number for the error that occurred.

                      • Returned if your user has insufficient rights. In order to modify a graph, you need to have at least the following privileges:

                        • Administrate access on the database.
                        • Read Only access on every collection used within this graph.

                          Response Body application/json object
                        • The HTTP response status code.

                        • A flag indicating that an error occurred.

                        • A descriptive error message.

                        • The ArangoDB error number for the error that occurred.

                      • Returned if no graph with this name can be found.

                          Response Body application/json object
                        • The HTTP response status code.

                        • A flag indicating that an error occurred.

                        • A descriptive error message.

                        • The ArangoDB error number for the error that occurred.

                      Examples

                      curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/gharial/social/vertex' <<'EOF'
                      {
                        "collection": "otherNodes"
                      }
                      EOF
                      Show output

                      Remove a node collection

                      DELETE /_db/{database-name}/_api/gharial/{graph}/vertex/{collection}

                      Removes a node collection from the list of the graph’s orphan collections. It can optionally delete the collection if it is not used in any other graph.

                      You cannot remove node collections that are used in one of the edge definitions of the graph. You need to modify or remove the edge definition first in order to fully remove a node collection from the graph.

                      Path Parameters
                      • The name of the database.

                      • The name of the graph.

                      • The name of the node collection.

                      Query Parameters
                      • Drop the collection in addition to removing it from the graph. The collection is only dropped if it is not used in other graphs.

                      HTTP Headers
                        Responses
                        • Returned if the node collection was removed from the graph successfully and waitForSync is true.

                            Response Body application/json object
                          • The HTTP response status code.

                          • A flag indicating that no error occurred.

                          • The information about the newly created graph

                            • The internal id value of this graph.

                            • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                            • An array of definitions for the relations of the graph. Each has the following type:

                              • Name of the edge collection, where the edges are stored in.

                              • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                              • List of node collection names.

                                Edges in collection can only be inserted if their _to is in any of the collections here.

                            • Whether the graph is a Disjoint SmartGraph.

                            • Whether the graph is a SatelliteGraph.

                            • Whether the graph is a SmartGraph.

                            • The name of the graph.

                            • Number of shards created for every new collection in the graph.

                            • An array of additional node collections. Documents in these collections do not have edges within this graph.

                            • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                            • Name of the sharding attribute in the SmartGraph case.

                            • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                        • Returned if the request was successful but waitForSync is false.

                            Response Body application/json object
                          • The HTTP response status code.

                          • A flag indicating that no error occurred.

                          • The information about the newly created graph

                            • The internal id value of this graph.

                            • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                            • An array of definitions for the relations of the graph. Each has the following type:

                              • Name of the edge collection, where the edges are stored in.

                              • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                              • List of node collection names.

                                Edges in collection can only be inserted if their _to is in any of the collections here.

                            • Whether the graph is a Disjoint SmartGraph.

                            • Whether the graph is a SatelliteGraph.

                            • Whether the graph is a SmartGraph.

                            • The name of the graph.

                            • Number of shards created for every new collection in the graph.

                            • An array of additional node collections. Documents in these collections do not have edges within this graph.

                            • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                            • Name of the sharding attribute in the SmartGraph case.

                            • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                        • Returned if the node collection is still used in an edge definition. In this case it cannot be removed from the graph yet, it has to be removed from the edge definition first.

                            Response Body application/json object
                          • The HTTP response status code.

                          • A flag indicating that an error occurred.

                          • A descriptive error message.

                          • The ArangoDB error number for the error that occurred.

                        • Returned if your user has insufficient rights. In order to drop a node, you need to have at least the following privileges:

                          • Administrate access on the database.

                            Response Body application/json object
                          • The HTTP response status code.

                          • A flag indicating that an error occurred.

                          • A descriptive error message.

                          • The ArangoDB error number for the error that occurred.

                        • Returned if no graph with this name can be found.

                            Response Body application/json object
                          • The HTTP response status code.

                          • A flag indicating that an error occurred.

                          • A descriptive error message.

                          • The ArangoDB error number for the error that occurred.

                        Examples

                        You can remove node collections that are not used in any edge definition:

                        curl -X DELETE --header 'accept: application/json' --dump - 'http://localhost:8529/_api/gharial/social/vertex/otherNodes'
                        Show output

                        You cannot remove node collections that are used in edge definitions:

                        curl -X DELETE --header 'accept: application/json' --dump - 'http://localhost:8529/_api/gharial/social/vertex/male'
                        Show output

                        List edge collections

                        GET /_db/{database-name}/_api/gharial/{graph}/edge
                        Lists all edge collections within this graph.
                        Path Parameters
                        • The name of the database.

                        • The name of the graph.

                        Query Parameters
                          HTTP Headers
                            Responses
                            • Is returned if the edge definitions can be listed.

                                Response Body application/json object
                              • The HTTP response status code.

                              • A list of all edge collections used in the edge definitions of this graph.

                              • A flag indicating that no error occurred.

                            • Returned if no graph with this name can be found.

                                Response Body application/json object
                              • The HTTP response status code.

                              • A flag indicating that an error occurred.

                              • A descriptive error message.

                              • The ArangoDB error number for the error that occurred.

                            Examples

                            curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge
                            Show output

                            Add an edge definition

                            POST /_db/{database-name}/_api/gharial/{graph}/edge

                            Adds an additional edge definition to the graph.

                            This edge definition has to contain a collection and an array of each from and to node collections. An edge definition can only be added if this definition is either not used in any other graph, or it is used with exactly the same definition. For example, it is not possible to store a definition “e” from “v1” to “v2” in one graph, and “e” from “v2” to “v1” in another graph, but both can have “e” from “v1” to “v2”.

                            Additionally, collection creation options can be set.

                            Path Parameters
                            • The name of the database.

                            • The name of the graph.

                            Query Parameters
                              HTTP Headers
                                Request Body application/json object
                                • The name of the edge collection to be used.

                                • One or many node collections that can contain source nodes.

                                • A JSON object to set options for creating collections within this edge definition.

                                  • An array of collection names that is used to create SatelliteCollections for a (Disjoint) SmartGraph using SatelliteCollections. Each array element must be a string and a valid collection name. The collection type cannot be modified later.

                                • One or many node collections that can contain target nodes.

                                Responses
                                • Returned if the definition can be added successfully and waitForSync is enabled for the _graphs collection. The response body contains the graph configuration that has been stored.

                                    Response Body application/json object
                                  • The HTTP response status code.

                                  • A flag indicating that no error occurred.

                                  • The information about the modified graph.

                                    • The internal id value of this graph.

                                    • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                                    • An array of definitions for the relations of the graph. Each has the following type:

                                      • Name of the edge collection, where the edges are stored in.

                                      • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                                      • List of node collection names.

                                        Edges in collection can only be inserted if their _to is in any of the collections here.

                                    • Whether the graph is a Disjoint SmartGraph.

                                    • Whether the graph is a SatelliteGraph.

                                    • Whether the graph is a SmartGraph.

                                    • The name of the graph.

                                    • Number of shards created for every new collection in the graph.

                                    • An array of additional node collections. Documents in these collections do not have edges within this graph.

                                    • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                                    • Name of the sharding attribute in the SmartGraph case.

                                    • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                                • Returned if the definition can be added successfully and waitForSync is disabled for the _graphs collection. The response body contains the graph configuration that has been stored.

                                    Response Body application/json object
                                  • The HTTP response status code.

                                  • A flag indicating that no error occurred.

                                  • The information about the modified graph.

                                    • The internal id value of this graph.

                                    • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                                    • An array of definitions for the relations of the graph. Each has the following type:

                                      • Name of the edge collection, where the edges are stored in.

                                      • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                                      • List of node collection names.

                                        Edges in collection can only be inserted if their _to is in any of the collections here.

                                    • Whether the graph is a Disjoint SmartGraph.

                                    • Whether the graph is a SatelliteGraph.

                                    • Whether the graph is a SmartGraph.

                                    • The name of the graph.

                                    • Number of shards created for every new collection in the graph.

                                    • An array of additional node collections. Documents in these collections do not have edges within this graph.

                                    • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                                    • Name of the sharding attribute in the SmartGraph case.

                                    • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                                • Returned if the edge definition can not be added. This can be because it is ill-formed, or if there is an edge definition with the same edge collection but different from and to node collections in any other graph.

                                    Response Body application/json object
                                  • The HTTP response status code.

                                  • A flag indicating that an error occurred.

                                  • A descriptive error message.

                                  • The ArangoDB error number for the error that occurred.

                                • Returned if your user has insufficient rights. In order to modify a graph, you need to have at least the following privileges:

                                  • Administrate access on the database.

                                    Response Body application/json object
                                  • The HTTP response status code.

                                  • A flag indicating that an error occurred.

                                  • A descriptive error message.

                                  • The ArangoDB error number for the error that occurred.

                                • Returned if no graph with this name can be found.

                                    Response Body application/json object
                                  • The HTTP response status code.

                                  • A flag indicating that an error occurred.

                                  • A descriptive error message.

                                  • The ArangoDB error number for the error that occurred.

                                Examples

                                curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge
                                {
                                  "collection": "works_in",
                                  "from": [
                                    "female",
                                    "male"
                                  ],
                                  "to": [
                                    "city"
                                  ]
                                }
                                Show output

                                Replace an edge definition

                                PUT /_db/{database-name}/_api/gharial/{graph}/edge/{collection}
                                Change the node collections of one specific edge definition. This modifies all occurrences of this definition in all graphs known to your database.
                                Path Parameters
                                • The name of the database.

                                • The name of the graph.

                                • The name of the edge collection used in the edge definition.

                                Query Parameters
                                • Define if the request should wait until synced to disk.

                                • Drop the edge collection in addition to removing it from the graph. The collection is only dropped if it is not used in other graphs.

                                HTTP Headers
                                  Request Body application/json object
                                  • The name of the edge collection to modify.

                                  • One or many node collections that can contain source nodes.

                                  • A JSON object to set options for modifying collections within this edge definition.

                                    • An array of collection names that is used to create SatelliteCollections for a (Disjoint) SmartGraph using SatelliteCollections. Each array element must be a string and a valid collection name. The collection type cannot be modified later.

                                  • One or many node collections that can contain target nodes.

                                  Responses
                                  • Returned if the request was successful and waitForSync is true.

                                      Response Body application/json object
                                    • The HTTP response status code.

                                    • A flag indicating that no error occurred.

                                    • The information about the modified graph.

                                      • The internal id value of this graph.

                                      • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                                      • An array of definitions for the relations of the graph. Each has the following type:

                                        • Name of the edge collection, where the edges are stored in.

                                        • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                                        • List of node collection names.

                                          Edges in collection can only be inserted if their _to is in any of the collections here.

                                      • Whether the graph is a Disjoint SmartGraph.

                                      • Whether the graph is a SatelliteGraph.

                                      • Whether the graph is a SmartGraph.

                                      • The name of the graph.

                                      • Number of shards created for every new collection in the graph.

                                      • An array of additional node collections. Documents in these collections do not have edges within this graph.

                                      • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                                      • Name of the sharding attribute in the SmartGraph case.

                                      • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                                  • Returned if the request was successful but waitForSync is false.

                                      Response Body application/json object
                                    • The HTTP response status code.

                                    • A flag indicating that no error occurred.

                                    • The information about the modified graph.

                                      • The internal id value of this graph.

                                      • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                                      • An array of definitions for the relations of the graph. Each has the following type:

                                        • Name of the edge collection, where the edges are stored in.

                                        • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                                        • List of node collection names.

                                          Edges in collection can only be inserted if their _to is in any of the collections here.

                                      • Whether the graph is a Disjoint SmartGraph.

                                      • Whether the graph is a SatelliteGraph.

                                      • Whether the graph is a SmartGraph.

                                      • The name of the graph.

                                      • Number of shards created for every new collection in the graph.

                                      • An array of additional node collections. Documents in these collections do not have edges within this graph.

                                      • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                                      • Name of the sharding attribute in the SmartGraph case.

                                      • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                                  • Returned if the new edge definition is ill-formed and cannot be used.

                                      Response Body application/json object
                                    • The HTTP response status code.

                                    • A flag indicating that an error occurred.

                                    • A descriptive error message.

                                    • The ArangoDB error number for the error that occurred.

                                  • Returned if your user has insufficient rights. In order to drop a node, you need to have at least the following privileges:

                                    • Administrate access on the database.

                                      Response Body application/json object
                                    • The HTTP response status code.

                                    • A flag indicating that an error occurred.

                                    • A descriptive error message.

                                    • The ArangoDB error number for the error that occurred.

                                  • Returned if no graph with this name can be found, or if no edge definition with this name is found in the graph.

                                      Response Body application/json object
                                    • The HTTP response status code.

                                    • A flag indicating that an error occurred.

                                    • A descriptive error message.

                                    • The ArangoDB error number for the error that occurred.

                                  Examples

                                  curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation
                                  {
                                    "collection": "relation",
                                    "from": [
                                      "female",
                                      "male",
                                      "animal"
                                    ],
                                    "to": [
                                      "female",
                                      "male",
                                      "animal"
                                    ]
                                  }
                                  Show output

                                  Remove an edge definition

                                  DELETE /_db/{database-name}/_api/gharial/{graph}/edge/{collection}
                                  Remove one edge definition from the graph. This only removes the edge collection from the graph definition. The node collections of the edge definition become orphan collections but otherwise remain untouched and can still be used in your queries.
                                  Path Parameters
                                  • The name of the database.

                                  • The name of the graph.

                                  • The name of the edge collection used in the edge definition.

                                  Query Parameters
                                  • Define if the request should wait until synced to disk.

                                  • Drop the edge collection in addition to removing it from the graph. The collection is only dropped if it is not used in other graphs.

                                  HTTP Headers
                                    Responses
                                    • Returned if the edge definition can be removed from the graph and waitForSync is true.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that no error occurred.

                                      • The information about the modified graph.

                                        • The internal id value of this graph.

                                        • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                                        • An array of definitions for the relations of the graph. Each has the following type:

                                          • Name of the edge collection, where the edges are stored in.

                                          • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                                          • List of node collection names.

                                            Edges in collection can only be inserted if their _to is in any of the collections here.

                                        • Whether the graph is a Disjoint SmartGraph.

                                        • Whether the graph is a SatelliteGraph.

                                        • Whether the graph is a SmartGraph.

                                        • The name of the graph.

                                        • Number of shards created for every new collection in the graph.

                                        • An array of additional node collections. Documents in these collections do not have edges within this graph.

                                        • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                                        • Name of the sharding attribute in the SmartGraph case.

                                        • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                                    • Returned if the edge definition can be removed from the graph and waitForSync is false.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that no error occurred.

                                      • The information about the modified graph.

                                        • The internal id value of this graph.

                                        • The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

                                        • An array of definitions for the relations of the graph. Each has the following type:

                                          • Name of the edge collection, where the edges are stored in.

                                          • List of node collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

                                          • List of node collection names.

                                            Edges in collection can only be inserted if their _to is in any of the collections here.

                                        • Whether the graph is a Disjoint SmartGraph.

                                        • Whether the graph is a SatelliteGraph.

                                        • Whether the graph is a SmartGraph.

                                        • The name of the graph.

                                        • Number of shards created for every new collection in the graph.

                                        • An array of additional node collections. Documents in these collections do not have edges within this graph.

                                        • The replication factor used for every new collection in the graph. For SatelliteGraphs, it is the string "satellite".

                                        • Name of the sharding attribute in the SmartGraph case.

                                        • The default write concern for new collections in the graph. It determines how many copies of each shard are required to be in sync on the different DB-Servers. If there are less than these many copies in the cluster, a shard refuses to write. Writes to shards with enough up-to-date copies succeed at the same time, however. The value of writeConcern cannot be greater than replicationFactor. For SatelliteGraphs, the writeConcern is automatically controlled to equal the number of DB-Servers and the attribute is not available. (cluster only)

                                    • Returned if your user has insufficient rights. In order to drop a node, you need to have at least the following privileges:

                                      • Administrate access on the database.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that an error occurred.

                                      • A descriptive error message.

                                      • The ArangoDB error number for the error that occurred.

                                    • Returned if no graph with this name can be found, or if no edge definition with this name is found in the graph.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that an error occurred.

                                      • A descriptive error message.

                                      • The ArangoDB error number for the error that occurred.

                                    Examples

                                    curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation
                                    Show output

                                    Nodes

                                    Create a node

                                    POST /_db/{database-name}/_api/gharial/{graph}/vertex/{collection}
                                    Adds a node to the given collection.
                                    Path Parameters
                                    • The name of the database.

                                    • The name of the graph.

                                    • The name of the node collection the node should be inserted into.

                                    Query Parameters
                                    • Define if the request should wait until synced to disk.

                                    • Whether to additionally include the complete new document under the new attribute in the result.

                                    HTTP Headers
                                    • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                    Request Body application/json object
                                      The body has to be a JSON object you want to store as a node document.
                                    Responses
                                    • Returned if the node can be added and waitForSync is true.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that no error occurred.

                                      • The complete newly written node document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                        • The _id value of the stored data.

                                        • The _key value of the stored data.

                                        • The _rev value of the stored data.

                                      • The internal attributes for the node.

                                        • The _id value of the stored data.

                                        • The _key value of the stored data.

                                        • The _rev value of the stored data.

                                    • Returned if the request was successful but waitForSync is false.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that no error occurred.

                                      • The complete newly written node document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                        • The _id value of the stored data.

                                        • The _key value of the stored data.

                                        • The _rev value of the stored data.

                                      • The internal attributes generated while storing the node. Does not include any attribute given in request body.

                                        • The _id value of the stored data.

                                        • The _key value of the stored data.

                                        • The _rev value of the stored data.

                                    • Returned if your user has insufficient rights. In order to insert nodes into the graph, you need to have at least the following privileges:

                                      • Read Only access on the database.
                                      • Write access on the given collection.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that an error occurred.

                                      • A descriptive error message.

                                      • The ArangoDB error number for the error that occurred.

                                    • The graph cannot be found or the collection is not part of the graph.

                                      This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that an error occurred.

                                      • A descriptive error message.

                                      • The ArangoDB error number for the error that occurred.

                                    • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                        Response Body application/json object
                                      • The HTTP response status code.

                                      • A flag indicating that an error occurred.

                                      • A descriptive error message.

                                      • The ArangoDB error number for the error that occurred.

                                    Examples

                                    curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/male
                                    {
                                      "name": "Francis"
                                    }
                                    Show output

                                    Get a node

                                    GET /_db/{database-name}/_api/gharial/{graph}/vertex/{collection}/{vertex}
                                    Gets a node from the given collection.
                                    Path Parameters
                                    • The name of the database.

                                    • The name of the graph.

                                    • The name of the node collection the node belongs to.

                                    • The _key attribute of the node.

                                    Query Parameters
                                      HTTP Headers
                                      • If you provide an If-Match header, it must contain exactly one ETag. The document is returned if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                      • If you provide an If-None-Match header, it must contain exactly one ETag. The document is returned if it has a different revision as the given ETag. Otherwise, an error with HTTP status code 304 is returned.

                                      • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                      Responses
                                      • Returned if the node can be found.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete node.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                      • The If-None-Match header has been specified and the currently stored node still has this revision value. There was no update since the last time the node was fetched by the caller.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned if your user has insufficient rights. In order to update nodes in the graph, you need to have at least the following privileges:

                                        • Read Only access on the database.
                                        • Read Only access on the given collection.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned in the following cases:

                                        • The graph cannot be found.
                                        • The collection is not part of the graph.
                                        • The node does not exist.

                                        This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • The If-Match header has been specified but the stored document’s revision is different.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      Examples

                                      curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
                                      Show output

                                      Update a node

                                      PATCH /_db/{database-name}/_api/gharial/{graph}/vertex/{collection}/{vertex}
                                      Updates the data of the specific node in the collection.
                                      Path Parameters
                                      • The name of the database.

                                      • The name of the graph.

                                      • The name of the node collection the node belongs to.

                                      • The _key attribute of the node.

                                      Query Parameters
                                      • Define if the request should wait until synced to disk.

                                      • Define if values set to null should be stored. By default (true), the given documents attribute(s) are set to null. If this parameter is set to false, top-level attribute and sub-attributes with a null value in the request are removed from the document (but not attributes of objects that are nested inside of arrays).

                                      • Whether to additionally include the complete previous document under the old attribute in the result.

                                      • Whether to additionally include the complete new document under the new attribute in the result.

                                      HTTP Headers
                                      • If you provide an If-Match header, it must contain exactly one ETag. The document is updated if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                      • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                      Request Body application/json object
                                        The body has to be a JSON object containing exactly the attributes that should be overwritten. All other attributes remain unchanged.
                                      Responses
                                      • Returned if the node can be updated, and waitForSync is true.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete newly written node document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The complete overwritten node document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The internal attributes for the node.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                      • Returned if the request was successful, and waitForSync is false.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete newly written node document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The complete overwritten node document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The internal attributes for the node.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                      • Returned if your user has insufficient rights. In order to update nodes in the graph, you need to have at least the following privileges:

                                        • Read Only access on the database.
                                        • Write access on the given collection.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned in the following cases:

                                        • The graph cannot be found.
                                        • The collection is not part of the graph.
                                        • The node to update does not exist.

                                        This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • The If-Match header has been specified but the stored document’s revision is different.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      Examples

                                      curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
                                      {
                                        "age": 26
                                      }
                                      Show output

                                      Replace a node

                                      PUT /_db/{database-name}/_api/gharial/{graph}/vertex/{collection}/{vertex}
                                      Replaces the data of a node in the collection.
                                      Path Parameters
                                      • The name of the database.

                                      • The name of the graph.

                                      • The name of the node collection the node belongs to.

                                      • The _key attribute of the node.

                                      Query Parameters
                                      • Define if the request should wait until synced to disk.

                                      • Define if values set to null should be stored. By default (true), the given documents attribute(s) are set to null. If this parameter is set to false, top-level attribute and sub-attributes with a null value in the request are removed from the document (but not attributes of objects that are nested inside of arrays).

                                      • Whether to additionally include the complete previous document under the old attribute in the result.

                                      • Whether to additionally include the complete new document under the new attribute in the result.

                                      HTTP Headers
                                      • If you provide an If-Match header, it must contain exactly one ETag. The document is replaced if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                      • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                      Request Body application/json object
                                        The body has to be a JSON object you want to replace the existing node document with.
                                      Responses
                                      • Returned if the node can be replaced, and waitForSync is true.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete newly written node document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The complete overwritten node document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The internal attributes for the node.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                      • Returned if the node can be replaced, and waitForSync is false.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete newly written node document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The complete overwritten node document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • The internal attributes for the node.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                      • Returned if your user has insufficient rights. In order to replace nodes in the graph, you need to have at least the following privileges:

                                        • Read Only access on the database.
                                        • Write access on the given collection.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned in the following cases:

                                        • The graph cannot be found.
                                        • The collection is not part of the graph.
                                        • The node to replace does not exist.

                                        This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • The If-Match header has been specified but the stored document’s revision is different.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      Examples

                                      curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
                                      {
                                        "name": "Alice Cooper",
                                        "age": 26
                                      }
                                      Show output

                                      Remove a node

                                      DELETE /_db/{database-name}/_api/gharial/{graph}/vertex/{collection}/{vertex}
                                      Removes a node from a collection of the named graph. Additionally removes all incoming and outgoing edges of the node.
                                      Path Parameters
                                      • The name of the database.

                                      • The name of the graph.

                                      • The name of the node collection the node belongs to.

                                      • The _key attribute of the node.

                                      Query Parameters
                                      • Define if the request should wait until synced to disk.

                                      • Whether to additionally include the complete previous document under the old attribute in the result.

                                      HTTP Headers
                                      • If you provide an If-Match header, it must contain exactly one ETag. The document is deleted if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                      • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                      Responses
                                      • Returned if the node can be removed.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete deleted node document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • Is set to true if the remove was successful.

                                      • Returned if the request was successful but waitForSync is false.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that no error occurred.

                                        • The complete deleted node document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                        • Is set to true if the remove was successful.

                                      • Returned if your user has insufficient rights. In order to delete nodes in the graph, you need to have at least the following privileges:

                                        • Read Only access on the database.
                                        • Write access on the given collection.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned in the following cases:

                                        • The graph cannot be found.
                                        • The collection is not part of the graph.
                                        • The node to remove does not exist.

                                        This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • The If-Match header has been specified but the stored document’s revision is different.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      Examples

                                      curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
                                      Show output

                                      Edges

                                      Create an edge

                                      POST /_db/{database-name}/_api/gharial/{graph}/edge/{collection}
                                      Creates a new edge in the specified collection. Within the body the edge has to contain a _from and _to value referencing to valid nodes in the graph. Furthermore, the edge has to be valid according to the edge definitions.
                                      Path Parameters
                                      • The name of the database.

                                      • The name of the graph.

                                      • The name of the edge collection the edge belongs to.

                                      Query Parameters
                                      • Define if the request should wait until synced to disk.

                                      • Whether to additionally include the complete new document under the new attribute in the result.

                                      HTTP Headers
                                      • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                      Request Body application/json object
                                        The body has to be a JSON object you want to store as an edge document.
                                      • The source node of this edge. Has to be valid within the used edge definition.

                                      • The target node of this edge. Has to be valid within the used edge definition.

                                      Responses
                                      • Returned if the edge can be created and waitForSync is true.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • The internal attributes for the edge.

                                          • The _from value of the stored data.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                          • The _to value of the stored data.

                                        • A flag indicating that no error occurred.

                                        • The complete newly written edge document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                          • The _from value of the stored data.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                          • The _to value of the stored data.

                                      • Returned if the request was successful but waitForSync is false.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • The internal attributes for the edge.

                                          • The _from value of the stored data.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                          • The _to value of the stored data.

                                        • A flag indicating that no error occurred.

                                        • The complete newly written edge document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                          • The _from value of the stored data.

                                          • The _id value of the stored data.

                                          • The _key value of the stored data.

                                          • The _rev value of the stored data.

                                          • The _to value of the stored data.

                                      • Returned if the input document is invalid. This can for instance be the case if the _from or _to attribute is missing or malformed.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned if your user has insufficient rights. In order to insert edges into the graph, you need to have at least the following privileges:

                                        • Read Only access on the database.
                                        • Write access on the given collection.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • Returned in any of the following cases:

                                        • The graph cannot be found.
                                        • The edge collection is not part of the graph.
                                        • The node collection referenced in the _from or _to attribute is not part of the graph.
                                        • The node collection is part of the graph, but does not exist.
                                        • _from or _to node does not exist.

                                        This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                          Response Body application/json object
                                        • The HTTP response status code.

                                        • A flag indicating that an error occurred.

                                        • A descriptive error message.

                                        • The ArangoDB error number for the error that occurred.

                                      Examples

                                      curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation
                                      {
                                        "type": "friend",
                                        "_from": "female/alice",
                                        "_to": "female/diana"
                                      }
                                      Show output

                                      Get an edge

                                      GET /_db/{database-name}/_api/gharial/{graph}/edge/{collection}/{edge}
                                      Gets an edge from the given collection.
                                      Path Parameters
                                      • The name of the database.

                                      • The name of the graph.

                                      • The name of the edge collection the edge belongs to.

                                      • The _key attribute of the edge.

                                      Query Parameters
                                        HTTP Headers
                                        • If you provide an If-Match header, it must contain exactly one ETag. The document is returned if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                        • If you provide an If-None-Match header, it must contain exactly one ETag. The document is returned if it has a different revision as the given ETag. Otherwise, an error with HTTP status code 304 is returned.

                                        • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                        Responses
                                        • Returned if the edge can be found.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • The complete edge.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • A flag indicating that no error occurred.

                                        • The If-None-Match header has been specified and the currently stored edge still has this revision value. There was no update since the last time the edge was fetched by the caller.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • Returned if your user has insufficient rights. In order to update nodes in the graph, you need to have at least the following privileges:

                                          • Read Only access on the database.
                                          • Read Only access on the given collection.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • Returned in the following cases:

                                          • The graph cannot be found.
                                          • The collection is not part of the graph.
                                          • The edge does not exist.

                                          This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • The If-Match header has been specified but the stored document’s revision is different.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        Examples

                                        curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation/71727
                                        Show output

                                        Update an edge

                                        PATCH /_db/{database-name}/_api/gharial/{graph}/edge/{collection}/{edge}
                                        Partially modify the data of the specific edge in the collection.
                                        Path Parameters
                                        • The name of the database.

                                        • The name of the graph.

                                        • The name of the edge collection the edge belongs to.

                                        • The _key attribute of the node.

                                        Query Parameters
                                        • Define if the request should wait until synced to disk.

                                        • Define if values set to null should be stored. By default (true), the given documents attribute(s) are set to null. If this parameter is set to false, top-level attribute and sub-attributes with a null value in the request are removed from the document (but not attributes of objects that are nested inside of arrays).

                                        • Whether to additionally include the complete previous document under the old attribute in the result.

                                        • Whether to additionally include the complete new document under the new attribute in the result.

                                        HTTP Headers
                                        • If you provide an If-Match header, it must contain exactly one ETag. The document is updated if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                        • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                        Request Body application/json object
                                          The body has to be a JSON object containing exactly the attributes that should be overwritten. All other attributes remain unchanged.
                                        Responses
                                        • Returned if the edge can be updated, and waitForSync is false.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • The internal attributes for the edge.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • A flag indicating that no error occurred.

                                          • The complete newly written edge document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • The complete overwritten edge document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                        • Returned if the request was successful but waitForSync is false.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • The internal attributes for the edge.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • A flag indicating that no error occurred.

                                          • The complete newly written edge document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • The complete overwritten edge document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                        • Returned if your user has insufficient rights. In order to update edges in the graph, you need to have at least the following privileges:

                                          • Read Only access on the database.
                                          • Write access on the given collection.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • Returned in the following cases:

                                          • The graph cannot be found.
                                          • The collection is not part of the graph.
                                          • The edge to update does not exist.
                                          • Either _from or _to node does not exist (if updated).

                                          This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • The If-Match header has been specified but the stored document’s revision is different.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        Examples

                                        curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/71840
                                        {
                                          "since": "01.01.2001"
                                        }
                                        Show output

                                        Replace an edge

                                        PUT /_db/{database-name}/_api/gharial/{graph}/edge/{collection}/{edge}
                                        Replaces the data of an edge in the collection.
                                        Path Parameters
                                        • The name of the database.

                                        • The name of the graph.

                                        • The name of the edge collection the edge belongs to.

                                        • The _key attribute of the node.

                                        Query Parameters
                                        • Define if the request should wait until synced to disk.

                                        • Define if values set to null should be stored. By default (true), the given documents attribute(s) are set to null. If this parameter is set to false, top-level attribute and sub-attributes with a null value in the request are removed from the document (but not attributes of objects that are nested inside of arrays).

                                        • Whether to additionally include the complete previous document under the old attribute in the result.

                                        • Whether to additionally include the complete new document under the new attribute in the result.

                                        HTTP Headers
                                        • If you provide an If-Match header, it must contain exactly one ETag. The document is replaced if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                        • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                        Request Body application/json object
                                          The body has to be a JSON object you want to replace an existing edge document with.
                                        • The source node of this edge. Has to be valid within the used edge definition.

                                        • The target node of this edge. Has to be valid within the used edge definition.

                                        Responses
                                        • Returned if the request was successful but waitForSync is true.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • The internal attributes for the edge

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • A flag indicating that no error occurred.

                                          • The complete newly written edge document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • The complete overwritten edge document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                        • Returned if the request was successful but waitForSync is false.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • The internal attributes for the edge

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • A flag indicating that no error occurred.

                                          • The complete newly written edge document. Includes all written attributes in the request body and all internal attributes generated by ArangoDB. Only present if returnNew is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • The complete overwritten edge document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                        • Returned if your user has insufficient rights. In order to replace edges in the graph, you need to have at least the following privileges:

                                          • Read Only access on the database.
                                          • Write access on the given collection.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • Returned in the following cases:

                                          • The graph cannot be found.
                                          • The collection is not part of the graph.
                                          • The edge to replace does not exist.
                                          • Either _from or _to node does not exist.

                                          This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • The If-Match header has been specified but the stored document’s revision is different.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        Examples

                                        curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/71970
                                        {
                                          "type": "divorced",
                                          "_from": "female/alice",
                                          "_to": "male/bob"
                                        }
                                        Show output

                                        Remove an edge

                                        DELETE /_db/{database-name}/_api/gharial/{graph}/edge/{collection}/{edge}
                                        Removes an edge from an edge collection of the named graph. Any other edges that directly reference this edge like a node are removed, too.
                                        Path Parameters
                                        • The name of the database.

                                        • The name of the graph.

                                        • The name of the edge collection the edge belongs to.

                                        • The _key attribute of the edge.

                                        Query Parameters
                                        • Define if the request should wait until synced to disk.

                                        • Whether to additionally include the complete previous document under the old attribute in the result.

                                        HTTP Headers
                                        • If you provide an If-Match header, it must contain exactly one ETag. The document is deleted if it has the same revision as the given ETag. Otherwise, an error with HTTP status code 412 is returned.

                                        • To make this operation a part of a Stream Transaction, set this header to the transaction ID returned by the POST /_api/transaction/begin call.

                                        Responses
                                        • Returned if the edge can be removed.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that no error occurred.

                                          • The complete deleted edge document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • Is set to true if the remove was successful.

                                        • Returned if the request was successful but waitForSync is false.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that no error occurred.

                                          • The complete deleted edge document. Includes all attributes stored before this operation. Only present if returnOld is true.

                                            • The _from value of the stored data.

                                            • The _id value of the stored data.

                                            • The _key value of the stored data.

                                            • The _rev value of the stored data.

                                            • The _to value of the stored data.

                                          • Is set to true if the remove was successful.

                                        • Returned if your user has insufficient rights. In order to delete nodes in the graph, you need to have at least the following privileges:

                                          • Read Only access on the database.
                                          • Write access on the given collection.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • Returned in the following cases:

                                          • The graph cannot be found.
                                          • The collection is not part of the graph.
                                          • The edge to remove does not exist.

                                          This error also occurs if you try to run this operation as part of a Stream Transaction but the transaction ID specified in the x-arango-trx-id header is unknown to the server.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • This error occurs if you try to run this operation as part of a Stream Transaction that has just been canceled or timed out.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        • The If-Match header has been specified but the stored document’s revision is different.

                                            Response Body application/json object
                                          • The HTTP response status code.

                                          • A flag indicating that an error occurred.

                                          • A descriptive error message.

                                          • The ArangoDB error number for the error that occurred.

                                        Examples

                                        curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation/72111
                                        Show output