CloudFlow API
DoiT CloudFlow is a GenAI-powered FinOps and CloudOps automation platform. It provides the automation and intelligence you need to manage your FinOps and CloudOps processes at scale.
The CloudFlow API lets you do this programmatically: discover flows, manage cloud provider connections, browse templates, trigger published webhook flows, and build or refine flows from natural language.
This is a task-oriented guide, not a field-by-field specification. For every field, parameter, and status code, use the CloudFlow API reference. For CloudFlow in the DoiT console, see the CloudFlow help docs.
Permissions
CloudFlow Manager on the user or service account that owns the token. Every CloudFlow API endpoint requires Manager, including list and get. CloudFlow Editor is not sufficient. A failed check returns 403. See CloudFlow permissions.
In the DoiT console, CloudFlow Editor and CloudFlow Manager are treated as equivalent for most flow actions. However, in the API, someone who builds and publishes flows in the console will still get 403 unless they have CloudFlow Manager.
For a personal API token, include CloudFlow Manager in the token's permission scope as well as on the user's role. A Manager user whose token uses Read-only or a custom scope that omits Manager still gets 403. Service account tokens inherit the service account's permissions, so grant Manager on the service account.
Automate and integrate
Use the table below to pick an integration pattern, then follow the linked example.
| Use case | Approach | Example |
|---|---|---|
| Inventory flows | Page through GET /cloudflow/v1/flows with maxResults and pageToken. Filter client-side on published, triggerType, or lastExecutionStatus. | List CloudFlows |
| Event-driven remediation | Publish a webhook-triggered flow in the console, then call POST /cloudflow/v1/trigger/{flowId} from alerts, ticketing, or CI with a JSON payload. | Trigger a webhook flow |
| Provision AWS/GCP credentials for flows | Create and update connections via the Connections API; keep secrets and role names in your secrets manager. | Create a connection |
| AI-assisted flow authoring | Call build or refine from an internal tool that can consume SSE; persist the resulting flowId and review in the console before publish. | Build a CloudFlow and Refine a CloudFlow |
| Template discovery | List templates to drive an internal catalogue UI; create runnable flows in the console until a public create-from-template endpoint exists. | Browse templates |
API operations
| Operation | API endpoint | Reference |
|---|---|---|
| List CloudFlows | GET /cloudflow/v1/flows | listCloudflows |
| Build a CloudFlow from scratch | POST /cloudflow/v1/flows/actions/build | buildCloudFlow |
| Refine a CloudFlow | POST /cloudflow/v1/flows/{flowId}/actions/refine | refineCloudFlow |
| Trigger a webhook flow | POST /cloudflow/v1/trigger/{flowId} | triggerCloudflowWebhook |
| List connections | GET /cloudflow/v1/connections | listCloudflowConnections |
| Create a connection | POST /cloudflow/v1/connections | createCloudflowConnection |
| Retrieve a connection | GET /cloudflow/v1/connections/{connectionId} | getCloudflowConnection |
| Update a connection | PATCH /cloudflow/v1/connections/{connectionId} | updateCloudflowConnection |
| Delete a connection | DELETE /cloudflow/v1/connections/{connectionId} | deleteCloudflowConnection |
| List templates | GET /cloudflow/v1/templates | listCloudflowTemplates |
| Retrieve a template | GET /cloudflow/v1/templates/{templateId} | getCloudflowTemplate |
The public CloudFlow API does not cover every console action (for example, publish/unpublish, stop execution, or full flow CRUD). Use the console for those steps, or watch the API changelog as more endpoints ship.
Schema
The CloudFlow API exposes three main resources: flows, connections, and templates.
| Resource | Description | Usage |
|---|---|---|
| Flows | Workflow definitions (draft or published) | List; build from scratch; refine an existing flow; trigger a published webhook flow |
| Connections | AWS or GCP credentials CloudFlow nodes use | Create, list, get, update, and delete |
| Templates | Read-only blueprints | List and get only |
- Build creates a new flow and streams the AI builder output. You do not supply a
flowId. - Refine updates an existing flow identified by
flowIdand streams the same style of builder events. - Trigger starts an execution for a published flow whose first node is a webhook trigger. Draft flows and non-webhook triggers cannot be started with this endpoint.
- Connections hold the AWS or GCP credentials that flow nodes use. Deleting a connection that is still referenced by a flow returns
409. - Templates are a read-only catalogue. Creating a runnable flow from a template is done in the DoiT console, not through a public create-flow API today.
CloudFlow object
Returned in the items array of GET /cloudflow/v1/flows.
| Property | Type | Description |
|---|---|---|
| id | string | CloudFlow ID. |
| name | string | CloudFlow name. |
| description | string | Optional description. |
| instructions | string | Operator guidance for the flow. null when none have been authored. |
| published | boolean | Whether the flow is published. Must be true to trigger. |
| triggerType | string | Trigger on the first node, when present. Typically webhook for the trigger endpoint. null if the flow has no trigger. |
| createTime | string | ISO 8601 (UTC) creation timestamp. |
| updateTime | string | ISO 8601 (UTC) last-modified timestamp. null if never modified. |
| lastExecutedTime | string | ISO 8601 (UTC) time of the last execution. null if never run. |
| lastExecutionStatus | string | Status of the last execution. Possible values: pending, running, complete, pending-approval, failed, sleeping, stopped. null if never run. |
| nextRun | string | Next scheduled execution time. null when the CloudFlow has no active schedule. |
List responses also include:
| Property | Type | Description |
|---|---|---|
| items | array of CloudFlow objects | CloudFlows on this page. |
| pageToken | string | Opaque cursor for the next page. null when there are no more CloudFlows. |
| rowCount | integer | Always null. Row count is not computed for this endpoint. |
Connection object
Returned by the Connections operations. Exactly one of gcpConfig or awsConfig is set on create.
| Property | Type | Description |
|---|---|---|
| connectionId | string | Unique identifier for the connection. |
| name | string | Human-readable connection name. |
| description | string | Optional description. |
| gcpConfig | object | GCP configuration. Request fields include level (organization, folder, or project), projectId, organizationId, folderId, and serviceAccountName. Responses add server-managed status and deploymentCommand. |
| awsConfig | object | AWS configuration. Request fields include roleName and context (array of accountId and regions). Responses add server-managed per-account status. |
| collaborators | array of objects | Optional sharing entries. Each entry has email and role (owner, editor, or user). |
| enabled | boolean | false when the connection is disabled. |
| status | string | Overall connection status (server-managed). |
| createdAt | string | ISO 8601 (UTC) creation timestamp. |
| updatedAt | string | ISO 8601 (UTC) last-modified timestamp. |
Template object
Returned by GET /cloudflow/v1/templates and GET /cloudflow/v1/templates/{templateId}.
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier of the template. |
| name | string | Human-readable display name. |
| description | string | Short summary of the template and its use case. |
| instructions | string | Step-by-step operator guidance. null when none have been authored. |
| createTime | string | ISO 8601 (UTC) creation timestamp. |
| updateTime | string | ISO 8601 (UTC) last-modified timestamp. null if never modified. |
Build and refine request
Used by POST /cloudflow/v1/flows/actions/build and POST /cloudflow/v1/flows/{flowId}/actions/refine.
Both operations are SSE-only. Send Accept: text/event-stream. If the header does not includetext/event-stream, the API returns 406.
| Property | Type | Description |
|---|---|---|
| question | string | Required. Natural-language description of the flow to create (build) or change (refine). |
| conversationId | string | Optional. ID of an existing builder conversation to continue. When omitted, a new conversation is started. |
Trigger response
Returned by POST /cloudflow/v1/trigger/{flowId} with status 202.
The request body is arbitrary JSON. Properties become the webhook payload for the flow.
| Property | Type | Description |
|---|---|---|
| executionLink | string | Console URL for the started CloudFlow execution history entry. |
Examples
YOUR_API_KEYReplace
YOUR_API_KEYwith your actual API token as explained at Get Started.
List CloudFlows
The List CloudFlows method returns a cursor-paginated list of CloudFlows.
| Parameter | Type | Description |
|---|---|---|
maxResults | integer | Maximum number of flows to return (1–500). Defaults to 50. |
pageToken | string | Opaque cursor for the next page, taken from pageToken in the previous response. Omit to start from the beginning. |
Sample request:
curl -G "https://api.doit.com/cloudflow/v1/flows" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
--data-urlencode "maxResults=5"Sample response:
{
"items": [
{
"id": "abc123",
"name": "Weekly tagging check",
"published": true,
"triggerType": "webhook",
"createTime": "2026-06-01T12:00:00Z",
"lastExecutionStatus": "complete"
}
],
"pageToken": null,
"rowCount": null
}Use pageToken from the response as the pageToken query parameter to fetch the next page. rowCount is always null for this endpoint.
Build a CloudFlow
The Build a CloudFlow method creates a new flow from a natural-language description and streams incremental build events, including the ID of the newly created flow.
Use an HTTP client that supports streaming responses (curl -N, or an SSE-capable library). Do not buffer the entire response as a single JSON object.
- Treat
406as a client bug: theAcceptheader did not includetext/event-stream. - Treat
502as an upstream builder failure. Retry with backoff when appropriate; do not assume the flow was fully created. - After the build completes, confirm the flow with List CloudFlows before automating further steps.
Sample request:
curl -N -X POST "https://api.doit.com/cloudflow/v1/flows/actions/build" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"question": "Create a flow that lists untagged EC2 instances and posts a Slack summary"
}'The response is a text/event-stream of incremental build events. Keep the connection open until the stream ends, then note the new flow ID from the events.
To continue the same build conversation (for example, to adjust the draft), call build or refine again with the same conversationId from the session.
Find the new id in a subsequent list response. Open the flow in the DoiT console to review nodes, publish it, or attach a webhook trigger before you call the trigger endpoint.
Refine a CloudFlow
The Refine a CloudFlow method updates an existing flow from a natural-language description. It uses the same SSE contract as build: Content-Type: application/json and Accept: text/event-stream.
Sample request:
curl -N -X POST "https://api.doit.com/cloudflow/v1/flows/{flowId}/actions/refine" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"question": "Add a Slack notification when the check fails",
"conversationId": "OPTIONAL_EXISTING_CONVERSATION_ID"
}'Trigger a webhook flow
The Trigger a webhook flow method starts a published CloudFlow and passes a JSON payload into the webhook trigger node.
Requirements:
- The flow must be published (
published: trueon list). - The flow’s first node must be a webhook trigger (
triggerTypeis typicallywebhookwhen listed). - The request body must be valid JSON. Properties are arbitrary; they become the webhook payload for the flow.
Sample request:
curl -X POST "https://api.doit.com/cloudflow/v1/trigger/{flowId}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"alertId": "7jyrczd6CSh3M8TuQ6Qq",
"severity": "critical"
}'Sample response (202):
{
"executionLink": "https://console.doit.com/customers/customer-id/cloudflow/history/execution-id"
}If the flow already has an active execution, the API returns 409. Wait for that run to finish (or stop it in the console) before triggering again.
See CloudFlow triggers in the Help Center.
Create a connection
The Create a connection method stores AWS or GCP credentials that CloudFlow nodes use. Exactly one of gcpConfig or awsConfig is required. Sending both or neither returns 400 with code invalid_connection_config.
For console setup details, see CloudFlow connections.
Minimal GCP example (project-level):
curl -X POST "https://api.doit.com/cloudflow/v1/connections" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Prod GCP project",
"description": "Billing and ops automation",
"enabled": true,
"gcpConfig": {
"level": "project",
"projectId": "my-gcp-project",
"serviceAccountName": "cloudflow-runner"
}
}'Minimal AWS example:
curl -X POST "https://api.doit.com/cloudflow/v1/connections" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Prod AWS accounts",
"enabled": true,
"awsConfig": {
"roleName": "DoiTCloudFlowRole",
"context": [
{
"accountId": "123456789012",
"regions": ["us-east-1", "eu-west-1"]
}
]
}
}'A successful create returns 201 and a Connection object, including connectionId and server-managed status fields.
Optional collaborators entries use email plus role (owner, editor, or user).
List, get, update, or delete a connection
# List
curl -G "https://api.doit.com/cloudflow/v1/connections" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "maxResults=50"
# Get
curl "https://api.doit.com/cloudflow/v1/connections/{connectionId}" \
-H "Authorization: Bearer YOUR_API_KEY"
# Partial update (at most one of gcpConfig or awsConfig)
curl -X PATCH "https://api.doit.com/cloudflow/v1/connections/{connectionId}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'
# Delete
curl -X DELETE "https://api.doit.com/cloudflow/v1/connections/{connectionId}" \
-H "Authorization: Bearer YOUR_API_KEY"Delete returns 204 on success. If any flow still references the connection, Delete returns 409.
Browse templates
The List templates and Retrieve a template methods return read-only blueprints. Use them to discover supported patterns and configuration guidance.
curl -G "https://api.doit.com/cloudflow/v1/templates" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "maxResults=50"
curl "https://api.doit.com/cloudflow/v1/templates/{templateId}" \
-H "Authorization: Bearer YOUR_API_KEY"Each template includes id, name, optional description andinstructions, and timestamps.
Creating a flow from a template is not available on the public API today. Use the CloudFlow templates experience in the console, or build a new flow with POST /cloudflow/v1/flows/actions/build.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
406 on build or refine | Missing Accept: text/event-stream (and not */*) | Set the Accept header; use a streaming HTTP client. |
403 on any CloudFlow route | Missing DoiT API entitlement or CloudFlow Manager permission | Check subscription and role; see Get Started and CloudFlow permissions. |
400 with tenant_id_required / tenant_id_mismatch | Multi-tenant credential without a valid X-Tenant-Id | Send X-Tenant-Id with the correct customer ID. |
400 invalid_connection_config | Both or neither of gcpConfig / awsConfig on create | Send exactly one provider config. |
409 on trigger | Flow already has an active execution | Wait for completion or stop the run in the console, then retry. |
409 on connection delete | Connection still referenced by one or more flows | Remove or re-point those flows in the console, then delete. |
502 on build or refine | Upstream builder error | Retry later; verify the flow state with list afterward. |
Trigger returns 404 / fails for a known flow | Flow not published, or first node is not a webhook trigger | Publish the flow and use a webhook trigger; confirm with list fields. |
| Cannot create a flow from a template via API | No public create-from-template endpoint | Use the console templates UI or POST .../actions/build. |
Related docs
- Get Started: Tokens, tenant header, first request.
- CloudFlow API reference: OpenAPI-backed endpoint pages.
- CloudFlow changelog. Recent CloudFlow API additions.
- CloudFlow Help Center: Console workflows.
Updated 4 days ago