# Activity

> The human-readable activity feed and the hash-chained audit log.

The human-readable activity feed and the hash-chained audit log.

| Operation | Method and path |
| --- | --- |
| [Activity feed](#activity-feed) | `GET /v1/workspaces/{workspace}/activity` |
| [Audit log (hash-chained)](#audit-log-hash-chained) | `GET /v1/workspaces/{workspace}/audit-events` |

## Activity feed

```http
GET /v1/workspaces/{workspace}/activity
```

Every action, including agent actions attributed "via agent X". Filter `actor_type=agent` for the agent timeline.

- **Operation:** `listActivity`
- **Scopes:** `audit:read`
- **Paginated:** `?limit=` and `?cursor=`

**Parameters**

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `workspace` * | path | string | Workspace id (`ws_…`) or slug. |
| `project` | query | string |  |
| `actor_type` | query | `user`, `agent`, `system`, `ai_ops`, `github` |  |
| `agent_token` | query | string | Agent token id. |
| `since` | query | string (date-time) |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| `200` OK | A page of ActivityItem objects. | [ActivityItemList](/docs/api/objects/activity-item-list/) |

**Errors:** `400`, `401`, `403`, `404`, `429`, `500`, as [problem+json](/errors/) with a stable `code`.

**Example**

```bash
curl https://api.guv.dev/v1/workspaces/acme/activity \
  -H "Authorization: Bearer $GUV_TOKEN"
```

**Example response**

```json
{
  "data": [
    {
      "id": "evt_01jbx2m9k7q4r8t5v6w3y0z1pr",
      "occurred_at": "2026-10-22T13:05:00Z",
      "actor": {
        "type": "agent",
        "id": "tok_01jbx2m9k7q4r8t5v6w3y0z1tk",
        "display": "Stewart Webb via agent claude-code-on-stewart-laptop",
        "via_agent": {
          "id": "tok_01jbx2m9k7q4r8t5v6w3y0z1tk",
          "name": "claude-code-on-stewart-laptop"
        },
        "on_behalf_of": {
          "id": "usr_01jbx2m9k7q4r8t5v6w3y0z1us",
          "display": "Stewart Webb"
        }
      },
      "action": "deployment.create",
      "summary": "Stewart Webb via agent claude-code-on-stewart-laptop deployed web to staging",
      "project": {
        "type": "service",
        "id": "svc_01jbx2m9k7q4r8t5v6w3y0z1sv",
        "name": "web",
        "url": "/v1/projects/primecarers/services/web"
      },
      "environment": "string",
      "resource": {
        "type": "service",
        "id": "svc_01jbx2m9k7q4r8t5v6w3y0z1sv",
        "name": "web",
        "url": "/v1/projects/primecarers/services/web"
      },
      "outcome": "success",
      "operation_id": "string",
      "approval_id": "string"
    }
  ],
  "next_cursor": "string",
  "has_more": false
}
```

## Audit log (hash-chained)

```http
GET /v1/workspaces/{workspace}/audit-events
```

Raw audit events in chain order. `Accept: application/x-ndjson` streams an export (Business plan).

- **Operation:** `listAuditEvents`
- **Scopes:** `audit:read`
- **Paginated:** `?limit=` and `?cursor=`

**Parameters**

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `workspace` * | path | string | Workspace id (`ws_…`) or slug. |
| `from_seq` | query | integer |  |
| `since` | query | string (date-time) |  |
| `action` | query | string |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| `200` OK | A page of AuditEvent objects. | [AuditEventList](/docs/api/objects/audit-event-list/) |

**Errors:** `400`, `401`, `403`, `404`, `429`, `500`, as [problem+json](/errors/) with a stable `code`.

**Example**

```bash
curl https://api.guv.dev/v1/workspaces/acme/audit-events \
  -H "Authorization: Bearer $GUV_TOKEN"
```

**Example response**

```json
{
  "data": [
    {
      "id": "evt_01jbx2m9k7q4r8t5v6w3y0z1pr",
      "chain": "string",
      "chain_seq": 1,
      "occurred_at": "2026-10-22T13:05:00Z",
      "actor": {
        "type": "agent",
        "id": "tok_01jbx2m9k7q4r8t5v6w3y0z1tk",
        "display": "Stewart Webb via agent claude-code-on-stewart-laptop",
        "via_agent": {
          "id": "tok_01jbx2m9k7q4r8t5v6w3y0z1tk",
          "name": "claude-code-on-stewart-laptop"
        },
        "on_behalf_of": {
          "id": "usr_01jbx2m9k7q4r8t5v6w3y0z1us",
          "display": "Stewart Webb"
        }
      },
      "action": "string",
      "resource": {
        "type": "service",
        "id": "svc_01jbx2m9k7q4r8t5v6w3y0z1sv",
        "name": "web",
        "url": "/v1/projects/primecarers/services/web"
      },
      "project_id": "string",
      "outcome": "success",
      "request_id": "string",
      "ip": "string",
      "user_agent": "string",
      "data": {},
      "prev_hash": "string",
      "hash": "string"
    }
  ],
  "next_cursor": "string",
  "has_more": false
}
```
