Skip to main content
Trigger test evaluation for custom timestamp range
curl --request POST \
  --url https://api.openlayer.com/v1/tests/{testId}/evaluate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "startTimestamp": 1699920000,
  "endTimestamp": 1700006400,
  "inferencePipelineId": "123e4567-e89b-12d3-a456-426614174000",
  "overwriteResults": false
}
'
{
  "message": "Evaluation task queued successfully",
  "pipelineCount": 2,
  "requestedStartTimestamp": 1699920000,
  "requestedEndTimestamp": 1700006400,
  "tasks": [
    {
      "taskResultUrl": "<string>",
      "taskResultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "pipelineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.

Path Parameters

testId
string<uuid>
required

The test id.

Body

application/json
startTimestamp
integer<int64>
required

Start timestamp in seconds (Unix epoch)

Example:

1699920000

endTimestamp
integer<int64>
required

End timestamp in seconds (Unix epoch)

Example:

1700006400

inferencePipelineId
string<uuid>

ID of the inference pipeline to evaluate. If not provided, all inference pipelines the test applies to will be evaluated.

Example:

"123e4567-e89b-12d3-a456-426614174000"

overwriteResults
boolean
default:false

Whether to overwrite existing test results

Example:

false

Response

Evaluation task queued successfully. Timestamps will be aligned to evaluation window boundaries during execution.

message
string
required
Example:

"Evaluation task queued successfully"

pipelineCount
integer
required

Number of inference pipelines the test was queued for evaluation on

Example:

2

requestedStartTimestamp
integer<int64>
required

The start timestamp you requested (in seconds)

Example:

1699920000

requestedEndTimestamp
integer<int64>
required

The end timestamp you requested (in seconds)

Example:

1700006400

tasks
object[]
required

Array of background task information for each pipeline evaluation