Skip to main content
POST
/
workflows
/
executeSync
Execute a workflow synchronously
curl --request POST \
  --url https://api.kaizenautomation.com/workflows/executeSync \
  --header 'Content-Type: application/json' \
  --data '
{
  "params": {
    "origin": "New York",
    "destination": "Los Angeles"
  },
  "workflowId": "<string>",
  "workflowName": "<string>",
  "loginId": "<string>",
  "name": "User batch execution",
  "timeout": 10800,
  "useProxy": false,
  "startBlockId": "1",
  "batchId": "batch_123",
  "isTest": false
}
'
{
  "execution": {
    "id": "<string>",
    "workflow": {
      "id": "<string>",
      "name": "<string>"
    },
    "batch": {
      "id": "<string>",
      "name": "<string>"
    },
    "logins": [
      {
        "id": "<string>",
        "name": "<string>"
      }
    ],
    "authentications": [
      {
        "browserSessionId": "<string>",
        "status": "<string>",
        "liveViewUrl": "<string>"
      }
    ],
    "startTime": "2023-11-07T05:31:56Z",
    "params": {},
    "metadata": {},
    "name": "<string>",
    "startBlock": {
      "id": "<string>",
      "name": "<string>",
      "blockReferenceId": "<string>",
      "type": "<string>",
      "isCacheable": true,
      "skipIfNotPresent": true,
      "useWorkflowRecoveryAgent": true,
      "data": {
        "loginId": "<string>",
        "isParameter": true,
        "forceLoginEveryTime": true
      },
      "parentRelationship": {
        "blockDepth": 123,
        "positionInSequence": 123,
        "parentBlockId": "<string>",
        "parentSequenceId": "sequence"
      },
      "transformerFn": "<string>",
      "locator": {
        "role": "<string>",
        "text": "<string>",
        "label": "<string>",
        "placeholder": "<string>",
        "altText": "<string>",
        "title": "<string>",
        "css": "<string>",
        "xpath": "<string>"
      }
    },
    "contextAuthentications": [
      {
        "contextAuthenticationId": "<string>",
        "loginSummary": {
          "loginId": "<string>",
          "name": "<string>",
          "isManual": true
        },
        "authenticationStatus": "Unauthenticated"
      }
    ],
    "sessionId": "<string>",
    "durationMs": 123,
    "endTime": "2023-11-07T05:31:56Z",
    "response": {},
    "truncatedResponse": "<string>",
    "responseFile": {
      "id": "<string>",
      "name": "<string>",
      "mimeType": "<string>",
      "sizeBytes": 123,
      "downloadUrl": "<string>",
      "key": "<string>"
    },
    "browserSessionId": "<string>",
    "browserSessionVendorId": "<string>",
    "errorAnalysis": "<string>",
    "status": "Completed",
    "context": {},
    "downloads": {
      "status": "pending",
      "files": [
        {
          "id": "<string>",
          "name": "<string>",
          "mimeType": "<string>",
          "sizeBytes": 123,
          "downloadUrl": "<string>",
          "key": "<string>"
        }
      ],
      "message": "<string>"
    },
    "parentExecutionId": "<string>"
  }
}

Body

application/json
params
object
required

Runtime parameters for the workflow execution

Example:
{
"origin": "New York",
"destination": "Los Angeles"
}
workflowId
string

ID of the workflow to execute. Either workflowId or workflowName must be provided.

workflowName
string

Name of the workflow to execute. If provided, the workflow will be looked up by name within the organization. Either workflowId or workflowName must be provided.

loginId
string

ID of the login to use for authentication

name

Optional name for the execution (string or number, automatically converted to string)

Example:

"User batch execution"

timeout
integer

Optional timeout in seconds for the execution (defaults to 10800 seconds / 3 hours)

Example:

10800

useProxy
boolean
default:false

Whether to use a proxy for this execution

startBlockId
string

Optional ID of the block to start execution from

Example:

"1"

batchId
string

Optional ID of the execution batch to assign this execution to

Example:

"batch_123"

isTest
boolean
default:false

Whether this execution is a test run

Response

Workflow execution completed successfully

Synchronous workflow execution result with finished execution data

execution
Completed Execution · object
required

Recording of a successfully completed workflow execution