PATCH
/
v1
/
testset
/
{testset_id}
curl --request PATCH \
  --url https://api.getscorecard.ai/v1/testset/{testset_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "Example Testset",
  "description": "A testset to finally confirm if the moon is made of cheese.",
  "using_retrieval": true,
  "custom_schema": {
    "variables": [
      {
        "data_type": "file_url",
        "description": "example file url",
        "name": "example_file_url",
        "role": "input"
      },
      {
        "data_type": "json_object",
        "description": "example json object",
        "name": "example_json_object",
        "role": "output"
      },
      {
        "data_type": "text",
        "description": "example text",
        "name": "example_text",
        "role": "label"
      }
    ]
  }
}'
{
  "id": 1,
  "created_at": "2025-02-06T00:05:50.224015",
  "name": "Example Testset",
  "description": "A testset to finally confirm if the moon is made of cheese.",
  "using_retrieval": true,
  "ingestion_method": "manual",
  "num_testcases": 10,
  "published": true,
  "updated_at": "2025-02-07T00:05:50.224392",
  "is_archived": true,
  "project_id": 1,
  "custom_schema": {
    "variables": [
      {
        "data_type": "file_url",
        "description": "example file url",
        "name": "example_file_url",
        "role": "input"
      },
      {
        "data_type": "json_object",
        "description": "example json object",
        "name": "example_json_object",
        "role": "output"
      },
      {
        "data_type": "text",
        "description": "example text",
        "name": "example_text",
        "role": "label"
      }
    ]
  },
  "created_by_playground": true
}

Authorizations

X-API-Key
string
header
required

Path Parameters

testset_id
integer
required

The ID of the Testset to update.

Body

application/json
name
string | null
description
string | null

A description for the testset.

using_retrieval
boolean | null

Whether or not the testset uses retrieval.

custom_schema
object | null

Custom schema model with an ordered list of custom variables.

Response

200
application/json
Successful Response
id
integer | null

The ID of the testset.

created_at
string | null

The creation date and time of the testset.

name
string | null

A human-readable name for the testset. This will be displayed in the UI.

description
string | null

A description for the testset.

using_retrieval
boolean | null

Whether or not the testset uses retrieval.

ingestion_method
string | null

The method used to ingest the testset.

num_testcases
integer | null
default:
0

The number of testcases in the testset.

published
boolean | null

Whether or not the testset is published.

updated_at
string | null

The last time the testset was updated.

is_archived
boolean | null
default:
false

Whether or not the testset is archived.

project_id
integer | null

The ID of the project the testset belongs to.

custom_schema
object | null

Custom schema model with an ordered list of custom variables.

created_by_playground
boolean | null
default:
false

Whether or not the testset was created by the playground.