data.ai-provider.get ​
Fetch one AIProviderConfig by UUID, scoped to the calling organization
Fetch a single AIProviderConfig by UUID, org-scoped.
Read-only — no DB mutations. Uses context.metadata["organization"] for the internal organization_id lookup; the public input is organization_uuid only.
Output shapes:
- Found: found=True + all record fields
- Not found: found=False (no other fields present; cross-org isolation upheld)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-connection |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization the request is scoped to |
ai_provider_config_uuid | uuid | Yes | — | UUID of the AIProviderConfig row to fetch |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
found | boolean | Yes | — | True when the record exists and belongs to the org |
ai_provider_config_uuid | uuid | No | — | UUID of the fetched AIProviderConfig row (present only when found=True) |
connection_uuid | uuid | No | — | UUID of the linked CloudConnection (present only when found=True) |
default_model | string | No | — | Default model ID configured for this provider (e.g. 'gpt-4o-mini') |
models | list | No | — | User-supplied list of model IDs (e.g. for OpenRouter); None when unset |
model_config | dict | No | — | Model configuration dict: temperature, max_tokens, etc. None is normalized to {} |
rate_limit_rpm | integer | No | — | Requests per minute rate limit; None means unlimited |
rate_limit_tpm | integer | No | — | Tokens per minute rate limit; None means unlimited |
is_default | boolean | No | — | Whether this is the org's default AI provider config |
enabled | boolean | No | — | Whether this provider config is active |
total_requests | integer | No | — | Total number of AI requests made through this config |
total_tokens | integer | No | — | Total tokens consumed (input + output) |
total_cost_usd | float | No | — | Total cost in USD; converted from Numeric for JSON safety |
last_used_at | string | No | — | ISO-8601 timestamp of last usage; None when never used |
failure_reason | string | No | — | Engine-stamped: human-readable failure reason |
failure_type | string | No | — | Engine-stamped: failure category |
failed_action | string | No | — | Engine-stamped: action method that raised |
failed_at_state | string | No | — | Engine-stamped: state name when the failure occurred |
failed_step | string | No | — | Engine-stamped: name of the step that failed (DAG workflows) |
failed_layer | integer | No | — | Engine-stamped: layer index that failed (DAG workflows) |
error | string | No | — | Engine-stamped: error message on the failure envelope |
error_type | string | No | — | Engine-stamped: exception class name on the failure envelope |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Fetch AI provider config by UUID |
completed | No | Yes | Yes | — | AI provider config fetched (or confirmed absent) |
failed | No | Yes | No | — | Fetch failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.ai-provider.get",
"initial_data": {
"organization_uuid": "value",
"ai_provider_config_uuid": "value"
}
}