This file covers deprecated v1 HTTP API. All the methods of v2 HTTP API is described in OpenAPI/Swagger spec and can be viewed by importing https://raw.githubusercontent.com/cayleygraph/cayley/master/docs/api/swagger.yml
URL into Swagger Editor or Swagger UI demo.
Cayley supports streaming to Gephi via GraphStream.
Unless otherwise noted, all URIs take a POST command.
POST Body: Javascript source code of the query
Response: JSON results, depending on the query.
POST Body: GraphQL query
Response: JSON results, depending on the query.
POST Body: JSON MQL query
Response: JSON results, with a query wrapper:
{"result": <JSON Result set>}
If the JSON is invalid or an error occurs:
{"error": "Error message"}
Result form:
{"nodes": [{"id" : integer,"tags": ["list of tags from the query"],"values": ["known values from the query"],"is_link_node": bool, // Does the node represent the link or the node (the oval shapes)"is_fixed": bool // Is the node a fixed starting point of the query}],​"links": [{"source": integer, // Node ID"target": integer, // Node ID"link_node": integer // Node ID}]}
POST Body: Javascript source code of the query
Response: JSON description of the last query executed.
POST Body: JSON MQL query
Response: JSON description of the query.
Responses come in the form
200 Success:
{"result": "Success message."}
400 / 500 Error:
{"error": "Error message."}
POST Body: JSON quads
[{"subject": "Subject Node","predicate": "Predicate Node","object": "Object node","label": "Label node" // Optional}] // More than one quad allowed.
Response: JSON response message
POST Body: Form-encoded body:
Key: NQuadFile
, Value: N-Quad file to write.
Response: JSON response message
Example:
curl http://localhost:64210/api/v1/write/file/nquad -F [email protected]
POST Body: JSON quads
[{"subject": "Subject Node","predicate": "Predicate Node","object": "Object node","label": "Label node" // Optional}] // More than one quad allowed.
Response: JSON response message.