Graphs

Create an edge

Create a new edge in the collection.

Note: Requires Read Only permissions on the GeoFabric and Write access on the collection.

post/_fabric/{fabric}/_api/graph/{graph}/edge/{edgeCollection}

Request

Path parameters

fabricstring string required

The name of the fabric.

graphstring string required

The name of the graph.

edgeCollectionstring string required

The name of the edge collection the edge belongs to.

Query parameters

returnNewboolean

If set to true, the response contains the complete new version of the document.

Request body

_fromstring required

The source vertex of this edge. Has to be valid within the used edge definition.

_tostring

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

Example request

{
  "_from": "sourceVertex",
  "_to": "destinationVertex"
}

Response

Successfully created the edge when waitForSync is enabled.

codeinteger

HTTP response code.

errorboolean required

Flag if there is an error in response. False for this response.

Example response

{
  "code": 201,
  "edge": {
    "_id": "edgeColltest020905135194uxprm/7050517",
    "_key": "7050517",
    "_rev": "_dsRmNZG--",
    "_from": "colltest020905135195vdbps/bbbb",
    "_to": "colltest020905135195vdbps/cccc"
  },
  "new": {
    "_id": "edgeColltest020905135194uxprm/7050517",
    "_key": "7050517",
    "_rev": "_dsRmNZG--",
    "_from": "colltest020905135195vdbps/bbbb",
    "_to": "colltest020905135195vdbps/eeee"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.