Overview

Send POST /v1/request to create a request that runs an automation workflow, for example from a change portal or a chat bot. You name the workflow by its Public ID and pass its custom variables.

You need
A request API token and a workflow's Public ID
Where
Your script or tool
Result
Workflows started by code

Request

  • URL: https://sqibs.callgoose.com/sqibs-api/v1/request, plus optional ?from=<label> (the request is titled Request from <label>).
  • Auth: a Request type token, as Authorization: Bearer <token> or ?token=<token>.
  • Body: JSON with workflowId (the workflow's Public Id, from the workflow in Automation Workflow) and one key per custom variable of the workflow.
curl -X POST 'https://sqibs.callgoose.com/sqibs-api/v1/request?from=change-portal' \
  -H 'Authorization: Bearer <your-request-token>' \
  -H 'Content-Type: application/json' \
  -d '{"workflowId": "<workflow-public-id>", "ServerName": "web-01"}'

Response

{
  "id": "<api-id>",
  "created": true
}
Code Meaning
201 Request created; the workflow runs.
202 Processed, but no workflow matches the payload (check workflowId).
208 Duplicate within the token's deduplication time; ignored.
401 Token not valid, or not a request token.
500 Temporary error; try again.

Example (Python)

import requests

r = requests.post(
    "https://sqibs.callgoose.com/sqibs-api/v1/request?from=change-portal",
    json={"workflowId": "<workflow-public-id>", "ServerName": "web-01"},
    headers={"Authorization": "Bearer <your-request-token>"},
    timeout=30,
)
print(r.status_code, r.json())