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
- 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.
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
Example request
{
"_from": "sourceVertex",
"_to": "destinationVertex"
}Response
Successfully created the edge when waitForSync is enabled.
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.