Graphs
Create a graph
To create a graph, you must name the graph and define its edges.
Note: Requires Administrator permissions to access the GeoFabric and Read Only access on every collection used within this graph.
post/_fabric/{fabric}/_api/graph
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.
Request body
Example request
{
"edgeDefinitions": [
{
"collection": "edgeName",
"from": [
"sourceNode"
],
"to": [
"destinationNode"
]
}
],
"name": "exampleGraph"
}Response
Successfully created the graph 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.