# Export an entity's activity

Source: https://amanucci.com/fr/docs/developers/api/activity/exportEntityActivity

## GET /v1/entities/{entityId}/activity/export

Export an entity's activity

The entity's feed as CSV, one line per row in the window, with TRUE actors — for a firm seat holding `ledger.read` on the entity. A client is 403 `authority-required`; a firm seat without the grant 403 `grant-required`. Its window is `period`, resolved as the list's is, or `from` and `to`, and spans at most 366 days, never all time: an export is bounded by its window, not by a cursor. A bulk extraction stays a seat's: an operator in operator mode meets the hiding 404.

Operation ID: `exportEntityActivity`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "maxLength": 200,
      "pattern": "^(human|agent|system|parser|ade|pack):\\S+$",
      "description": "Only this actor, verbatim (`human:<id>`, `agent:<work item>`…) — \"what did Tom do\". Matches true actors, so on a client caller it narrows to the rows that person authored."
    },
    "required": false,
    "description": "Only this actor, verbatim (`human:<id>`, `agent:<work item>`…) — \"what did Tom do\". Matches true actors, so on a client caller it narrows to the rows that person authored.",
    "name": "actor",
    "in": "query"
  },
  {
    "schema": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "human",
          "agent",
          "system",
          "parser",
          "ade",
          "integration"
        ]
      },
      "maxItems": 6,
      "description": "Who acted: a person, Amanucci's thinking (`agent`), the machines (`system`, `parser`, `ade`), or an `integration` (a delivery nobody clicked, e.g. Peppol). Repeat the key for several."
    },
    "required": false,
    "description": "Who acted: a person, Amanucci's thinking (`agent`), the machines (`system`, `parser`, `ade`), or an `integration` (a delivery nobody clicked, e.g. Peppol). Repeat the key for several.",
    "name": "actorKind",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "format": "date",
      "description": "First calendar day (Europe/Brussels), inclusive. With `to`, or name the window by `period`: an export is bounded by its window, at most 366 days."
    },
    "required": false,
    "description": "First calendar day (Europe/Brussels), inclusive. With `to`, or name the window by `period`: an export is bounded by its window, at most 366 days.",
    "name": "from",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "format": "uuid",
      "description": "With `objectType`: one object's trail — \"all activity for this\"."
    },
    "required": false,
    "description": "With `objectType`: one object's trail — \"all activity for this\".",
    "name": "objectId",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "artifact",
        "event",
        "entry",
        "document",
        "match_group",
        "case",
        "client_request",
        "control_run",
        "filing",
        "period",
        "grant",
        "membership",
        "policy",
        "transfer",
        "invite",
        "party",
        "recurring_plan",
        "entries"
      ]
    },
    "required": false,
    "name": "objectType",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "format": "date",
      "description": "Last calendar day (Europe/Brussels), inclusive. With `from`, or name the window by `period`."
    },
    "required": false,
    "description": "Last calendar day (Europe/Brussels), inclusive. With `from`, or name the window by `period`.",
    "name": "to",
    "in": "query"
  },
  {
    "schema": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "uploaded",
          "received",
          "read",
          "assembled",
          "decided",
          "case_opened",
          "case_resolved",
          "asked",
          "reminded",
          "answered",
          "proposed_match",
          "matched",
          "unmatched",
          "posted",
          "corrected",
          "finalized",
          "sent",
          "accepted",
          "declined",
          "generated",
          "submitted",
          "locked",
          "reopened",
          "checked",
          "granted",
          "revoked",
          "invited",
          "joined",
          "role_changed",
          "assigned",
          "unassigned",
          "policy_changed",
          "config_changed",
          "transferred",
          "created",
          "edited",
          "paused",
          "resumed",
          "ended",
          "entries_reviewed",
          "linked"
        ]
      },
      "maxItems": 41,
      "description": "Only these acts. Repeat the key for several."
    },
    "required": false,
    "description": "Only these acts. Repeat the key for several.",
    "name": "verb",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "description": "The days to list, resolved by the server against today in the books' own day (Europe/Brussels): `7d` and `30d` (the last 7 or 30 days, today included), `month`, `last-month`, `quarter`, `last-quarter` and `year` (the whole calendar unit holding today, or the one before it), a year `2026`, a quarter `2026-q3`, a month `2026-03`, `all` (no bound), or a day range `2026-01-05..2026-02-10` (inclusive, its ends in order). Not with `from` or `to`.",
      "example": "quarter"
    },
    "required": false,
    "description": "The days to list, resolved by the server against today in the books' own day (Europe/Brussels): `7d` and `30d` (the last 7 or 30 days, today included), `month`, `last-month`, `quarter`, `last-quarter` and `year` (the whole calendar unit holding today, or the one before it), a year `2026`, a quarter `2026-q3`, a month `2026-03`, `all` (no bound), or a day range `2026-01-05..2026-02-10` (inclusive, its ends in order). Not with `from` or `to`.",
    "name": "period",
    "in": "query"
  }
]
```

### Responses

#### 200 The window's rows, newest first: a header line, then one CRLF-terminated line per row.

```json
{
  "text/csv": {
    "schema": {
      "type": "string"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
