---
title: "Get app setup"
method: GET
path: "/api/v1/apps/{appId}/setup"
tags: ["Apps"]
---

# Get app setup

`GET /api/v1/apps/{appId}/setup`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/apps/{appId}/setup`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns the app's newest setup run, with its status, the reason for any status other than ready, the setup PR, and the live URL once it is ready. Returns { run: null } when setup never ran through Khotan.

## Path parameters

- `appId` string, required

## Response `200`

The newest run, or null.

- object
  - `run` object, nullable, required
    - `id` string, required
    - `kind` 'app_setup', required
    - `resourceKind` 'apps' | 'pipelines', required
    - `resourceId` string, required
    - `status` 'running' | 'ready' | 'needs_person' | 'failed' | 'expired', required
    - `reason` string, nullable, required
    - `pullRequestUrl` string, nullable, required
    - `liveUrl` string, nullable, required
    - `agentUrl` string, nullable, required
    - `createdAt` string, required
    - `finishedAt` string, nullable, required

## Other responses

- `401`: Authentication is missing or invalid.
- `404`: The resource was not found.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
