Graph data
7. Documents (owner routes)
These session-token routes give the owner of a graph direct access to a node's uploaded files. Programs holding a live key use add_document and get_document instead (section 5).
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/graphs/{graphId}/documents/{nodeId} |
Fetch every file attached to a node, bytes included |
| DELETE | /v1/graphs/{graphId}/documents/{nodeId} |
Delete every file attached to a node |
Permitted callers: the owner of a personal graph; on an organisation graph, an owner or admin who can see the node in full. Anyone else receives 404 not_found.
GET response 200: {"documents": [ {"id", "nodeId", "name", "mediaType", "size", "dataBase64"} ]}.
DELETE response 200: {"deleted": 2} — the number of files removed; 0 when the node had none. The node itself is not deleted. There is no route to delete a single file of a node that has several.
Errors: 401 unauthorized, 404 not_found.