API

Compass provides a Connect RPC API supporting both HTTP and gRPC protocols. API definitions are maintained in raystack/proton.

Endpoints

Entity

MethodEndpointDescription
GETGetAllEntitiesList entities, filtered by types, source, or query
GETGetEntityByIDGet entity by ID or URN
POSTUpsertEntityCreate or update an entity
DELETEDeleteEntityDelete by URN
GETSearchEntitiesKeyword, semantic, or hybrid search
GETSuggestEntitiesAutocomplete suggestions
GETGetEntityTypesList types with counts

Context & Impact

MethodEndpointDescription
GETGetEntityContextContext subgraph with multi-hop traversal
GETGetEntityImpactDownstream blast radius

Edge

MethodEndpointDescription
POSTUpsertEdgeCreate or update an edge
GETGetEdgesGet edges for an entity
DELETEDeleteEdgeDelete an edge

Document

MethodEndpointDescription
POST/v1/documentsCreate or update a document
GET/v1/documentsList documents
GET/v1/documents/{id}Get document by ID
DELETE/v1/documents/{id}Delete a document
GET/v1/entities/{urn}/documentsGet documents for an entity

Star

MethodEndpointDescription
POSTStarEntityStar an entity
DELETEUnstarEntityUnstar an entity
GETGetUserStarredEntitiesList user's starred entities
GETGetMyStarredEntitiesList current user's stars
GETGetMyStarredEntityCheck if current user starred an entity
GETGetEntityStargazersList stargazers for an entity

Namespace

MethodEndpointDescription
POSTCreateNamespaceCreate a namespace
GETGetNamespaceGet by ID or name
PATCHUpdateNamespaceUpdate a namespace
GETListNamespacesList all namespaces

Health

MethodPathDescription
GET/pingReturns "pong"

Authentication

Every request requires an identity header. The header key is configurable (default: Compass-User-UUID). An optional email header (Compass-User-Email) can also be provided.

Namespace isolation is controlled via the x-namespace header. If not provided, requests use the default namespace. Namespace can also be passed as a namespace_id claim in a JWT bearer token.

Protocol

Compass uses Connect RPC. You can call it using:

  • Connect protocol — HTTP POST with JSON or Protobuf
  • gRPC protocol — HTTP/2 with Protobuf
  • gRPC-Web — For browser clients

Example:

curl -X POST http://localhost:8080/raystack.compass.v1beta1.CompassService/SearchEntities \
  -H "Content-Type: application/json" \
  -H "Compass-User-UUID: user@example.com" \
  -d '{"text": "revenue", "mode": "hybrid"}'