PATCH
/
apps
/
{app_id}
/
workflows
/
{workflow_id}
/
tests
/
expectations
/
{expectation_id}
curl --request PATCH \
  --url https://api.withcortex.ai/apps/{app_id}/workflows/{workflow_id}/tests/expectations/{expectation_id} \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "script": "<string>"
}'
{
  "id": "<string>",
  "name": "<string>",
  "script": "<string>",
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25"
}

Path Parameters

app_id
string
required

The ID of the app

workflow_id
string
required

The ID of the workflow

expectation_id
string
required

The ID of the expectation

Body

Detailed information about an expectation within a workflow

name
string

Name of the expectation (max 256 characters)

Required string length: 1 - 256
script
string

JavaScript code that results in a boolean value determining if the expectation passed or failed

Maximum length: 10240

Response

200 - application/json

Detailed information about an expectation within a workflow

id
string
required

Unique identifier for the expectation

name
string
required

Name of the expectation (max 256 characters)

Required string length: 1 - 256
script
string
required

JavaScript code that results in a boolean value determining if the expectation passed or failed

Maximum length: 10240
created_at
string | null
required

Creation date of the expectation

updated_at
string | null
required

Last update date of the expectation