---
title: "Preview or transfer one page of legacy automations"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview or transfer one page of legacy automations

Path: CloudRaker Workspace API › Workspace Triggers

`POST /triggers/migrate-legacy`

Walks the legacy automations one keyset page at a time. `dryRun: true` reports what each row would become and never writes; `dryRun: false` transfers the page and requires a stored readiness record. `limit` is 1-25 (default from the producer) and `cursor` takes the previous response's `nextCursor`.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `dryRun` (`migrateLegacyAutomations.dryRun`; boolean, required)
- `limit` (`migrateLegacyAutomations.limit`; integer, optional)
  - min 1; max 25
- `cursor` (`migrateLegacyAutomations.cursor`; string, optional)
  - maxLength 128

## Example request

```json
{
  "dryRun": true,
  "limit": 1,
  "cursor": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/triggers/migrate-legacy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dryRun": true,
  "limit": 1,
  "cursor": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/triggers/migrate-legacy';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({dryRun: true, limit: 1, cursor: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/triggers/migrate-legacy"

payload = {
    "dryRun": True,
    "limit": 1,
    "cursor": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The producer record, proxied unchanged.

#### Example

```json
{
  "data": {
    "dryRun": true,
    "handoffReady": true,
    "readiness": {
      "gatewayRevision": "string",
      "verifiedClaimId": "string",
      "verifiedWriteClaimId": "string",
      "verifiedAt": "2019-08-24T14:15:22Z"
    },
    "rows": [
      {
        "automationId": "string",
        "triggerId": "string",
        "status": "ready",
        "message": "string",
        "nextRunAt": "2019-08-24T14:15:22Z"
      }
    ],
    "nextCursor": "string"
  }
}
```

- `data` (`migrateLegacyAutomations.response.200.data`; object, required)
  - `dryRun` (`migrateLegacyAutomations.response.200.data.dryRun`; boolean, required)
  - `handoffReady` (`migrateLegacyAutomations.response.200.data.handoffReady`; boolean, required)
  - `readiness` (`migrateLegacyAutomations.response.200.data.readiness`; object, required, nullable)
    - `gatewayRevision` (`migrateLegacyAutomations.response.200.data.readiness.gatewayRevision`; string, required)
      - pattern `^[a-f0-9]{40}$`
    - `verifiedClaimId` (`migrateLegacyAutomations.response.200.data.readiness.verifiedClaimId`; string, required)
      - maxLength 128; pattern `^tlc_[A-Za-z0-9_-]+$`
    - `verifiedWriteClaimId` (`migrateLegacyAutomations.response.200.data.readiness.verifiedWriteClaimId`; string, required)
      - maxLength 128; pattern `^tlc_[A-Za-z0-9_-]+$`
    - `verifiedAt` (`migrateLegacyAutomations.response.200.data.readiness.verifiedAt`; string, required)
      - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `rows` (`migrateLegacyAutomations.response.200.data.rows`; array<object>, required)
    - `automationId` (`migrateLegacyAutomations.response.200.data.rows.automationId`; string, required)
    - `status` (`migrateLegacyAutomations.response.200.data.rows.status`; string, required)
      - one of `"ready"`, `"migrated"`, `"blocked"`, `"archived"`
    - `triggerId` (`migrateLegacyAutomations.response.200.data.rows.triggerId`; string, optional)
      - maxLength 128; pattern `^trg_[A-Za-z0-9_-]+$`
    - `message` (`migrateLegacyAutomations.response.200.data.rows.message`; string, optional)
    - `nextRunAt` (`migrateLegacyAutomations.response.200.data.rows.nextRunAt`; string, optional, nullable)
      - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `nextCursor` (`migrateLegacyAutomations.response.200.data.nextCursor`; string, required, nullable)

### 400

`validation_failed`: a request body field is invalid.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`migrateLegacyAutomations.response.400.error`; string, required) — The sentence a human reads.
- `error_code` (`migrateLegacyAutomations.response.400.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`migrateLegacyAutomations.response.400.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`migrateLegacyAutomations.response.400.issues.path`; string, required)
  - `code` (`migrateLegacyAutomations.response.400.issues.code`; string, required)
  - `message` (`migrateLegacyAutomations.response.400.issues.message`; string, required)

### 403

`forbidden` — organization administrators only.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`migrateLegacyAutomations.response.403.error`; string, required) — The sentence a human reads.
- `error_code` (`migrateLegacyAutomations.response.403.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`migrateLegacyAutomations.response.403.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`migrateLegacyAutomations.response.403.issues.path`; string, required)
  - `code` (`migrateLegacyAutomations.response.403.issues.code`; string, required)
  - `message` (`migrateLegacyAutomations.response.403.issues.message`; string, required)

### 409

`handoff_incomplete` — no readiness record covers this transfer yet.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`migrateLegacyAutomations.response.409.error`; string, required) — The sentence a human reads.
- `error_code` (`migrateLegacyAutomations.response.409.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`migrateLegacyAutomations.response.409.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`migrateLegacyAutomations.response.409.issues.path`; string, required)
  - `code` (`migrateLegacyAutomations.response.409.issues.code`; string, required)
  - `message` (`migrateLegacyAutomations.response.409.issues.message`; string, required)

### 422

`source_changed` — the legacy source moved under the expected hash.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`migrateLegacyAutomations.response.422.error`; string, required) — The sentence a human reads.
- `error_code` (`migrateLegacyAutomations.response.422.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`migrateLegacyAutomations.response.422.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`migrateLegacyAutomations.response.422.issues.path`; string, required)
  - `code` (`migrateLegacyAutomations.response.422.issues.code`; string, required)
  - `message` (`migrateLegacyAutomations.response.422.issues.message`; string, required)


Source: https://docs.cloudraker.com/workspace/api/workspace-triggers/migrate-legacy-automations/index.md
