Change feed
Read IdentityHound’s retained changes after a cursor, in order, as CloudEvents. Each event keeps who acted and for whom. Change feed retention explains how long the feed keeps changes and what happens when they expire.
Change feed explains what each event records and the feed’s guarantees. Sync records with the change feed processes pages and saves a cursor for the next run.
Paths are relative to https://api.agentpost.tools/v1/identity, and every request follows the API basics. Who may call explains each kind of caller.
Read the change feed
GET /events
Events after a cursor, and the next cursor.
- Who may call: Your server.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.events.read(query) - Pages:
limit, 1 to 500, default 100. A feed: every answer hasnext, to send asafter. Lists has the rule.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
after |
integer or string or string |
No | The seq to read after, or latest to start from now: no events, and next set to the newest seq. Start at 0, then pass each page’s next. Any integer or string, or "latest". |
limit |
integer |
No | The most events to answer with, from 1 to 500; 1–500; default 100. |
types |
string |
No | Full event types to keep, separated by commas. Without it, every type. |
Response
200 OK, with EventsResponse.
Errors
cursor_expired(410)trusted_caller_required(403)
Any operation can also answer with the codes Conventions lists.
The EventsResponse object
| Name | Type | Present | Description |
|---|---|---|---|
events |
object[] |
Always | |
events[]. |
string |
Always | A plain ULID, unique to the event. |
events[]. |
number |
Always | The event’s place in the project’s feed, from 1. Pass it as after to read the events after it. |
events[]. |
"1.0" |
Always | |
events[]. |
string |
Always | The full type, tools.agentpost.identity.<event>. |
events[]. |
"/identityhound" |
Always | |
events[]. |
string |
When set | The record the event is about. |
events[]. |
string |
Always | When the change was made. |
events[]. |
"application/json" |
Always | |
events[]. |
object |
Always | |
events[]. |
object |
Always | Who made the change, and for whom. |
events[]. |
object |
Always | Who made the request with its own credential: a principal’s ID, trusted_caller for your server’s secret key, or anonymous before sign-in. |
events[]. |
string |
Always | A principal ID, prn_…, or one of "trusted_caller" or "anonymous". |
events[]. |
object |
When set | The delegator, when the actor acted under a delegation. |
events[]. |
string |
Always | A principal ID, prn_…. |
events[]. |
string |
When set | The delegation the actor acted under, with a delegated token. |
events[]. |
string |
Always | How the actor called: with a session, an API key, a delegated token, or your server’s secret key; system for IdentityHound’s own changes, such as an expiry sweep. One of "session", "api_key", "delegated_token", "trusted_caller", or "system". |
events[]. |
string |
When set | The workspace the change is in, when it is in one. |
next |
number |
Always | Pass as after to continue. Always present. A full page gives its last event’s seq. A shorter page has caught up, so it gives the newest seq read, past any events a types filter skipped; after=latest gives the newest seq. |
Event types
GET /events returns these as CloudEvents. Each type is tools.agentpost.identity.<name>, and each event’s data.context says who acted and for whom.
principal.createdprincipal.importedprincipal.updatedprincipal.suspendedprincipal.reactivatedprincipal.deletedprincipal.upgradedprincipal.mergedauth.code_requestedauth.signed_upauth.signed_inauth.signed_outsession.revokedidentity.linkedidentity.removedconnection.createdconnection.needs_reauthconnection.token_issuedconnection.removedapi_key.createdapi_key.rotatedapi_key.revokedworkspace.createdworkspace.updatedworkspace.archivedmembership.addedmembership.role_changedmembership.suspendedmembership.reactivatedmembership.removedinvitation.createdinvitation.acceptedinvitation.revokedinvitation.expiredproject_role.assignedproject_role.removedresource_role.assignedresource_role.removedresource_role.expireddelegation.requesteddelegation.approveddelegation.denieddelegation.revokeddelegation.expireddelegated_token.issuedbundle.createdbundle.updatedbundle.retiredgrant.createdgrant.revokedgrant.expiredaccess.deniedconfig.updated