Skip to Content
Eval suites

Update an eval scenario

Permissioneval-suites:updateAdd-onEvaluationsAuthentication
PATCH
/eval-suites/{id}/scenarios/{scenario_id}

Replaces only supplied mutable fields. The complete encoded request body is limited to 327680 bytes and assertions to 262144 encoded bytes. slug, source, generation_job_id, and position are immutable. Semantic no-ops return the unchanged ETag.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid
scenario_id*string
Formatuuid

Header Parameters

If-Match?string

Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.

Request Body

application/json
  1. body
Properties1 <= properties
label?string

Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint.

Lengthlength <= 200
persona_text?string

Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint.

Length1 <= length <= 20000
scenario_text?string

Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint.

Length1 <= length <= 20000
assertions?|

Nullable assertion object limited to 262144 encoded bytes when supplied.

Response Body

Updated or unchanged scenario.

application/json
  1. response
id*string
Formatuuid
slug*string

Stable stored handle. Historical compatibility rows predate the public create regex, so readers must not infer a character pattern.

Length1 <= length
label*string

Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint.

Lengthlength <= 200
persona_text*string

Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint.

Lengthlength <= 20000
scenario_text*string

Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint.

Lengthlength <= 20000
assertions*|

Stored assertion object; scenario mutation inputs are limited to 262144 encoded bytes.

source*string
Value in"manual""generated"
generation_job_id*|
Formatuuid
position*integer
Range0 <= value
version*integer
Formatint64
Range1 <= value
archived_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.kejue.co/v1/eval-suites/497f6eca-6276-4993-bfeb-53cbbbba6f08/scenarios/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "slug": "string",  "label": "string",  "persona_text": "string",  "scenario_text": "string",  "assertions": {},  "source": "manual",  "generation_job_id": "cbb45fb9-5d30-40f9-8e81-176f4e856bb3",  "position": 0,  "version": 1,  "archived_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}