Hướng dẫn AgentFlow

start_instance

POST/workflows/{workflow_id}/instances

Through an installed app, the run that starts is told as a run just started, holding no input, output or context.

AuthorizationBearer <token>

A service principal's credential, or a person's access token, AgentFlow's own or an installed app's. A service principal's effective permissions are its role permissions intersected with the credential's scopes.

In: header

Path Parameters

workflow_id*string

Workflow definition id

Formatuuid

Header Parameters

Idempotency-Key?string

A key of 1 to 255 printable ASCII characters. Repeating this request with the same key returns the original outcome instead of performing it again. A UUID is recommended.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/instances" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "active_task_count": 0,  "app_pause": null,  "audit_event_count": 0,  "auth_blocked": null,  "completed_at": "2019-08-24T14:15:22Z",  "context": null,  "created_at": "2019-08-24T14:15:22Z",  "current_node_ids": [    "string"  ],  "definition_id": "91c1994f-b1db-4fef-840d-7d3ab2984871",  "error_message": "string",  "execution_principal": null,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "input_payload": null,  "instance_token_budget_max": 0,  "is_draft_run": true,  "is_simulation": true,  "kill_switch_paused": true,  "last_rollback": null,  "lease_expires_at": "2019-08-24T14:15:22Z",  "lease_worker_id": "string",  "name": "string",  "next_wake_at": "2019-08-24T14:15:22Z",  "operator_pause": null,  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "origin_installation_id": "276a7b35-ebc3-4e1a-b807-93b6296dea79",  "outcome_label": "string",  "output_payload": null,  "sim_parent_attempt_id": "49ed1a39-53f7-477c-b4e6-83397a19c280",  "sim_source_node_id": "string",  "snapshot_document_templates": null,  "snapshot_entity_schemas": null,  "snapshot_forms": null,  "snapshot_graph_json": null,  "snapshot_hash": "string",  "snapshot_input_schema": null,  "snapshot_output_schema": null,  "started_at": "2019-08-24T14:15:22Z",  "started_by": "03987f6a-4c27-4dc1-b6ab-c7e83bb3e713",  "starter": null,  "status": "running",  "subject": null,  "tokens_used": 0,  "updated_at": "2019-08-24T14:15:22Z",  "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c"}