Skip to content
Directory & LifecycleMarkdown

Directory & Lifecycle API

Every endpoint of the directory on your realm's own host, by area, with what each one does and the page that covers it.

AvailableAPIRFC 7396, RFC 6902, RFC 9110

Every directory endpoint is on your realm’s own host, under https://foobar.cvyuh.com/api/v0/am, and takes a session in the x-cvyuh-token cookie. How to get one, and the conventions every call shares (paging, revisions, errors), are in Call the API. {type} is user, group, agent or a type of your own; {id} is an object’s id, such as maya.

Reads (GET, QUERY) need RealmViewer; every other call needs RealmOwner, or a privilege of your own that covers it (see Who may do what); the self-service calls need only the user’s own session. Lists page 20 at a time, at most 100; expand returns at most 10,000 links per attribute; a body may be about 2 MB. There’s no rate limit today. Every refusal answers { "code", "message", "detail" }: see When a call fails.

Users, groups, agents and your own types are all objects, at the same addresses.

MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}List and search the objects of a type, a page at a timeSearch and paging
QUERYhttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}The same search, with its parameters in a JSON bodySearch and paging
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}?id={id}Create an object; leave out id and the realm picks oneAdd and change users
GEThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}Read an object; ?expand= adds its linksAdd and change users
PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}Change the attributes you send: a merge patch, or a JSON Patch listAdd and change users
PUThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}Replace every attribute; with If-None-Match: *, createThe identity model
DELETEhttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}Delete an object and every link to itAdd and change users
GEThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}/historyEvery change to the object, newest firstThe identity model

The answer to a read or a write is the object: id, objectId, typeName, rev, attributes, createTime and updateTime, with rev also in the ETag header. A list answers data with page, pageSize, totalCount, totalPages, or hasMore and nextCursor when paging by cursor.

Group membership, agent ownership and every other link, made and read from either end.

MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}/relationships/{link}List an object’s links of one kind, such as a group’s member, paged and filteredAdd groups and members
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}/relationships/{link}Make a link, with { "targetId": "{id}" } and any link propertiesAdd groups and members
DELETEhttps://foobar.cvyuh.com/api/v0/am/objects/v1/{type}/{id}/relationships/{link}/{target id}Remove a linkAdd groups and members

A link answers 201 with { "_id", "property", "targetId", "rev" }, rev being the object’s new revision. A listed link is { "id", "edgeId", "properties" }: the far object’s id, the link’s own id, and the link’s properties.

MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/api/v0/am/types/v1List the realm’s types, paged and searchableThe identity model
POSThttps://foobar.cvyuh.com/api/v0/am/types/v1Define a type of your ownCustom types
GEThttps://foobar.cvyuh.com/api/v0/am/types/v1/{type}Read a type’s whole definition, with its revAttributes and validation
PUThttps://foobar.cvyuh.com/api/v0/am/types/v1/{type}Replace a type’s definition, with If-MatchAttributes and validation
GET, PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/identityBinding/identityBindingRead or change which types are users, groups and agentsYour own user type

A type is never patched (PATCH answers 405) and never deleted (DELETE answers 405).

Called with the user’s own session, for their own account.

MethodEndpointWhat it doesPage
POSThttps://foobar.cvyuh.com/api/v0/am/whoami/v1Who the caller is: profile, roles in the realm, and sessionSelf-service
GEThttps://foobar.cvyuh.com/api/v0/am/devices/v1The caller’s passkeys, authenticator apps and recovery codes; ?kind= for one kindSelf-service
DELETEhttps://foobar.cvyuh.com/api/v0/am/devices/v1/{id}Remove one of the caller’s passkeys or authenticator appsSelf-service

The apps and agents a user allowed are in the Customer Identity API.

MethodEndpointWhat it doesPage
POSThttps://foobar.cvyuh.com/api/v0/am/sessions/v1/endEnd every session a filter matches, such as a leaver’sOffboard a leaver
GEThttps://foobar.cvyuh.com/api/v0/am/sessions/v1List live sessions, filtered by userOffboard a leaver

Starting, moving and stopping a user are writes to their record and their links, above; see Joiners, movers and leavers.