# Read a GitHub repository's production deploys and latest release

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

## Contents

**Operations**

- [GET /api/v1/external/coding/customers/{customer\_id}/repositories/{repository\_id}/github-deploys](#scalar-operation-get-apiv1externalcodingcustomerscustomer-idrepositoriesrepository-idgithub-deploys)

**Schemas**

- [GitHubDeploysRead](#scalar-schema-githubdeploysread)
- [GitHubEnvironmentDeploy](#scalar-schema-githubenvironmentdeploy)
- [GitHubPackage](#scalar-schema-githubpackage)
- [GitHubRelease](#scalar-schema-githubrelease)
- [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

### Apps

Beta: may change without notice. Publishing a repository as a hosted app: publish, unpublish, read and update a publication, its deployments, custom domain, runtime and monthly AI limit, and export its data or waitlist.

## Operations

<a id="scalar-operation-get-apiv1externalcodingcustomerscustomer-idrepositoriesrepository-idgithub-deploys"></a>

### Read a GitHub repository's production deploys and latest release

- **Method:** `GET`
- **Path:** `/api/v1/external/coding/customers/{customer_id}/repositories/{repository_id}/github-deploys`
- **Operation ID:** `getGithubDeploys`
- **Tags:** Apps

What the repository's own pipeline shipped, read live from GitHub. `environments`: one row per environment whose name starts with `production` (any case), its newest deployment: `name`, `state` (GitHub's deployment status lowercased, e.g. `success`, `failure`, `error`, `in_progress`; null before any status), `url`, `log_url`, `description`, `sha`, `at`; failed first, then newest. `release`: the latest release (`tag`, `url`, `at`, `count` of releases), null when none. `packages`: the root `package.json` (npm, unless private) and `pyproject.toml` `[project]` (PyPI) beside the public registry's latest: `registry`, `name`, `published_version` (null when not published yet or `unavailable`), `repo_version`, `url` (the registry page), `at`, `unavailable` (that registry couldn't be read; the rest of the answer stands). Any workspace member (`coding:apps:read`). 404 for a repository outside this workspace or one Syndai hosts; 503 `GITHUB_UNAVAILABLE` when GitHub can't be read.

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

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

#### Path parameters

- **`customer_id` (required)**: `string`, format: `uuid`
- **`repository_id` (required)**: `string`, format: `uuid`

#### Responses

##### 200 Request fulfilled, document follows

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

[GitHubDeploysRead](#scalar-schema-githubdeploysread)

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

**Generated example:**

```json
{
  "environments": [
    {
      "at": "",
      "description": "",
      "log_url": "",
      "name": "",
      "sha": "",
      "state": "",
      "url": ""
    }
  ],
  "packages": [
    {
      "at": "",
      "name": "",
      "published_version": "",
      "registry": "",
      "repo_version": "",
      "unavailable": true,
      "url": ""
    }
  ],
  "release": {
    "at": "",
    "count": 1,
    "tag": "",
    "url": ""
  }
}
```

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

- `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

**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-githubdeploysread"></a>

### GitHubDeploysRead

**Type:** `object`

- **`environments` (required)**: array of [GitHubEnvironmentDeploy](#scalar-schema-githubenvironmentdeploy)
- **`packages` (required)**: array of [GitHubPackage](#scalar-schema-githubpackage)
- **`release`**: [GitHubRelease](#scalar-schema-githubrelease) | `null`

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

**Generated example:**

```json
{
  "environments": [
    {
      "at": "",
      "description": "",
      "log_url": "",
      "name": "",
      "sha": "",
      "state": "",
      "url": ""
    }
  ],
  "packages": [
    {
      "at": "",
      "name": "",
      "published_version": "",
      "registry": "",
      "repo_version": "",
      "unavailable": true,
      "url": ""
    }
  ],
  "release": {
    "at": "",
    "count": 1,
    "tag": "",
    "url": ""
  }
}
```

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

### GitHubEnvironmentDeploy

**Type:** `object`

- **`at` (required)**: `string`
- **`name` (required)**: `string`
- **`sha` (required)**: `string`
- **`description`**: `string | null`
- **`log_url`**: `string | null`
- **`state`**: `string | null`
- **`url`**: `string | null`

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

**Generated example:**

```json
{
  "at": "",
  "description": "",
  "log_url": "",
  "name": "",
  "sha": "",
  "state": "",
  "url": ""
}
```

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

### GitHubPackage

**Type:** `object`

- **`name` (required)**: `string`
- **`registry` (required)**: `string`
- **`unavailable` (required)**: `boolean`
- **`url` (required)**: `string`
- **`at`**: `string | null`
- **`published_version`**: `string | null`
- **`repo_version`**: `string | null`

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

**Generated example:**

```json
{
  "at": "",
  "name": "",
  "published_version": "",
  "registry": "",
  "repo_version": "",
  "unavailable": true,
  "url": ""
}
```

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

### GitHubRelease

**Type:** `object`

- **`count` (required)**: `integer`
- **`tag` (required)**: `string`
- **`url` (required)**: `string`
- **`at`**: `string | null`

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

**Generated example:**

```json
{
  "at": "",
  "count": 1,
  "tag": "",
  "url": ""
}
```

<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-8"></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.
