# Read an app's runtime

- **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}/apps/{publication\_id}/runtime](#scalar-operation-get-apiv1externalcodingcustomerscustomer-idappspublication-idruntime)

**Schemas**

- [AppRuntimeResponse](#scalar-schema-appruntimeresponse)
- [RuntimeAiRead](#scalar-schema-runtimeairead)
- [SiteChangeRead](#scalar-schema-sitechangeread)
- [ChangeWindowRead](#scalar-schema-changewindowread)
- [ErrorGroupRead](#scalar-schema-errorgroupread)
- [ErrorFrameRead](#scalar-schema-errorframeread)
- [RuntimeJobRead](#scalar-schema-runtimejobread)
- [RuntimeMailRead](#scalar-schema-runtimemailread)
- [RuntimeRevenueRead](#scalar-schema-runtimerevenueread)
- [RuntimeOutcomesRead](#scalar-schema-runtimeoutcomesread)
- [RuntimeSinceRead](#scalar-schema-runtimesinceread)
- [RuntimeTrafficRead](#scalar-schema-runtimetrafficread)
- [RuntimeVisitDayRead](#scalar-schema-runtimevisitdayread)
- [RuntimePageRead](#scalar-schema-runtimepageread)
- [RuntimeSourceRead](#scalar-schema-runtimesourceread)
- [RuntimeWeekRead](#scalar-schema-runtimeweekread)
- [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-idappspublication-idruntime"></a>

### Read an app's runtime

- **Method:** `GET`
- **Path:** `/api/v1/external/coding/customers/{customer_id}/apps/{publication_id}/runtime`
- **Operation ID:** `getAppRuntime`
- **Tags:** Apps

One live app's runtime picture. `missing_secrets`: secret names the app's server code declares that production does not hold (add them in Secrets). `ai`: the monthly limit on the app's no-key AI and this UTC month's use, both in USD the workspace pays. `jobs`: the scheduled jobs the live build declares (`every` as declared: `15m`, `1h`, `1d` or milliseconds) and each one's last run. `traffic`: the last 30 days in the `tz` query zone (an IANA name; unknown or absent = UTC): visits per day (people arriving from outside the site, oldest first, today last), the top 5 sources then `other`, taps by kind (`call`, `email`, `message`, `directions`, `link`) and this week against the one before; null when visit counts are unavailable, never zero. `outcomes`: paid orders, their revenue net of refunds per currency in minor units, requests and sign-ups over the same 30 days; null unless the caller is the workspace's owner or an admin. `since`: visits, taps and (owner or admin) paid orders since the first stored UTC day `from_day`; null before the first daily rollup. `mail`: messages a sending limit held back in the last 30 days.

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

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

#### Path parameters

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

#### Query parameters

- **`tz`**: `string | null`

#### Responses

##### 200 Request fulfilled, document follows

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

[AppRuntimeResponse](#scalar-schema-appruntimeresponse)

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

**Generated example:**

```json
{
  "ai": {
    "cap_usd": 1,
    "member_cap_usd": 0,
    "used_usd": 1
  },
  "changes": [
    {
      "after": {
        "outcomes": 1,
        "visits": 1
      },
      "before": {
        "outcomes": 1,
        "visits": 1
      },
      "days_left": 1,
      "deployment_id": "",
      "kind": "",
      "live_at": "",
      "per_100": [
        1,
        1
      ],
      "run_id": "",
      "title": "",
      "verdict": ""
    }
  ],
  "errors": [
    {
      "count_7d": 1,
      "count_total": 1,
      "fingerprint": "",
      "first_seen": "",
      "frames": [
        {
          "line": 1,
          "path": ""
        }
      ],
      "last_seen": "",
      "message": "",
      "name": "",
      "new_in_live": true,
      "route": ""
    }
  ],
  "jobs": [
    {
      "every": "",
      "last_run_at": "",
      "name": ""
    }
  ],
  "mail": {
    "capped_30d": 1
  },
  "members_revenue": [
    {
      "amount_minor": 1,
      "currency": ""
    }
  ],
  "missing_secrets": [
    ""
  ],
  "outcomes": {
    "orders": 1,
    "requests": 1,
    "revenue": [
      {
        "amount_minor": 1,
        "currency": ""
      }
    ],
    "signups": 1
  },
  "since": {
    "from_day": "",
    "orders": 1,
    "taps": {
      "additionalProperty": 1
    },
    "visits": 1
  },
  "traffic": {
    "days": [
      {
        "date": "",
        "visits": 1
      }
    ],
    "pages": [
      {
        "path": "",
        "views": 1
      }
    ],
    "sources": [
      {
        "key": "",
        "label": "",
        "visits": 1
      }
    ],
    "taps": {
      "additionalProperty": 1
    },
    "week": {
      "last7": 1,
      "prior7": 1
    }
  }
}
```

##### 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-appruntimeresponse"></a>

### AppRuntimeResponse

**Type:** `object`

- **`ai` (required)**: [RuntimeAiRead](#scalar-schema-runtimeairead)
- **`jobs` (required)**: array of [RuntimeJobRead](#scalar-schema-runtimejobread)
- **`mail` (required)**: [RuntimeMailRead](#scalar-schema-runtimemailread)
- **`missing_secrets` (required)**: `array of string`
- **`changes`**: array of [SiteChangeRead](#scalar-schema-sitechangeread) | `null`
- **`errors`**: array of [ErrorGroupRead](#scalar-schema-errorgroupread) | `null`
- **`members_revenue`**: array of [RuntimeRevenueRead](#scalar-schema-runtimerevenueread) | `null`
- **`outcomes`**: [RuntimeOutcomesRead](#scalar-schema-runtimeoutcomesread) | `null`
- **`since`**: [RuntimeSinceRead](#scalar-schema-runtimesinceread) | `null`
- **`traffic`**: [RuntimeTrafficRead](#scalar-schema-runtimetrafficread) | `null`

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

**Generated example:**

```json
{
  "ai": {
    "cap_usd": 1,
    "member_cap_usd": 0,
    "used_usd": 1
  },
  "changes": [
    {
      "after": {
        "outcomes": 1,
        "visits": 1
      },
      "before": {
        "outcomes": 1,
        "visits": 1
      },
      "days_left": 1,
      "deployment_id": "",
      "kind": "",
      "live_at": "",
      "per_100": [
        1,
        1
      ],
      "run_id": "",
      "title": "",
      "verdict": ""
    }
  ],
  "errors": [
    {
      "count_7d": 1,
      "count_total": 1,
      "fingerprint": "",
      "first_seen": "",
      "frames": [
        {
          "line": 1,
          "path": ""
        }
      ],
      "last_seen": "",
      "message": "",
      "name": "",
      "new_in_live": true,
      "route": ""
    }
  ],
  "jobs": [
    {
      "every": "",
      "last_run_at": "",
      "name": ""
    }
  ],
  "mail": {
    "capped_30d": 1
  },
  "members_revenue": [
    {
      "amount_minor": 1,
      "currency": ""
    }
  ],
  "missing_secrets": [
    ""
  ],
  "outcomes": {
    "orders": 1,
    "requests": 1,
    "revenue": [
      {
        "amount_minor": 1,
        "currency": ""
      }
    ],
    "signups": 1
  },
  "since": {
    "from_day": "",
    "orders": 1,
    "taps": {
      "additionalProperty": 1
    },
    "visits": 1
  },
  "traffic": {
    "days": [
      {
        "date": "",
        "visits": 1
      }
    ],
    "pages": [
      {
        "path": "",
        "views": 1
      }
    ],
    "sources": [
      {
        "key": "",
        "label": "",
        "visits": 1
      }
    ],
    "taps": {
      "additionalProperty": 1
    },
    "week": {
      "last7": 1,
      "prior7": 1
    }
  }
}
```

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

### RuntimeAiRead

**Type:** `object`

- **`cap_usd` (required)**: `number`
- **`used_usd` (required)**: `number`
- **`member_cap_usd`**: `number`, default: `0`

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

**Generated example:**

```json
{
  "cap_usd": 1,
  "member_cap_usd": 0,
  "used_usd": 1
}
```

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

### SiteChangeRead

**Type:** `object`

- **`after` (required)**: [ChangeWindowRead](#scalar-schema-changewindowread)
- **`before` (required)**: [ChangeWindowRead](#scalar-schema-changewindowread)
- **`deployment_id` (required)**: `string`
- **`kind` (required)**: `string`
- **`live_at` (required)**: `string`
- **`verdict` (required)**: `string`
- **`days_left`**: `integer | null`
- **`per_100`**: `array | null`
- **`run_id`**: `string | null`
- **`title`**: `string | null`

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

**Generated example:**

```json
{
  "after": {
    "outcomes": 1,
    "visits": 1
  },
  "before": {
    "outcomes": 1,
    "visits": 1
  },
  "days_left": 1,
  "deployment_id": "",
  "kind": "",
  "live_at": "",
  "per_100": [
    1,
    1
  ],
  "run_id": "",
  "title": "",
  "verdict": ""
}
```

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

### ChangeWindowRead

**Type:** `object`

- **`outcomes` (required)**: `integer`
- **`visits` (required)**: `integer`

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

**Generated example:**

```json
{
  "outcomes": 1,
  "visits": 1
}
```

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

### ErrorGroupRead

**Type:** `object`

- **`count_7d` (required)**: `integer`
- **`count_total` (required)**: `integer`
- **`fingerprint` (required)**: `string`
- **`first_seen` (required)**: `string`
- **`frames` (required)**: array of [ErrorFrameRead](#scalar-schema-errorframeread)
- **`last_seen` (required)**: `string`
- **`name` (required)**: `string`
- **`new_in_live` (required)**: `boolean`
- **`route` (required)**: `string`
- **`message`**: `string | null`

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

**Generated example:**

```json
{
  "count_7d": 1,
  "count_total": 1,
  "fingerprint": "",
  "first_seen": "",
  "frames": [
    {
      "line": 1,
      "path": ""
    }
  ],
  "last_seen": "",
  "message": "",
  "name": "",
  "new_in_live": true,
  "route": ""
}
```

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

### ErrorFrameRead

**Type:** `object`

- **`line` (required)**: `integer`
- **`path` (required)**: `string`

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

**Generated example:**

```json
{
  "line": 1,
  "path": ""
}
```

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

### RuntimeJobRead

**Type:** `object`

- **`every` (required)**: `string | integer`
- **`name` (required)**: `string`
- **`last_run_at`**: `string | null`, format: `date-time`

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

**Generated example:**

```json
{
  "every": "",
  "last_run_at": "",
  "name": ""
}
```

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

### RuntimeMailRead

**Type:** `object`

- **`capped_30d` (required)**: `integer`

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

**Generated example:**

```json
{
  "capped_30d": 1
}
```

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

### RuntimeRevenueRead

**Type:** `object`

- **`amount_minor` (required)**: `integer`
- **`currency` (required)**: `string`

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

**Generated example:**

```json
{
  "amount_minor": 1,
  "currency": ""
}
```

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

### RuntimeOutcomesRead

**Type:** `object`

- **`orders` (required)**: `integer`
- **`requests` (required)**: `integer`
- **`revenue` (required)**: array of [RuntimeRevenueRead](#scalar-schema-runtimerevenueread)
- **`signups` (required)**: `integer`

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

**Generated example:**

```json
{
  "orders": 1,
  "requests": 1,
  "revenue": [
    {
      "amount_minor": 1,
      "currency": ""
    }
  ],
  "signups": 1
}
```

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

### RuntimeSinceRead

**Type:** `object`

- **`from_day` (required)**: `string`, format: `date`
- **`taps` (required)**: `object`

  **Additional properties:**

  `integer`
- **`visits` (required)**: `integer`
- **`orders`**: `integer | null`

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

**Generated example:**

```json
{
  "from_day": "",
  "orders": 1,
  "taps": {
    "additionalProperty": 1
  },
  "visits": 1
}
```

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

### RuntimeTrafficRead

**Type:** `object`

- **`days` (required)**: array of [RuntimeVisitDayRead](#scalar-schema-runtimevisitdayread)
- **`sources` (required)**: array of [RuntimeSourceRead](#scalar-schema-runtimesourceread)
- **`taps` (required)**: `object`

  **Additional properties:**

  `integer`
- **`week` (required)**: [RuntimeWeekRead](#scalar-schema-runtimeweekread)
- **`pages`**: array of [RuntimePageRead](#scalar-schema-runtimepageread)

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

**Generated example:**

```json
{
  "days": [
    {
      "date": "",
      "visits": 1
    }
  ],
  "pages": [
    {
      "path": "",
      "views": 1
    }
  ],
  "sources": [
    {
      "key": "",
      "label": "",
      "visits": 1
    }
  ],
  "taps": {
    "additionalProperty": 1
  },
  "week": {
    "last7": 1,
    "prior7": 1
  }
}
```

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

### RuntimeVisitDayRead

**Type:** `object`

- **`date` (required)**: `string`
- **`visits` (required)**: `integer`

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

**Generated example:**

```json
{
  "date": "",
  "visits": 1
}
```

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

### RuntimePageRead

**Type:** `object`

- **`path` (required)**: `string`
- **`views` (required)**: `integer`

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

**Generated example:**

```json
{
  "path": "",
  "views": 1
}
```

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

### RuntimeSourceRead

**Type:** `object`

- **`key` (required)**: `string`
- **`label` (required)**: `string`
- **`visits` (required)**: `integer`

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

**Generated example:**

```json
{
  "key": "",
  "label": "",
  "visits": 1
}
```

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

### RuntimeWeekRead

**Type:** `object`

- **`last7` (required)**: `integer`
- **`prior7` (required)**: `integer`

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

**Generated example:**

```json
{
  "last7": 1,
  "prior7": 1
}
```

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