# revisions

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

A record’s full change history — every saved version, what changed, when, and why, with the stated reason kept word for word.

One construct's archived revision history: the full prior items, cause-stamped, from the revision archive. The target must exist in YOUR tenant (a foreign/unknown target refuses NOT_FOUND); a DOOMED record's history remains readable (the dooming IS history); revisions land moments after each commit (the archive rides the change stream). limit defaults 100, clamps at 200. order defaults oldest (the walkable history); order: newest answers the LATEST rows first, UNPAGINATED (a nextToken with newest refuses) — the last-touch lane's read. Requires authentication.

## What happens

Read-only. History can’t be edited or deleted; entries appear moments after each change.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows `api:revisions`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `targetType` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `targetConstructId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |
| `limit` | [Int](/types/#scalars) | no | How many records to answer at most; a page may hold fewer. |
| `nextToken` | [String](/types/#scalars) | no | The cursor from the previous page, passed back exactly as received. |
| `order` | [String](/types/#scalars) | no | No further notes. |

## Returns

[ConstructRevisionPage](/types/ConstructRevisionPage/) `ConstructRevisionPage!` — One page of a construct's revision history.

This is a page: `items` holds the records and `nextToken` the cursor for the next page — pass it back verbatim until it is null. See [paging](/guides/paging-and-the-cursor-grammar/).

## Example request

```graphql
query ExampleRevisions($targetType: String!, $targetConstructId: ID!, $limit: Int) {
  revisions(targetType: $targetType, targetConstructId: $targetConstructId, limit: $limit) {
    items {
      revision
      revisionNum
      eventName
      archivedAt
      recordJson
    }
    nextToken
  }
}
```

Variables:

```json
{
  "targetType": "<target type>",
  "targetConstructId": "01900000-0000-7000-8000-79e077380000",
  "limit": 1
}
```

## Example response

```json
{
  "data": {
    "revisions": {
      "items": [
        {
          "revision": "01900000-0000-7000-8000-b7960e180000",
          "revisionNum": 1,
          "eventName": "Blue jeans",
          "archivedAt": "2027-01-31T00:00:00.000Z",
          "recordJson": "<record json>"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
