Retrieve a Playbook Run - Cognigy Documentation

Retrieve a Playbook Run

HTTP Request

GET /v2.0/playbooks/{playbookId}/runs/{playbookRunId}

Example cURL Request

curl --request GET \
  --url https://api-trial.cognigy.ai/new/v2.0/playbooks/{playbookId}/runs/{playbookRunId} \
  --header 'X-API-Key: <api-key>'

Example Python Request

import requests

url = "https://api-trial.cognigy.ai/new/v2.0/playbooks/{playbookId}/runs/{playbookRunId}"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)

Example JavaScript Fetch Request

const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api-trial.cognigy.ai/new/v2.0/playbooks/{playbookId}/runs/{playbookRunId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Response Codes

Successful Response Body Example

{
  "status": "successful",
  "_id": "<string>",
  "createdAt": 1694518620,
  "lastChanged": 1694518620,
  "createdBy": "<string>",
  "lastChangedBy": "<string>",
  "stepResults": [
    {
      "status": "failed",
      "text": "Hello, how are you?",
      "data": {},
      "_id": "<string>",
      "asserts": [
        {
          "type": "assertText",
          "status": "failed",
          "params": {},
          "negate": false,
          "actual": {},
          "_id": "<string>"
        }
      ],
      "timeout": true
    }
  ],
  "flowId": "uuid",
  "localeId": "uuid",
  "entrypoint": "^[a-z0-9]{24}$"
}

Error Response Body Example

{
  "type": "Bad Request",
  "title": "Bad Request Error",
  "status": 400,
  "detail": "Validation failed. Missing payload.",
  "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
  "code": 1000,
  "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
  "details": {}
}

Authorizations

Headers

Path Parameters