Graphs

Replace an edge definition

Change a specified edge definition.

This modifies all occurrences of this definition in all graphs known to your GeoFabric.

Note: Requires administrator permissions.

put/_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

dropCollectionsboolean

If set to true, also removes the collection. Collection is only removed if it is not used in other graphs.

Request body

collectionstring required

The name of the edge collection to be used.

fromstring[]

One or many vertex collections that can contain source vertices.

tostring[]

One or many vertex collections that can contain target vertices.

Example request

{
  "collection": "edgeCollectionTest",
  "from": [
    "sourceVertex"
  ],
  "to": [
    "destinationVertex"
  ]
}

Response

Successfully replaced 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,
  "graph": {
    "_id": "_graphs/graph1",
    "_key": "graph1",
    "_rev": "_drxzsai--_",
    "edgedefinitions": [
      {
        "collection": "edgeName",
        "from": [
          "sourceNode"
        ],
        "to": [
          "destinationNode"
        ]
      }
    ],
    "name": "graph1",
    "orphanCollections": [
      "emptyNode"
    ]
  }
}

Changes

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