Shortest chain of links between two sets of notes (each `{"paths": [...]}` and/or
const url = 'https://example.com/datanotes/operations/graph_path/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"from_nodes":{},"to_nodes":{},"direction":null,"edges":null,"max_depth":null}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datanotes/operations/graph_path/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "from_nodes": {}, "to_nodes": {}, "direction": null, "edges": null, "max_depth": null }'Shortest chain of links between two sets of notes (each {"paths": [...]} and/or
{"table", "where"}): found, length and path: the steps (from, label, direction, to).
direction both by default; max_depth default 6 (max 10).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Done.
object
Links on the path; null when none was found.
The links, in order (empty when not found or from = to).
One link followed.
object
Note path the step starts at.
Edge label: the link column, or link for other links.
Out: from links to to; in: to links to from.
Note path reached.
Start note of the path (found only).
End note (found only).
Example
{ "via": [ { "direction": "out" } ]}Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Missing or wrong bearer token.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Unknown table, view, migration, note or folder.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Ambiguous table name: it matches several tables (paths or tables lists them).
object
The tables’ folders the name matches.
The qualified tables the name matches.
Example generated
{ "error": "example", "paths": [ "example" ], "tables": [ "example" ]}Unexpected error.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}