# 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 <key>\` with the Space key (\`sfc\_\` prefix) of an unclaimed Space. The same key is the fragment of the claim URL and the token in the Space's \`/\_\_/<key>\` sign-in URL.

or

`Authorization` Bearer token · header required

\`Authorization: Bearer <token>\` with an API key (\`sfa\_\` prefix), an OAuth access token, a session token, or a Space machine credential (\`sfm\_\` prefix).

### 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<date-time>

- 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<date-time>

### Responses

**200 Response for status 200**

- `$schema` string<uri>

- Canonical JSON Schema URL for this response body. The server also sends it in the \`Link: rel="describedby"\` response header.

- `data` object[] required

- Array of `object`

- `id` string required
  - `sequence` integer required

- Position in the tenant's event order. Feeds are sorted by it, highest first.

- min 0 · max 9007199254740991

- `spaceId` string | any required

- Space the event concerns. Null when it concerns none.

- Any of:

- string
    - `string`
    - any
    - `any`

- `actor` object required

- `type` string required

- Allowed: `user`, `api_key`, `partner_token`, `oauth_client`, `anonymous_claim`, `system`

- `id` string required

- Identifier 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

- `code` string required
    - `message` string required

- One sentence naming what happened, safe to show to a person.

- `details` object | any required

- Fields specific to this event code. Null when the code carries none. Never a secret or a variable value.

- Any of:

- object
        - `object`
        - any
        - `any`

- `createdAt` string<date-time> required

- ISO 8601 timestamp when the event was recorded.

- `pagination` object required

- `nextCursor` string | any required

- Cursor for the next page. Null on the last page.

- Any of:

- string
      - `string`
      - any
      - `any`

- `hasMore` boolean required

- True 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

```bash
curl -X GET "https://api.spacefast.com/v1/spaces/string/activity?limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```javascript
const response = await fetch("https://api.spacefast.com/v1/spaces/string/activity?limit=20", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  }
});
```

```python
import requests

response = requests.get(
    "https://api.spacefast.com/v1/spaces/string/activity?limit=20",
    headers={
        "Authorization": "Bearer YOUR_TOKEN"
    },
)
```

### Response

**200 default**

```json
{
  "$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
  }
}
```

```json
{
  "$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"
}
```
