Skip to content

Entity Management API

DRAFT — Internal Developer Use Only

This API reference is for internal development teams.

Overview

What it is: The Entity Management API provides low-level access to the entity index, which tracks all discovered identities, accounts, groups, and their relationships (edges). This API supports creating index stores, querying indexed entities with filtering and pagination, and managing edges between entities.

Source: src/entman/rest/rest.go

Base Path

/internal/v1/entity/index

Authentication

All endpoints require JWT cookie or API token authentication.

Endpoints

MethodPathDescriptionAuth required
POST/internal/v1/entity/index/storeCreate a new entity index storeJWT + API token
POST/internal/v1/entity/index/store/queryQuery entity index entries with filteringJWT + API token
POST/internal/v1/entity/index/edge/addAdd relationship edgesJWT + API token
POST/internal/v1/entity/index/edge/delDelete relationship edgesJWT + API token
POST/internal/v1/entity/index/entity/addAdd entities to the indexJWT + API token
POST/internal/v1/entity/index/entity/delDelete entities from the indexJWT + API token

POST /internal/v1/entity/index/store

Create a new entity mapper store. A store represents an indexed view of entities at a specific point in time, used for mapping operations.

Request:

http
POST /internal/v1/entity/index/store
Content-Type: application/json
Authorization: Bearer <token>
json
{
  "id": "store-uuid",
  "viewTime": 1707700800000
}

Request fields:

FieldTypeDescription
idstringStore identifier
viewTimeint64Point-in-time timestamp (ms) for the entity snapshot

Response (200): Returns the created MapperStore with populated replication node metadata.


POST /internal/v1/entity/index/store/query

Query entities in the index store with filtering, pagination, and mapping status information.

Request:

http
POST /internal/v1/entity/index/store/query
Content-Type: application/json
Authorization: Bearer <token>
json
{
  "id": "store-uuid",
  "type": "identity.user",
  "skip": 0,
  "limit": 100,
  "filter": {
    "search": "john",
    "all": false,
    "isMappedCurrent": true,
    "isMappedOther": false,
    "isUnmapped": false
  },
  "mappedTo": "edge.identity.account",
  "tombstoned": false,
  "classifications": true,
  "mappingRules": false
}

Query fields:

FieldTypeDescription
idstringStore ID to query
typestringEntity type filter (e.g., identity.user, identity.group)
skipint64Number of entries to skip (pagination offset)
limitint64Maximum entries to return (default: 100)
filter.searchstringFree-text search across entity fields
filter.allboolReturn all entities regardless of mapping status
filter.isMappedCurrentboolInclude entities mapped in the current store
filter.isMappedOtherboolInclude entities mapped in other stores
filter.isUnmappedboolInclude unmapped entities only
mappedTostringFilter by outgoing edge type
mappedFromstringFilter by incoming edge type
uniqueIdstringGet a specific entity by unique ID
tombstonedboolInclude tombstoned (soft-deleted) entries
tombstonedMappingsboolInclude tombstoned mappings
classificationsboolInclude classification data
mappingRulesboolInclude matching mapping rules

Response (200):

json
{
  "total": 4521,
  "last": 100,
  "mapped": 4200,
  "unmapped": 321,
  "entry": [
    {
      "id": 1,
      "dataSourceId": "ds-uuid",
      "dataSource": "Corporate AD",
      "uniqueId": "acct-uuid",
      "entityType": "identity.user",
      "entitySearch": "john doe jdoe",
      "platform": "Active Directory",
      "entity": { },
      "mapping": [
        {
          "uniqueId": "owner-uuid",
          "edgeType": "edge.identity.account",
          "time": 1707700800000,
          "tombstoned": false
        }
      ],
      "mapped": true,
      "tombstoned": false,
      "time": 1707700800000,
      "mappings": 1
    }
  ]
}

Response fields:

FieldTypeDescription
totalint64Total matching entries
lastint64Index of the last returned entry
mappedint64Count of mapped entries matching the filter
unmappedint64Count of unmapped entries matching the filter
entry[].entityobjectThe full entity data (deserialized from protobuf)
entry[].mappingarrayActive edge mappings for this entity

POST /internal/v1/entity/index/edge/add

Add relationship edges between entities in the index. Edges represent connections like account-to-owner mappings or group memberships.

Request:

http
POST /internal/v1/entity/index/edge/add
Content-Type: application/json
Authorization: Bearer <token>
json
{
  "id": "store-uuid",
  "type": "edge.identity.account",
  "edge": [
    { "from": "owner-uuid-1", "to": "account-uuid-1" },
    { "from": "owner-uuid-1", "to": "account-uuid-2" }
  ]
}

Request fields:

FieldTypeDescription
idstringStore ID
typestringEdge type (e.g., edge.identity.account, edge.identity.manager)
edge[].fromstringSource entity unique ID
edge[].tostringTarget entity unique ID

Response (200): Returns the same EdgeRequest structure confirming the added edges.


POST /internal/v1/entity/index/edge/del

Remove relationship edges from the entity index. Uses the same request structure as add edges.

Request:

http
POST /internal/v1/entity/index/edge/del
Content-Type: application/json
Authorization: Bearer <token>
json
{
  "id": "store-uuid",
  "type": "edge.identity.account",
  "edge": [
    { "from": "owner-uuid-1", "to": "account-uuid-1" }
  ]
}

Response (200): Returns the EdgeRequest confirming the deleted edges.


POST /internal/v1/entity/index/entity/add

Add entities to the index store. Entities are serialized from their protobuf definitions.

Request:

http
POST /internal/v1/entity/index/entity/add
Content-Type: application/json
Authorization: Bearer <token>
json
{
  "id": "store-uuid",
  "type": "identity.user",
  "entity": [
    {
      "id": "entity-uuid-1",
      "entity": {
        "displayName": "John Doe",
        "email": "john.doe@company.com"
      }
    }
  ]
}

Request fields:

FieldTypeDescription
idstringStore ID
typestringEntity type (looked up via protobuf registry)
entity[].idstringEntity unique ID
entity[].entityobjectEntity data matching the protobuf schema for the type

Response (200): Returns the EntityRequest confirming the added entities.


POST /internal/v1/entity/index/entity/del

Remove entities from the index store.

Request:

http
POST /internal/v1/entity/index/entity/del
Content-Type: application/json
Authorization: Bearer <token>
json
{
  "id": "store-uuid",
  "type": "identity.user",
  "entity": [
    { "id": "entity-uuid-1" }
  ]
}

Response (200): Returns the EntityRequest confirming the deleted entities.


Error Responses

StatusDescription
400Invalid request body, missing required fields, or unknown entity type
403Authentication failed or insufficient permissions
404Store or entity not found
500Internal server error

Hydden Documentation and Training Hub