> ## Documentation Index
> Fetch the complete documentation index at: https://solidroad.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Syncing

> Copy Solidroad data into your own system, and read only what changed since the last run.

## Incremental sync

Assignments, enrollments and attempts have an `updatedAt` filter field, and their lists sort on `updatedAt`. Use it to read only the records that changed since your last run.

1. On the first run, read every page with `order=asc` and `limit=100`. Do not send a filter.
2. Upsert each record into your system by its `id`.
3. Store the largest `updatedAt` value that you received.
4. On the next run, subtract a few minutes from the stored value.
5. Read every page with the filter `updatedAt >= timestamp("<that time>")`, `order=asc` and `limit=100`.
6. Upsert each record by its `id`, and store the new largest `updatedAt`.

```bash theme={null}
curl --get https://api.solidroad.com/v2/assignments \
  -H "Authorization: Bearer $SOLIDROAD_API_KEY" \
  --data-urlencode 'filter=updatedAt >= timestamp("2026-10-28T09:10:00Z")' \
  --data-urlencode "order=asc" \
  --data-urlencode "limit=100"
```

Step 4 re-reads a short overlap, so that you do not miss a record that was written at the same moment as your last run. Because you upsert by `id`, a record that you read twice does no harm.

Use `limit=100` for a sync. It needs the fewest requests, so it stays well inside the [rate limits](https://solidroad.mintlify.site/api-reference/v2/rate-limits.md).

An assignment's `updatedAt` also moves when its simulations change, so this sync finds a change to `simulationIds`.

## Enrollments

Sync enrollments with the steps above on [`GET /v2/enrollments`](https://solidroad.mintlify.site/api-reference/v2/endpoint/enrollments/list). One list holds every enrollment in your workspace, so store one `updatedAt` value for the whole list.

If you sync each assignment with `GET /v2/assignments/{id}/enrollments`, that list continues to work. The rows are the same.

An enrollment's `updatedAt` is the time when the learner's progress last changed: their status, score or number of submitted items. It is not the time when the record was written.

## Attempts

Sync attempts with the steps above on `GET /v2/attempts`. One list holds every attempt in your workspace, so store one `updatedAt` value for the whole list.

An attempt's `updatedAt` is the time when its result last changed: its status, score, section scores, scorecard version, `positives`, `negatives` or `passed`. A reviewer's correction to a score moves `updatedAt` but not `scoredAt`, so sync on `updatedAt`. To read the attempts for one enrollment, filter on `enrollmentId`.

Lists never include transcripts. To store them, read [Get an attempt transcript](https://solidroad.mintlify.site/api-reference/v2/endpoint/attempts/transcript.md) for each role-play once it has a `scoredAt`, or a final status if it is never scored. You do not need to read it again after that. Each read counts against your [rate limit](https://solidroad.mintlify.site/api-reference/v2/rate-limits.md).

## Scorecards

Sync scorecards with the steps above on `GET /v2/scorecards`. A deleted scorecard stays in the list with `archived` set to `true`, so it does not appear in `GET /v2/deletions`.

Publishing a version moves the scorecard's `updatedAt`. A published version does not change, so when a scorecard's `updatedAt` moves, read `GET /v2/scorecards/{id}/versions` and store the versions that you do not have. To follow one section across versions, use its `sectionId`.

## Records that change while you read

With `order=asc`, a record that changes during your sync gets a later `updatedAt`. It moves to the end of the list, and you read it again on a later page. No other record is skipped.

## People

The people list sorts on `createdAt`, and it has no `updatedAt` filter. A filter on `createdAt` finds new members only, not changes to existing ones. To keep people current, read the full list on each run and upsert by `id`.

## Groups

A removed group is not in `GET /v2/deletions`, and a change to a group's members or leads does not move its `updatedAt`. To keep groups current, read `GET /v2/groups` in full on each run, then read the members and leads of each group. Replace the rows that you hold for a group with the rows that you read.

## Removed records

A removed record drops out of its list, so the steps above never see it go. Read `GET /v2/deletions` on each run to find assignments, enrollments, attempts, people and simulations that were removed.

1. On the first run, read every page with `order=asc` and `limit=100`. Do not send a filter.
2. Delete each record from your system by its `object` and `id`.
3. Store the largest `deletedAt` value that you received.
4. On the next run, subtract a few minutes from the stored value, and read every page with the filter `deletedAt >= timestamp("<that time>")`.

```bash theme={null}
curl --get https://api.solidroad.com/v2/deletions \
  -H "Authorization: Bearer $SOLIDROAD_API_KEY" \
  --data-urlencode 'filter=deletedAt >= timestamp("2026-10-28T09:10:00Z")' \
  --data-urlencode "order=asc" \
  --data-urlencode "limit=100"
```

Read deletions before you read the lists. A record that was removed and then came back is in its list again, so reading the list puts it back in your system. Applying a deletion twice does no harm.

### GET /v2/deletions

```
GET https://api.solidroad.com/v2/deletions
```

Scope: any one of `assignments:read`, `attempts:read`, `people:read` and `simulations:read`.

The list sorts on `deletedAt`, most recent first. Send `order=asc` for oldest first, which is the order a sync uses.

A key sees only the kinds of record that its scopes can read:

| `object` | Scope | What a row means |
| - | - | - |
| `assignment` | `assignments:read` | The assignment was deleted. `GET /v2/assignments/{id}` returns `404` for it. |
| `enrollment` | `assignments:read` | The learner was removed from the assignment, or the assignment was deleted. |
| `attempt` | `attempts:read` | The attempt was deleted. |
| `person` | `people:read` | The person left your workspace. Their enrollments and attempts stay, and `learnerId` on them does not change. |
| `simulation` | `simulations:read` | The simulation was deleted. It is no longer in `GET /v2/simulations`, but `GET /v2/simulations/{id}` still returns it, so that you can read the simulation that an attempt names. |

When an assignment is deleted, the list has one row for the assignment and one row for each of its enrollments. These rows have the same `deletedAt`. The attempts stay, and `enrollmentId` on them does not change.

The list leaves out:

* A record that came back. When a person rejoins or a learner is enrolled again, the same record and ID return to their list. A learner who is enrolled again has a later `updatedAt`. A person who rejoins has a later `createdAt`, and their `updatedAt` might not change.
* Attempts and simulations that version 2 never served, such as hiring candidates' attempts, hiring simulations, simulations shared across workspaces and previews.
* Groups, group memberships and scorecards.

A row can name a record that you never held, such as one made and removed between two of your runs. Ignore it.

#### Query parameters

| Parameter | Type | Default | Meaning |
| - | - | - | - |
| `limit` | integer | `50` | 1 to 100 records on a page. |
| `cursor` | string | none | `nextCursor` from the previous page. |
| `order` | string | `desc` | `asc` or `desc` on `deletedAt`. |
| `filter` | string | none | A CEL expression over the fields below. |

Read [Lists](https://solidroad.mintlify.site/api-reference/v2/lists.md) for how the parameters work.

#### Filter fields

| Field | Kind | Can be empty | Values |
| - | - | - | - |
| `object` | String | No | `assignment`, `enrollment`, `attempt`, `person` or `simulation` |
| `deletedAt` | Time | No | `timestamp("…")` |

#### Response

`id` is the ID that version 2 sent for the record, and its prefix matches `object`.

```json theme={null}
{
  "data": [
    {
      "id": "enr_00000000-0000-4000-8000-000000000001",
      "object": "enrollment",
      "deletedAt": "2026-10-30T09:00:00.000Z"
    },
    {
      "id": "ppl_00000000-0000-4000-8000-000000000001",
      "object": "person",
      "deletedAt": "2026-10-30T10:00:00.000Z"
    }
  ],
  "hasMore": false
}
```

#### Errors

| Status | `code` | Cause |
| - | - | - |
| 400 | `invalid_request` | A parameter, the filter or the cursor is not valid. |
| 401 | `unauthorized` | The API key is missing or not valid. |
| 403 | `insufficient_scope` | The key has none of `assignments:read`, `attempts:read` and `people:read`. |
| 429 | `rate_limited` | You sent too many requests. |

Read [Errors](https://solidroad.mintlify.site/api-reference/v2/errors.md) for every code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.