# Workflow access

Source: https://neondeerdata.com/docs/api/scheduled-runs/workflows/

Find the workflows your connection can schedule and read their current versions.

The APIs on this page require alpha access for your organization. App availability and API access are separate. [Check access and permissions](https://neondeerdata.com/docs/api/permissions/).

## List the workflows this API key can schedule

```http
GET /v1/scheduled-runs/targets

```

Lists the workflows this API key can schedule, as given to it in Settings, Integrations, or when a person approved this connection. Each says whether it can be scheduled now, and if not, why.

Requires `scheduled_runs:targets:read`. The connection also needs access to the relevant tables, objects, or workflows.

MCP action: `list_scheduled_run_targets`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name             | Send in | Required | Type or allowed values                 | Notes                                  |
| ---------------- | ------- | -------- | -------------------------------------- | -------------------------------------- |
| `limit`          | query   | No       | integer                                |                                        |
| `cursor`         | query   | No       | string                                 |                                        |
| `object_type`    | query   | No       | string                                 |                                        |
| `active`         | query   | No       | boolean                                | Use true or false in the query string. |
| `workflow_id`    | query   | No       | string                                 |                                        |
| `entry_point_id` | query   | No       | string                                 |                                        |
| `sort`           | query   | No       | `"title"`, `"-title"`, `"id"`, `"-id"` |                                        |

### Response

| HTTP status | Result               |
| ----------- | -------------------- |
| `200`       | A page of workflows. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field                      | Type                                                                                                      | Required in object | Notes |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
| `data`                              | array of ScheduledRunTarget                                                                               | Yes                |       |
| `data[].object`                     | `"scheduled_run_target"`                                                                                  | Yes                |       |
| `data[].id`                         | string                                                                                                    | Yes                |       |
| `data[].version`                    | string or null                                                                                            | Yes                |       |
| `data[].title`                      | string                                                                                                    | Yes                |       |
| `data[].entry_point_title`          | string or null                                                                                            | Yes                |       |
| `data[].workflow_id`                | string                                                                                                    | Yes                |       |
| `data[].entry_point_id`             | string                                                                                                    | Yes                |       |
| `data[].workflow_version_id`        | string or null                                                                                            | Yes                |       |
| `data[].object_type`                | string                                                                                                    | Yes                |       |
| `data[].active`                     | boolean                                                                                                   | Yes                |       |
| `data[].target_revision`            | string or null                                                                                            | Yes                |       |
| `data[].public_scheduling_eligible` | boolean                                                                                                   | Yes                |       |
| `data[].ineligible_reason`          | `"inactive"`, `"not_scheduled_trigger"`, `"target_version_unavailable"`, `"consumer_unsupported"` or null | Yes                |       |
| `data[].created_at`                 | string (date-time)                                                                                        | Yes                |       |
| `data[].updated_at`                 | string (date-time)                                                                                        | Yes                |       |
| `pagination`                        | object                                                                                                    | Yes                |       |
| `pagination.next_cursor`            | string or null                                                                                            | Yes                |       |

### Errors

| HTTP status | Meaning                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`       | One of: credential_in_url, invalid_parameter, invalid_request, unknown_parameter, invalid_cursor.                                                                              |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                                                                                        |
| `402`       | One of: payment_overdue.                                                                                                                                                       |
| `403`       | One of: scope_required.                                                                                                                                                        |
| `404`       | One of: not_found.                                                                                                                                                             |
| `409`       | One of: authorization_policy_changed, batch_started, conflict, destination_unavailable, grant_changed, idempotency_conflict, setup_required, target_changed, version_conflict. |
| `410`       | One of: resource_expired.                                                                                                                                                      |
| `413`       | One of: request_too_large.                                                                                                                                                     |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership.                                                              |
| `423`       | One of: organization_reopening.                                                                                                                                                |
| `428`       | One of: customer_agreement_required.                                                                                                                                           |
| `429`       | One of: rate_limited.                                                                                                                                                          |
| `503`       | One of: service_unavailable.                                                                                                                                                   |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

## Get one workflow this API key can schedule

```http
GET /v1/scheduled-runs/targets/{target_id}

```

Gets one workflow this API key can schedule, with its version. Send that version as expected_target_version when you schedule runs.

Requires `scheduled_runs:targets:read`. The connection also needs access to the relevant tables, objects, or workflows.

MCP action: `get_scheduled_run_target`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name        | Send in | Required | Type or allowed values | Notes |
| ----------- | ------- | -------- | ---------------------- | ----- |
| `target_id` | path    | Yes      | string                 |       |

### Response

| HTTP status | Result        |
| ----------- | ------------- |
| `200`       | The workflow. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field                    | Type                                                                                                      | Required in object | Notes |
| --------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
| `data`                            | ScheduledRunTarget                                                                                        | Yes                |       |
| `data.object`                     | `"scheduled_run_target"`                                                                                  | Yes                |       |
| `data.id`                         | string                                                                                                    | Yes                |       |
| `data.version`                    | string or null                                                                                            | Yes                |       |
| `data.title`                      | string                                                                                                    | Yes                |       |
| `data.entry_point_title`          | string or null                                                                                            | Yes                |       |
| `data.workflow_id`                | string                                                                                                    | Yes                |       |
| `data.entry_point_id`             | string                                                                                                    | Yes                |       |
| `data.workflow_version_id`        | string or null                                                                                            | Yes                |       |
| `data.object_type`                | string                                                                                                    | Yes                |       |
| `data.active`                     | boolean                                                                                                   | Yes                |       |
| `data.target_revision`            | string or null                                                                                            | Yes                |       |
| `data.public_scheduling_eligible` | boolean                                                                                                   | Yes                |       |
| `data.ineligible_reason`          | `"inactive"`, `"not_scheduled_trigger"`, `"target_version_unavailable"`, `"consumer_unsupported"` or null | Yes                |       |
| `data.created_at`                 | string (date-time)                                                                                        | Yes                |       |
| `data.updated_at`                 | string (date-time)                                                                                        | Yes                |       |

### Errors

| HTTP status | Meaning                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`       | One of: credential_in_url, invalid_parameter, unknown_parameter.                                                                                                               |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                                                                                        |
| `402`       | One of: payment_overdue.                                                                                                                                                       |
| `403`       | One of: scope_required.                                                                                                                                                        |
| `404`       | One of: not_found.                                                                                                                                                             |
| `409`       | One of: authorization_policy_changed, batch_started, conflict, destination_unavailable, grant_changed, idempotency_conflict, setup_required, target_changed, version_conflict. |
| `410`       | One of: resource_expired.                                                                                                                                                      |
| `413`       | One of: request_too_large.                                                                                                                                                     |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership.                                                              |
| `423`       | One of: organization_reopening.                                                                                                                                                |
| `428`       | One of: customer_agreement_required.                                                                                                                                           |
| `429`       | One of: rate_limited.                                                                                                                                                          |
| `503`       | One of: service_unavailable.                                                                                                                                                   |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

The [public OpenAPI document](https://neondeerdata.com/docs/api/meta/openapi/) lists generally available API families. Alpha operations may not appear in that document; their request and response fields are listed on this page. Use the [API Playground](https://neondeerdata.com/docs/api/testing/) to inspect a real response with your connection's access.
