Base URL: http://127.0.0.1:8080 (default)
Environment:
MORPHEUS_HTTP_ADDR: bind address (default127.0.0.1:8080)MORPHEUS_HTTP_ADMIN_TOKEN: when set, admin endpoints requireAuthorization: Bearer <token>MORPHEUS_HTTP_CORS=permissive: enable permissive CORS
Success response:
{ "data": { ... } }Error response:
{ "code": "...", "message": "..." }Cell, vertex, edge IDs are base58-encoded 16-byte IDs. The server returns base58 strings for IDs.
Graph vertex data and edge body use JSON objects (maps). Cell data accepts a generic HttpValue.
{ "k": "v" }[1, 2, 3]Use {"$type": "...", "value": ...} for non-JSON or specific types.
Examples:
{"$type":"u64","value":123}
{"$type":"id","value":"5QqkMJFr5s7J9wB8Q2kN1J"}
{"$type":"bytes","value":[1,2,3]}
{"$type":"u32[]","value":[1,2,3]}Supported $type values:
i8,i16,i32,i64,u8,u16,u32,u64,f32,f64char,string,bool,naid(base58 string value)bytes,small_bytes(array of byte numbers)map,arraybool[],char[],i8[],i16[],i32[],i64[],u8[],u16[],u32[],u64[],f32[],f64[],pos2d32[],pos2d64[],pos3d32[],pos3d64[],id[],string[],bytes[],small_bytes[]
Notes:
- Untagged numbers are interpreted as
i64,u64, orf64depending on JSON parsing. iddecoding also accepts{ "higher": <u64>, "lower": <u64> }for backward compatibility, but responses return base58 strings.
GET /v1/health
Response:
{ "data": {} }GET /v1/graph/schemas
GET /v1/graph/schemas/:name
POST /v1/graph/schemas (admin)
Request:
{
"id": 0,
"name": "my_vertex",
"schema_type": "Vertex",
"key_field": null,
"fields": [],
"is_dynamic": true
}Edge schema example:
{
"name": "my_edge",
"schema_type": {
"Edge": {
"edge_type": "Directed",
"has_body": true
}
},
"fields": [],
"is_dynamic": true
}DELETE /v1/graph/schemas/:name (admin)
GET /v1/cell/schemas
GET /v1/cell/schemas/:name
POST /v1/cell/schemas (admin)
Request:
{
"id": 0,
"name": "my_cell",
"key_field": null,
"fields": [],
"is_dynamic": true,
"is_scannable": false
}DELETE /v1/cell/schemas/:name (admin)
POST /v1/graph/vertices (admin)
Request by schema name:
{
"schema_name": "my_vertex",
"data": {}
}Request by schema id:
{
"schema_id": 42,
"data": {},
"id": "5QqkMJFr5s7J9wB8Q2kN1J"
}GET /v1/graph/vertices/:id
DELETE /v1/graph/vertices/:id (admin)
POST /v1/graph/edges (admin)
Request:
{
"from_id": "5QqkMJFr5s7J9wB8Q2kN1J",
"to_id": "3Yv8v4Cw1W5Hk9p2LxQw9Q",
"schema_name": "my_edge",
"body": {}
}GET /v1/graph/vertices/:id/edges?schema=<name-or-id>&direction=outbound|inbound|undirected
All cell CRUD endpoints require admin token when MORPHEUS_HTTP_ADMIN_TOKEN is set.
GET /v1/cells/:id
POST /v1/cells/:id
PUT /v1/cells/:id
DELETE /v1/cells/:id
Request (POST/PUT):
{
"schema_id": 123,
"data": {}
}These map to graph schema reads:
GET /v1/schemasGET /v1/schemas/:name