Graphs
Add edge definition
Adds an additional edge definition to the graph.
This edge definition has to contain a collection and an array of each from and to vertex 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. It is not possible to store a definition "e" from "v1" to "v2" in the one graph, and "e" from "v2" to "v1" in the other graph.
Note: Requires administrator permissions.
post/_fabric/{fabric}/_api/graph/{graph}/edge
Request
- The document declares no server URL.
- Auth
- API key in header Authorization
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
fabricstring string required
The name of the fabric.
graphstring string required
The name of the graph.
Request body
Example request
{
"collection": "edgeCollectionTest",
"from": [
"sourceVertex"
],
"to": [
"destinationVertex"
]
}Response
Successfully added edge when waitForSync is enabled.
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.