API and MCP
Activity
Who did what in your organization and its projects
List activity
GET /api/v1/org/{orgId}/activity
Credentials: API token or dashboard sign-in.
The activity entries of this organization: what was done, by whom (actor), in which project, when (createdAt), with the details in data and, when known, traceId, which identifies the request behind the entry for Spice Labs support. A session sees organization-level entries and those of the projects it can reach; an API token sees only its own project's. Filter with projectId (or none for organization-level entries only), userId, and action or actions; availableActions in the answer lists the actions you can filter on. Sort with sortBy (createdAt or action) and sortDir (asc or desc); the default is newest first. limit caps a page at 1 to 10000 entries, 1000 by default. Pages are keyed by entry id: pass pagination.lastId as after for the next page, or pagination.firstId as before for the previous one, never both; hasMore says whether more entries lie beyond this page in the direction you paged, and total counts every entry that matches the filters. Requires org:view_activity_log.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
orgId required | path | string (uuid) | The organization's id. |
projectId | query | string (uuid) | |
userId | query | string (uuid) | |
action | query | string | |
actions | query | array of string | |
limit | query | string | |
sortBy | query | string | |
sortDir | query | string | |
after | query | string | |
before | query | string |
Responses
| Status | Description | Body |
|---|---|---|
200 | One page of activity entries with its cursors. | ActivityPage |
400 | A filter, sort or paging parameter is invalid, both cursors are given, or a cursor names no entry. | Error |
401 | The token is missing, expired, revoked or of the wrong kind. | Error |
403 | The token is valid but not allowed to do this. | Error |
404 | The project in projectId or the person in userId is not in your organization. | Error |
500 | A fault on our side. | Error |
Example
curl -X GET "https://api.spicelabs.io/api/v1/org/<orgId>/activity" \
-H "Authorization: Bearer $SPICE_API_TOKEN"