neon.data_apis.create ​
Enable the Neon Data API on a branch database
Enable (create) the Neon Data API for a database on a branch.
Issues POST /projects/{neon_project_id}/branches/{neon_branch_id}/data-api/{db_name}. The Data API exposes a PostgREST-compatible HTTP interface over Postgres.
Inputs:
- neon_project_id: Neon project ID (required).
- neon_branch_id: Neon branch ID (required).
- db_name: Database name to expose (required).
- auth_provider:
neon_auth|external(optional). - jwks_url: JWKS URL when auth_provider is
external(optional). - provider_name: Display name for an external provider (optional).
- jwt_audience: Expected JWT
audclaim (optional). - add_default_grants: Grant public-schema table perms to authenticated (optional).
- skip_auth_schema: Skip creating auth schema / RLS helpers (optional).
- settings: Data API settings object (optional; see Neon docs).
Outputs (terminal state_data):
- data_api_url: str — REST base URL for the enabled Data API
- provider_metadata: dict — raw Neon response body
Error policy:
- 4xx → WorkflowNotRetryableError (already enabled, invalid config, etc.).
- 5xx / timeouts → propagate so the engine retries.
Plugin required: context.get_plugin("neon") must expose .api_token.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-neon |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | Cloud connection holding the Neon credential |
neon_project_id | string | Yes | — | Neon project ID |
neon_branch_id | string | Yes | — | Neon branch ID |
db_name | string | Yes | — | Database name to expose via the Data API |
auth_provider | string | No | — | neon_auth |
jwks_url | string | No | — | JWKS URL for external JWT provider |
provider_name | string | No | — | Display name for the external provider |
jwt_audience | string | No | — | Expected JWT aud claim |
add_default_grants | boolean | No | — | Grant public schema table perms to authenticated |
skip_auth_schema | boolean | No | — | Skip creating the auth schema and RLS helpers |
settings | json | No | — | Data API settings object (schemas, CORS, etc.) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | — |
neon_project_id | string | No | — | — |
neon_branch_id | string | No | — | — |
db_name | string | No | — | — |
auth_provider | string | No | — | — |
jwks_url | string | No | — | — |
provider_name | string | No | — | — |
jwt_audience | string | No | — | — |
add_default_grants | boolean | No | — | — |
skip_auth_schema | boolean | No | — | — |
settings | json | No | — | — |
data_api_url | string | No | — | PostgREST base URL for the Data API |
provider_metadata | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "neon.data_apis.create",
"initial_data": {
"connection_uuid": "value",
"neon_project_id": "value",
"neon_branch_id": "value",
"db_name": "value"
}
}