List a Space's activity - Spacefast Docs
List a Space's activity
Returns the activity events recorded against one Space, newest first. Page with cursor. since is raised to the owning team’s plan audit retention window when it reaches back further.
GET /v1/spaces/{spaceId}/activity
Authorization
Authorization Bearer token · header required
`Authorization: Bearer
or
Authorization Bearer token · header required
`Authorization: Bearer
Path parameters
spaceId string required
- min length 1
Query parameters
limit integer required
- min 1 · max 100 · default: 20
cursor string
- min length 1 · max length 4096
principalType string
- Allowed:
team,external
principalId string
- min length 1
actorType string
- Allowed:
user,api_key,partner_token,oauth_client,anonymous_claim,system
actorId string
- min length 1
code string
- min length 1
since string
- matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
until string
Responses
200 Response for status 200
$schemastringCanonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
dataobject[] requiredArray of
objectidstring requiredsequenceinteger required
Position in the tenant's event order. Feeds are sorted by it, highest first.
min 0 · max 9007199254740991
spaceIdstring | any requiredSpace the event concerns. Null when it concerns none.
Any of:
string
string- any
any
actorobject requiredtypestring requiredAllowed:
user,api_key,partner_token,oauth_client,anonymous_claim,systemidstring requiredIdentifier of the actor within its kind: a user ID, a grant ID for an API key or OAuth client, or the system identifier.
min length 1
codestring requiredmessagestring required
One sentence naming what happened, safe to show to a person.
detailsobject | any requiredFields specific to this event code. Null when the code carries none. Never a secret or a variable value.
Any of:
object -
object- any -anycreatedAtstringrequired ISO 8601 timestamp when the event was recorded.
paginationobject requirednextCursorstring | any requiredCursor for the next page. Null on the last page.
Any of:
string -
string- any -anyhasMoreboolean requiredTrue when another page exists.
default Error. Every 4xx and 5xx response is one RFC 9457 problem document served as `application/problem+json`.
Try it
Server
Base URL https://api.spacefast.com
Custom base URL Overrides the selected server when set.
Authorization
Bearer token
Parameters
spaceId path * limit query * cursor query principalType query—team external principalId query actorType query—user api_key partner_token oauth_client anonymous_claim system actorId query code query since query until query
Send
Request
curl -X GET "https://api.spacefast.com/v1/spaces/string/activity?limit=20" \
-H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch("https://api.spacefast.com/v1/spaces/string/activity?limit=20", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});
import requests
response = requests.get(
"https://api.spacefast.com/v1/spaces/string/activity?limit=20",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)
Response
200 default
{
"$schema": "http://example.com",
"data": [
{
"id": "string",
"sequence": 9007199254740991,
"spaceId": "string",
"actor": {
"type": "user",
"id": "string"
},
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
},
"createdAt": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"nextCursor": "string",
"hasMore": true
}
}
{
"$schema": "http://example.com",
"type": "string",
"title": "string",
"status": -9007199254740991,
"detail": "string",
"code": "string",
"pointer": "string",
"details": {
"property1": null,
"property2": null
},
"suggestions": [
"string"
],
"next": [
"string"
],
"requestId": "string"
}