# Get the diff of a held change

- **OpenAPI Version:** `3.2.0`
- **API Version:** `3.1.0`
- **Contact:** Syndai <https://syndai.ai>

## Contents

**Operations**

- [GET /api/v1/external/coding/runs/{coding\_run\_id}/land/held-diff](#scalar-operation-get-apiv1externalcodingrunscoding-run-idlandheld-diff)

**Schemas**

- [ExternalLandHeldDiffResponse](#scalar-schema-externallandhelddiffresponse)
- [ExternalLandHeldPath](#scalar-schema-externallandheldpath)
- [ProblemDetail](#scalar-schema-problemdetail)
- [ExternalErrorCode](#scalar-schema-externalerrorcode)

<a id="scalar-context-global-servers"></a>

## Servers

- **URL:** `https://api.syndai.ai`

<a id="scalar-context-global-authentication"></a>

## Authentication

- **CustomerApiKey**: HTTP bearer (`API Key`)

  Customer API key sent as a bearer token

## Tags

### Landing

Getting a finished run's change onto your default branch and live: retry or close a held landing, go live anyway past the checks that held it (a person's decision), read the diff a held landing would ship, or revert a landed change. These act on your real repository.

## Operations

<a id="scalar-operation-get-apiv1externalcodingrunscoding-run-idlandheld-diff"></a>

### Get the diff of a held change

- **Method:** `GET`
- **Path:** `/api/v1/external/coding/runs/{coding_run_id}/land/held-diff`
- **Operation ID:** `getRunHeldDiff`
- **Tags:** Landing

For a landing held for the owner's review (protected paths or agent configuration changed), returns every held path with its change kind, file modes and a unified diff (at most 64 KB each, null for binary files), plus the `head_sha` an approval must name. Reading is not approving, so an API key may call this. Returns 404 when the run did not land on its own, and 409 when the change is not waiting for review.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Path parameters

- **`coding_run_id` (required)**: `string`, format: `uuid`

#### Query parameters

- **`customer_id`**: `string | null`, format: `uuid`

#### Responses

##### 200 Request fulfilled, document follows

**Content type:** `application/json`

[ExternalLandHeldDiffResponse](#scalar-schema-externallandhelddiffresponse)

<a id="scalar-example-1"></a>

**Generated example:**

```json
{
  "expires_at": "",
  "head_sha": "",
  "paths": [
    {
      "binary": true,
      "change": "added",
      "diff": "",
      "new_mode": "",
      "old_mode": "",
      "path": ""
    }
  ],
  "reason": "",
  "run_id": ""
}
```

##### 400, 401, 403, 404, 409

- `400` Bad request syntax or unsupported method
- `401` Invalid or missing customer API key
- `403` Insufficient scope or forbidden customer access
- `404` Resource not found
- `409` not\_held: the step is not held for owner review

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

<a id="scalar-example-2"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

##### 429 Rate limit exceeded

**Headers:**

- **`Retry-After`**

  Seconds to wait before retrying the request

  `integer`

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

[Generated example](#scalar-example-2)

##### default Unexpected error

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

<a id="scalar-example-3"></a>

**Generated example:**

```json
null
```

## Schemas

<a id="scalar-schema-externallandhelddiffresponse"></a>

### ExternalLandHeldDiffResponse

**Type:** `object`

- **`expires_at` (required)**: `string`, format: `date-time`
- **`head_sha` (required)**: `string`
- **`paths` (required)**: array of [ExternalLandHeldPath](#scalar-schema-externallandheldpath)
- **`reason` (required)**: `string`
- **`run_id` (required)**: `string`, format: `uuid`

<a id="scalar-example-4"></a>

**Generated example:**

```json
{
  "expires_at": "",
  "head_sha": "",
  "paths": [
    {
      "binary": true,
      "change": "added",
      "diff": "",
      "new_mode": "",
      "old_mode": "",
      "path": ""
    }
  ],
  "reason": "",
  "run_id": ""
}
```

<a id="scalar-schema-externallandheldpath"></a>

### ExternalLandHeldPath

**Type:** `object`

- **`binary` (required)**: `boolean`
- **`change` (required)**: `string`, possible values: `"added", "modified", "deleted", "typechange"`
- **`path` (required)**: `string`
- **`diff`**: `string | null`
- **`new_mode`**: `string | null`
- **`old_mode`**: `string | null`

<a id="scalar-example-5"></a>

**Generated example:**

```json
{
  "binary": true,
  "change": "added",
  "diff": "",
  "new_mode": "",
  "old_mode": "",
  "path": ""
}
```

<a id="scalar-schema-problemdetail"></a>

### ProblemDetail

**Type:** `object`

RFC 7807 problem detail returned for public CaaS errors.

- **`code` (required)**: `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "VERSION_NOT_DEPLOYED", "INTERNAL_ERROR"`

  Stable error codes surfaced to public CaaS clients.
- **`status` (required)**: `integer`
- **`title` (required)**: `string`
- **`detail`**: `string | null`, default: `null`
- **`existing_run_id`**: `string | null`, default: `null`
- **`instance`**: `string | null`, default: `null`
- **`type`**: `string`, default: `"about:blank"`

<a id="scalar-example-6"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

<a id="scalar-schema-externalerrorcode"></a>

### ExternalErrorCode

**Type:** `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "VERSION_NOT_DEPLOYED", "INTERNAL_ERROR"`

Stable error codes surfaced to public CaaS clients.
