> For the complete documentation index, see [llms.txt](https://docs.inrupt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inrupt.com/ess/services/service-platform-management/activity-log.md).

# Activity Log

{% hint style="success" %}
Added in version 3.3.0
{% endhint %}

The Activity Log API lets applications retrieve recent activity for an authenticated user's account, which can be used to build features like an in-app activity feed. Activities are presented using the [W3C Activity Streams](https://www.w3.org/TR/activitystreams-core/) format and served as paginated collections. Activities are scoped to the authenticated user's account and are automatically retained for a configurable window (default 30 days).

{% hint style="info" %}
Activity Log events may look similar to [ESS Audit events](/ess/services/service-auditing.md) but they are not the same. The Activity Log API is meant to power **user-facing** features (e.g. an in-app activity feed), while Audit events are **operator-facing**, used for system-level auditing and compliance, and should never be exposed to end users.
{% endhint %}

## Endpoints

The Activity Log endpoints are hosted on the Platform Management service at `https://platform.<ESS Domain>`.

### List Activities

Retrieve a paginated list of activities for the authenticated user's account.

#### Input

| Field         | Value                                                  |
| ------------- | ------------------------------------------------------ |
| Endpoint      | **`https://platform.{ESS Domain}/account/activities`** |
| Method        | **`GET`**                                              |
| Authorization | ESS Access Token                                       |

#### Query Parameters

| Parameter  | Required | Description                                                                              |
| ---------- | -------- | ---------------------------------------------------------------------------------------- |
| `category` | No       | Filter by category: `Resource`, `Access`, `Account`, `Notification`, `DataView`, `Purge` |
| `name`     | No       | Filter by event name (e.g. `resource-created`)                                           |
| `from`     | No       | Start of time range (ISO 8601 timestamp)                                                 |
| `to`       | No       | End of time range (ISO 8601 timestamp)                                                   |
| `pageSize` | No       | Number of items per page. Default `25`, max `100`                                        |
| `cursor`   | No       | Pagination cursor from a previous response's `next` link                                 |

#### Example Request

```http
GET /account/activities?category=Resource&pageSize=10 HTTP/1.1
Host: platform.example.com
Authorization: Bearer <ess-access-token>
```

#### Output

The response is a W3C Activity Streams `OrderedCollectionPage`. The `orderedItems` array contains the activity objects. If more results are available, the response includes a `next` link with a cursor for the next page.

#### Example Response

```http
HTTP/1.1 200 OK
Content-Type: application/json
```

```json
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "OrderedCollectionPage",
  "orderedItems": [
    {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": ["Activity", "Create"],
      "name": "resource-created",
      "id": "urn:uuid:a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "published": "2026-08-30T14:22:00Z",
      "summary": "Resource has been created",
      "category": "Resource",
      "actor": [
        {
          "id": "urn:ess:agent:01JXYZ1234ABCDEF5678GHIJ90",
          "type": "Agent"
        }
      ],
      "object": [
        {
          "id": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sc/01JABC1234DEF5678GHI90JKLM",
          "url": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sp/documents/report.ttl",
          "type": "Resource"
        }
      ],
      "origin": [
        {
          "id": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sp/",
          "type": "Storage"
        }
      ]
    },
    {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": ["Activity", "Create"],
      "name": "access-grant-created",
      "id": "urn:uuid:b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "published": "2026-08-30T14:20:00Z",
      "summary": "Access Grant has been created",
      "category": "Access",
      "actor": [
        {
          "id": "urn:ess:agent:01JXYZ1234ABCDEF5678GHIJ90",
          "type": "Agent"
        }
      ],
      "object": [
        {
          "id": "https://vc.example.com/vc/01JABC1234DEF5678GHI90JKLM",
          "type": "AccessGrant"
        }
      ],
      "target": [
        {
          "id": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sc/01JABC1234DEF5678GHI90JKLM",
          "type": "Resource"
        },
        {
          "id": "urn:ess:agent:01JABCDEF1234567890GHIJKLM",
          "name": "grantee",
          "type": "Agent"
        }
      ],
      "origin": [
        {
          "id": "urn:ess:agent:01JXYZ1234ABCDEF5678GHIJ90",
          "name": "grantor",
          "type": "Agent"
        }
      ]
    }
  ],
  "next": "https://platform.example.com/account/activities?category=Resource&pageSize=10&cursor=MTcyNTAyMzIwMHwwfGExYjJjM2Q0"
}
```

#### Error Responses

| Status | Description              |
| ------ | ------------------------ |
| `400`  | Invalid query parameters |
| `401`  | Not authenticated        |

### Get Activity

Retrieve a single activity by its identifier.

#### Input

| Field         | Value                                                       |
| ------------- | ----------------------------------------------------------- |
| Endpoint      | **`https://platform.{ESS Domain}/account/activities/{id}`** |
| Method        | **`GET`**                                                   |
| Authorization | ESS Access Token                                            |

#### Example Request

```http
GET /account/activities/urn:uuid:a1b2c3d4-e5f6-7890-abcd-ef1234567890 HTTP/1.1
Host: platform.example.com
Authorization: Bearer <ess-access-token>
```

#### Example Response

```http
HTTP/1.1 200 OK
Content-Type: application/json
```

```json
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": ["Activity", "Create"],
  "name": "resource-created",
  "id": "urn:uuid:a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "published": "2026-08-30T14:22:00Z",
  "summary": "Resource has been created",
  "category": "Resource",
  "actor": [
    {
      "id": "urn:ess:agent:01JXYZ1234ABCDEF5678GHIJ90",
      "type": "Agent"
    }
  ],
  "object": [
    {
      "id": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sc/01JABC1234DEF5678GHI90JKLM",
      "url": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sp/documents/report.ttl",
      "type": "Resource"
    }
  ],
  "origin": [
    {
      "id": "https://storage.example.com/01JXYZ1234ABCDEF5678GHIJ90/sp/",
      "type": "Storage"
    }
  ]
}
```

#### Error Responses

| Status | Description        |
| ------ | ------------------ |
| `401`  | Not authenticated  |
| `404`  | Activity not found |

## Activity Structure

Every activity object shares the following common fields:

| Field            | Description                                                                                                                                                                   |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`@context`**   | Always `"https://www.w3.org/ns/activitystreams"`                                                                                                                              |
| **`type`**       | Array of types. One of `["Activity", "Create"]`, `["Activity", "Update"]`, `["Activity", "Delete"]`, or `["Activity", "Read"]`                                                |
| **`id`**         | Unique activity identifier                                                                                                                                                    |
| **`name`**       | Event name string (e.g. `"resource-created"`). See [Event Types](#event-types) below for the full list.                                                                       |
| **`published`**  | ISO 8601 timestamp of when the activity occurred                                                                                                                              |
| **`summary`**    | Human-readable description of the activity                                                                                                                                    |
| **`category`**   | One of `"Resource"`, `"Access"`, `"Account"`, `"Notification"`, `"DataView"`, `"Purge"`                                                                                       |
| **`actor`**      | The agent who performed the action. Each actor object contains a `type` (string) and `id` (URN) field. Not present on all events (e.g. system-initiated resource operations). |
| **`object`**     | Primary object of the activity (varies by event type)                                                                                                                         |
| **`target`**     | Target of the activity, where applicable                                                                                                                                      |
| **`origin`**     | Origin or source of the activity, where applicable                                                                                                                            |
| **`instrument`** | Instrument used in the activity, where applicable                                                                                                                             |

Fields such as `actor`, `object`, `target`, `origin`, and `instrument` are omitted from the response when they have no value for a given event.

## Event Types

The Activity Log records the following event types across six categories.

### Resource Events

Activities related to resources in a user's storage.

| Event Name         | Activity Type            | object             | origin       |
| ------------------ | ------------------------ | ------------------ | ------------ |
| `resource-created` | `["Activity", "Create"]` | Resource (id, url) | Storage (id) |
| `resource-updated` | `["Activity", "Update"]` | Resource (id, url) | Storage (id) |
| `resource-deleted` | `["Activity", "Delete"]` | Resource (id, url) | Storage (id) |
| `resource-read`    | `["Activity", "Read"]`   | Resource (id, url) | Storage (id) |

{% hint style="info" %}
`resource-read` events only appear in the Activity Log if the Pod Storage service is configured to produce them. See the **`INRUPT_STORAGE_AUDIT_RESOURCE_READ_ENABLED`** configuration for the [Pod Storage Service](/ess/services/service-pod-management/service-pod-storage.md).
{% endhint %}

### Access Events

Activities related to [Access Grants, Access Requests, and Access Denials](/ess/services/service-access-grant.md). These events are split into write and read operations.

**Write operations:**

| Event Name               | Activity Type            | object        | target                    | origin        |
| ------------------------ | ------------------------ | ------------- | ------------------------- | ------------- |
| `access-grant-created`   | `["Activity", "Create"]` | AccessGrant   | Resources + grantee Agent | grantor Agent |
| `access-grant-deleted`   | `["Activity", "Delete"]` | AccessGrant   | Resources + grantee Agent | grantor Agent |
| `access-grant-revoked`   | `["Activity", "Update"]` | AccessGrant   | Resources + grantee Agent | grantor Agent |
| `access-request-created` | `["Activity", "Create"]` | AccessRequest | Resources + grantee Agent | grantor Agent |
| `access-request-deleted` | `["Activity", "Delete"]` | AccessRequest | Resources + grantee Agent | grantor Agent |
| `access-denial-created`  | `["Activity", "Create"]` | AccessDenial  | Resources + grantee Agent | grantor Agent |
| `access-denial-deleted`  | `["Activity", "Delete"]` | AccessDenial  | Resources + grantee Agent | grantor Agent |

**Read operations:**

| Event Name            | Activity Type          | object        |
| --------------------- | ---------------------- | ------------- |
| `access-grant-read`   | `["Activity", "Read"]` | AccessGrant   |
| `access-request-read` | `["Activity", "Read"]` | AccessRequest |
| `access-denial-read`  | `["Activity", "Read"]` | AccessDenial  |

Read operations do not include `target` or `origin`.

### Account Events

Activities related to [account lifecycle operations](/ess/services/service-platform-management/platform-management-api.md). The `object` contains the entities involved in the operation — which may include any combination of Agent, WebID, and Storage. When the affected user's Agent is not already in `object`, it appears in `target` to indicate which account the operation relates to.

| Event Name                    | Activity Type            | object                       | target |
| ----------------------------- | ------------------------ | ---------------------------- | ------ |
| `account-created`             | `["Activity", "Create"]` | Agent, WebID, and/or Storage |        |
| `account-updated`             | `["Activity", "Update"]` | WebID or Storage             | Agent  |
| `admin-account-created`       | `["Activity", "Create"]` | Agent                        |        |
| `admin-account-activated`     | `["Activity", "Update"]` | Agent, WebID, and Storage    |        |
| `admin-account-deprovisioned` | `["Activity", "Delete"]` | Agent, WebID, and/or Storage |        |

### Notification Events

Activities related to [webhook subscriptions](/ess/services/service-notification.md).

| Event Name             | Activity Type            | object       | target      |
| ---------------------- | ------------------------ | ------------ | ----------- |
| `subscription-created` | `["Activity", "Create"]` | Subscription | Resource(s) |
| `subscription-deleted` | `["Activity", "Delete"]` | Subscription | Resource(s) |

### Data View Events

Activities related to [Data View definitions and bindings](/ess/services/service-pod-management/data-views-api.md).

| Event Name                | Activity Type            | object                    | origin   | instrument     |
| ------------------------- | ------------------------ | ------------------------- | -------- | -------------- |
| `view-definition-created` | `["Activity", "Create"]` | ViewDefinition (id, name) |          |                |
| `view-definition-deleted` | `["Activity", "Delete"]` | ViewDefinition (id, name) |          |                |
| `view-binding-created`    | `["Activity", "Create"]` | ViewResource (id)         | Resource | ViewDefinition |

### Purge Events

Activities related to [account data deletion operations](/ess/services/service-platform-management/purger-service.md). The `object` contains the purged Agent plus any associated Storage and WebID entries. Purge detail objects (such as phase information or failure details) may also appear in `object`.

| Event Name        | Activity Type            | object                       | instrument |
| ----------------- | ------------------------ | ---------------------------- | ---------- |
| `purge-started`   | `["Activity", "Create"]` | Agent, Storage, and/or WebID |            |
| `purge-completed` | `["Activity", "Update"]` | Agent, Storage, and/or WebID |            |
| `purge-failed`    | `["Activity", "Update"]` | Agent, Storage, and/or WebID |            |

{% hint style="info" %}
`purge-started` and `purge-failed` appear in the affected user's own Activity Log, since the account still exists when those events fire. `purge-completed` does not appear there — by the time it fires, the account no longer exists to query it. Instead, `purge-completed` appears in the Activity Log of the **admin Agent who performed the purge**.
{% endhint %}

## Configuration

#### INRUPT\_PLATFORM\_ACTIVITY\_RETENTION\_WINDOW

Duration to retain activity records before automatic deletion. Uses ISO 8601 duration format.

**Default**: `P30D` (30 days)

```bash
INRUPT_PLATFORM_ACTIVITY_RETENTION_WINDOW=P30D
```

#### INRUPT\_PLATFORM\_ACTIVITY\_RETENTION\_TASK\_EVERY

Duration between activity cleanup task executions. Uses ISO 8601 duration format.

**Default**: `PT6H` (every 6 hours)

```bash
INRUPT_PLATFORM_ACTIVITY_RETENTION_TASK_EVERY=PT6H
```

#### INRUPT\_PLATFORM\_ACTIVITY\_RETENTION\_TASK\_DELAYED

Initial delay before the first cleanup task runs after service startup. Uses ISO 8601 duration format.

**Default**: `PT30S` (30 seconds)

```bash
INRUPT_PLATFORM_ACTIVITY_RETENTION_TASK_DELAYED=PT30S
```
