Skip to main content
PATCH
/
api
/
v2
/
projects
/
{project_id}
/
prompt-datasets
/
{dataset_id}
/
test-cases
/
{test_case_id}
Update Prompt Test Case
curl --request PATCH \
  --url https://{host}.freeplay.ai/api/v2/projects/{project_id}/prompt-datasets/{dataset_id}/test-cases/{test_case_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inputs": {},
  "output": "<string>",
  "metadata": {},
  "history": [
    {
      "content": "<string>",
      "role": "user"
    }
  ],
  "media_inputs": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "inputs": {},
  "output": "<string>",
  "metadata": {},
  "media_inputs": {},
  "history": [
    {
      "content": "<string>",
      "role": "user"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required
dataset_id
string
required
test_case_id
string
required

Body

application/json
inputs
Inputs · object
output
string | null
metadata
Metadata · object
history
(UserMessage · object | SystemMessage · object | AssistantMessage · object)[] | null

A message from the user

media_inputs
Media Inputs · object

Response

200 - application/json

PromptTestCaseResponse(test_case: shared.sqlalchemy.models.TestCase, media_inputs: Optional[dict[str, server.project_sessions.types.MediaInputBase64]])

id
string<uuid>
required
inputs
Inputs · object
required
output
string | null
metadata
Metadata · object
media_inputs
Media Inputs · object
history
(UserMessage · object | SystemMessage · object | AssistantMessage · object)[] | null

A message from the user