---
title: "getOrgAutomationHealth"
---

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

# getOrgAutomationHealth

Path: Forge API › extensions

`GET /orgs/{org_id}/automation-health`

How the automations of each of the caller's repos in the org stand: the workflow runs waiting for a signal, how many more are queued or running, and the schedules and triggers main runs whose latest finished run failed or was interrupted. Pass repo_ids, comma-separated, for just those repos; an id that names no repo of the org is left out.

## Path parameters

- `org_id` (`getOrgAutomationHealth.path.org_id`; string, required)
  - pattern: `^org_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Query parameters

- `repo_ids` (`getOrgAutomationHealth.query.repo_ids`; string, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/orgs/<org_id>/automation-health'
```

### TypeScript

```typescript
const url = '<base-url>/orgs/<org_id>/automation-health';
const options = {method: 'GET'};

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

### Python

```python
import requests

url = "<base-url>/orgs/<org_id>/automation-health"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Success

#### Example

```json
[
  {
    "waiting_workflow_runs": [
      {
        "id": "string",
        "extension_name": "string",
        "version": "string",
        "branch": "string",
        "workflow": "string",
        "key": "string",
        "enqueued_by_id": "string",
        "enqueued_by_extension": "string",
        "status": "queued",
        "waiting_for_signal": "string",
        "signal_sequence": -9007199254740991,
        "failure": "string",
        "queued_at": "string",
        "started_at": "string",
        "finished_at": "string",
        "input_bytes": -9007199254740991,
        "output_bytes": -9007199254740991
      }
    ],
    "active_workflow_run_count": -9007199254740991,
    "failing_automations": [
      {
        "extension_name": "string",
        "kind": "schedule",
        "name": "string",
        "status": "failed",
        "failure": "string",
        "finished_at": "string"
      }
    ],
    "repo_id": "string",
    "repo_name": "string"
  }
]
```

- `waiting_workflow_runs` (`getOrgAutomationHealth.response.200.waiting_workflow_runs`; array of object, required)
  - `id` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.id`; string, required)
    - pattern: `^extension_workflow_run_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `extension_name` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.extension_name`; string, required)
    - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
  - `version` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.version`; any of, required)
    - any of the following: `string`, `string`
  - `branch` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.branch`; string, required)
    - minLength: `1`
  - `workflow` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.workflow`; string, required)
    - minLength: `1`
  - `key` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.key`; string, required)
    - minLength: `1`
  - `enqueued_by_id` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.enqueued_by_id`; string, required)
    - pattern: `^(?:user|extension)_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `enqueued_by_extension` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.enqueued_by_extension`; any of, required)
    - any of the following: `string`, `null`
  - `status` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.status`; string, required)
    - one of `"queued"`, `"running"`, `"waiting"`, `"complete"`, `"errored"`, `"terminated"`
  - `waiting_for_signal` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.waiting_for_signal`; any of, required)
    - any of the following: `string`, `null`
  - `signal_sequence` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.signal_sequence`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`
  - `failure` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.failure`; any of, required)
    - any of the following: `string`, `null`
  - `queued_at` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.queued_at`; string, required)
  - `started_at` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.started_at`; any of, required)
    - any of the following: `string`, `null`
  - `finished_at` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.finished_at`; any of, required)
    - any of the following: `string`, `null`
  - `input_bytes` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.input_bytes`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`
  - `output_bytes` (`getOrgAutomationHealth.response.200.waiting_workflow_runs.output_bytes`; any of, required)
    - any of the following: `integer`, `null`
- `active_workflow_run_count` (`getOrgAutomationHealth.response.200.active_workflow_run_count`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`
- `failing_automations` (`getOrgAutomationHealth.response.200.failing_automations`; array of object, required)
  - `extension_name` (`getOrgAutomationHealth.response.200.failing_automations.extension_name`; string, required)
    - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
  - `kind` (`getOrgAutomationHealth.response.200.failing_automations.kind`; string, required)
    - one of `"schedule"`, `"trigger"`
  - `name` (`getOrgAutomationHealth.response.200.failing_automations.name`; string, required)
    - minLength: `1`
  - `status` (`getOrgAutomationHealth.response.200.failing_automations.status`; string, required)
    - one of `"failed"`, `"interrupted"`
  - `failure` (`getOrgAutomationHealth.response.200.failing_automations.failure`; any of, required)
    - any of the following: `string`, `null`
  - `finished_at` (`getOrgAutomationHealth.response.200.failing_automations.finished_at`; string, required)
- `repo_id` (`getOrgAutomationHealth.response.200.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `repo_name` (`getOrgAutomationHealth.response.200.repo_name`; string, required)
  - minLength: `1`

### 400

InvalidRequest

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

- `_tag` (`getOrgAutomationHealth.response.400._tag`; string, required)
  - one of `"InvalidRequest"`
- `part` (`getOrgAutomationHealth.response.400.part`; string, required)
  - one of `"path"`, `"query"`, `"headers"`, `"body"`
- `issues` (`getOrgAutomationHealth.response.400.issues`; array of object, required)
  - `path` (`getOrgAutomationHealth.response.400.issues.path`; array\<any of\>, required)
    - any of the following: `string`, `integer`
  - `message` (`getOrgAutomationHealth.response.400.issues.message`; string, required)

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`getOrgAutomationHealth.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

OrgNotFound

#### Example

```json
{
  "_tag": "OrgNotFound"
}
```

- `_tag` (`getOrgAutomationHealth.response.404._tag`; string, required)
  - one of `"OrgNotFound"`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`getOrgAutomationHealth.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

OrgFailure | RepoFailure

#### Example

```json
{
  "_tag": "OrgFailure",
  "reason": "string"
}
```

Every option has:

- `reason` (`<option>.reason`; string, required)

Any of the following, each adding:

- `OrgFailureEncoded`
  - `_tag` (`OrgFailureEncoded._tag`; string, required)
    - one of `"OrgFailure"`
- `RepoFailureEncoded`
  - `_tag` (`RepoFailureEncoded._tag`; string, required)
    - one of `"RepoFailure"`

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/get-org-automation-health/index.md
