Expected output is a file reference stored under TestResults using the regression output extension. Resolved from GCS or local SAMPLE_REPOSITORY at request time. storage_status reflects which backends have the file. Do not assume local and GCS are always in sync.
Path parameters
-
Numeric run ID
Minimum value is
1. -
Numeric sample or regression result ID
Minimum value is
1.
Query parameters
-
Regression test definition ID
Minimum value is
1. -
Output file ID within a regression test definition
Minimum value is
1. -
Content encoding for file responses. Use text only when the file is known to be UTF-8 compatible. Binary or unknown content defaults to base64.
Values are
textorbase64. Default value isbase64.
GET
/runs/{run_id}/samples/{sample_id}/expected
curl \
--request GET 'https://sampleplatform.ccextractor.org/api/v1/runs/{run_id}/samples/{sample_id}/expected?regression_id=42&output_id=42' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"run_id": 42,
"sample_id": 42,
"regression_id": 42,
"output_id": 42,
"filename": "string",
"content_type": "string",
"encoding": "utf-8",
"content": "string",
"sha256": "string",
"storage_status": "ok"
}
Response examples (401)
{
"code": "unauthorized",
"message": "Bearer token is missing, expired, or invalid.",
"details": {}
}
Response examples (403)
{
"code": "forbidden",
"message": "Token does not have the required scope for this operation.",
"details": {
"required_scope": "runs:write",
"token_scopes": [
"runs:read",
"results:read"
]
}
}
Response examples (404)
{
"code": "not_found",
"message": "Run 9317 not found.",
"details": {
"resource": "run",
"id": 9317
}
}
Response examples (429)
{
"code": "rate_limited",
"message": "Rate limit exceeded. Retry after 30 seconds.",
"details": {
"retry_after": 30,
"limit": 120,
"window": "60s"
}
}
Response examples (default)
{
"code": "not_found",
"message": "Run 9317 not found.",
"details": {}
}