Arke
ReferenceAPI Reference

Graph

Graph traversal and path-finding

Find paths between entities

POST
/graph/paths

Authorization

bearerAuth
AuthorizationBearer <token>

Supabase JWT token

In: header

Query Parameters

expand?string

Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable

Value in"preview" | "full" | "none"

Request Body

application/json

source_pis*array<>

Starting entity PIs

Items1 <= items
target_pis*array<>

Target entity PIs

Items1 <= items
max_depth?integer

Maximum path depth (1-4)

Default4
Range1 <= value <= 4
direction?string

Relationship traversal direction

Default"both"
Value in"outgoing" | "incoming" | "both"
limit?integer

Maximum number of paths to return

Default100
Range1 <= value <= 1000

Response Body

application/json

application/json

curl -X POST "https://arke-v1.arke.institute/graph/paths" \  -H "Content-Type: application/json" \  -d '{    "source_pis": [      "01KE4ZY69F9R40E88PK9S0TQRQ"    ],    "target_pis": [      "01KE506KZGD8M2P1XK3VNQT4YR"    ]  }'
{
  "paths": [
    {
      "source_pi": "01KDETYWYWM0MJVKM8DK3AEXPY",
      "target_pi": "01KDETYWYWM0MJVKM8DK3AEXPY",
      "length": 0,
      "edges": [
        {
          "subject_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
          "subject_label": "Project Folder",
          "subject_type": "folder",
          "subject_preview": {
            "id": "01KE4ZY69F9R40E88PK9S0TQRQ",
            "type": "folder",
            "label": "Project Folder",
            "collection_pi": "01JCOLLECTION123456789ABCD",
            "description_preview": "Main project folder containing research documents...",
            "created_at": "2025-01-10T08:00:00.000Z",
            "updated_at": "2025-01-18T16:45:00.000Z"
          },
          "predicate": "contains",
          "object_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
          "object_label": "Research Paper.pdf",
          "object_type": "file",
          "object_preview": {
            "id": "01KE506KZGD8M2P1XK3VNQT4YR",
            "type": "file",
            "label": "Research Paper.pdf",
            "collection_pi": "01JCOLLECTION123456789ABCD",
            "description_preview": "Analysis of entity management patterns and best practices...",
            "created_at": "2025-01-15T10:00:00.000Z",
            "updated_at": "2025-01-20T14:30:00.000Z"
          }
        }
      ]
    }
  ],
  "truncated": true
}
{
  "error": "Validation failed",
  "details": {
    "issues": [
      {
        "path": [
          "properties",
          "label"
        ],
        "message": "Required"
      }
    ]
  }
}

Find reachable entities (exhaustive)

POST
/graph/reachable

Authorization

bearerAuth
AuthorizationBearer <token>

Supabase JWT token

In: header

Query Parameters

expand?string

Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable

Value in"preview" | "full" | "none"

Request Body

application/json

source_pis*array<>

Starting entity PIs

Items1 <= items
target_type*string

Target entity type to find

Length1 <= length
max_depth?integer

Maximum path depth (1-4)

Default4
Range1 <= value <= 4
direction?string

Relationship traversal direction

Default"both"
Value in"outgoing" | "incoming" | "both"
limit?integer

Maximum number of results to return

Default100
Range1 <= value <= 1000

Response Body

application/json

application/json

curl -X POST "https://arke-v1.arke.institute/graph/reachable" \  -H "Content-Type: application/json" \  -d '{    "source_pis": [      "01KE4ZY69F9R40E88PK9S0TQRQ"    ],    "target_type": "file"  }'
{
  "results": [
    {
      "source_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
      "target_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
      "target_label": "Research Paper.pdf",
      "target_type": "file",
      "length": 1,
      "edges": [],
      "target_preview": {
        "id": "01KE506KZGD8M2P1XK3VNQT4YR",
        "type": "file",
        "label": "Research Paper.pdf",
        "collection_pi": "01JCOLLECTION123456789ABCD",
        "description_preview": "Analysis of entity management patterns and best practices...",
        "created_at": "2025-01-15T10:00:00.000Z",
        "updated_at": "2025-01-20T14:30:00.000Z"
      }
    }
  ],
  "truncated": true
}
{
  "error": "Validation failed",
  "details": {
    "issues": [
      {
        "path": [
          "properties",
          "label"
        ],
        "message": "Required"
      }
    ]
  }
}

Get entity from graph

GET
/graph/entity/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Supabase JWT token

In: header

Path Parameters

id*string

Entity ID (ULID)

Match^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$

Query Parameters

expand?string

Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable

Value in"preview" | "full" | "none"

Response Body

application/json

application/json

curl -X GET "https://arke-v1.arke.institute/graph/entity/01KDETYWYWM0MJVKM8DK3AEXPY"
{
  "pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
  "type": "folder",
  "label": "Project Folder",
  "collection_pi": "01JCOLLECTION123456789ABCD",
  "created_at": "2025-01-10T08:00:00.000Z",
  "updated_at": "2025-01-18T16:45:00.000Z",
  "relationships": [
    {
      "direction": "outgoing",
      "predicate": "contains",
      "peer_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
      "peer_type": "file",
      "peer_label": "Research Paper.pdf",
      "properties": {},
      "peer_preview": {
        "id": "01KE506KZGD8M2P1XK3VNQT4YR",
        "type": "file",
        "label": "Research Paper.pdf",
        "collection_pi": "01JCOLLECTION123456789ABCD",
        "description_preview": "Analysis of entity management patterns and best practices...",
        "created_at": "2025-01-15T10:00:00.000Z",
        "updated_at": "2025-01-20T14:30:00.000Z"
      }
    }
  ]
}
{
  "error": "Entity not found"
}