Get actual output generated by a regression test in a run

GET /runs/{run_id}/samples/{sample_id}/actual

IMPORTANT: TestResultFile.got = null means the actual output MATCHED expected, not that actual output is missing. This is a semantic trap in the data model. Missing output is represented by a dummy row (-1,-1,-1,'','error') which the API translates to status=missing_output and returns 404. A 200 response always contains a real output file.

Path parameters

  • run_id integer Required

    Numeric run ID

    Minimum value is 1.

  • sample_id integer Required

    Numeric sample or regression result ID

    Minimum value is 1.

Query parameters

  • regression_id integer Required

    Regression test definition ID

    Minimum value is 1.

  • output_id integer Required

    Output file ID within a regression test definition

    Minimum value is 1.

  • format string

    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 text or base64. Default value is base64.

Responses

  • 200 application/json

    Actual output file (output exists and differs from expected)

    Hide response attributes Show response attributes object
    • run_id integer | null

      Null for expected output not tied to a specific run.

      Minimum value is 1.

    • sample_id integer Required

      Minimum value is 1.

    • regression_id integer Required

      Minimum value is 1.

    • output_id integer Required

      Minimum value is 1.

    • filename string Required

      Maximum length is 255.

    • content_type string Required

      Maximum length is 100.

    • encoding string Required

      utf-8 only when file is confirmed text. Default is base64.

      Values are utf-8 or base64.

    • content string Required

      Maximum length is 1048576.

    • sha256 string

      Format should match the following pattern: ^[a-fA-F0-9]{64}$.

    • storage_status string Required

      ok = verified in both local and GCS storage. degraded = exists in one backend only. missing = not found in either backend.

      Values are ok, degraded, or missing.

  • 204

    No actual file stored. got=null in the DB means output matched expected. Use /expected to retrieve the matched content.

  • 401 application/json

    Missing, expired, or invalid bearer token

    Hide response attributes Show response attributes object
    • code string Required

      Machine-readable error code (snake_case)

      Maximum length is 100.

    • message string Required

      Human-readable error summary

      Maximum length is 500.

    • details object Required

      Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available.

      Additional properties are allowed.

  • 403 application/json

    Token is valid but lacks the required scope or role

    Hide response attributes Show response attributes object
    • code string Required

      Machine-readable error code (snake_case)

      Maximum length is 100.

    • message string Required

      Human-readable error summary

      Maximum length is 500.

    • details object Required

      Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available.

      Additional properties are allowed.

  • 404 application/json

    Resource not found

    Hide response attributes Show response attributes object
    • code string Required

      Machine-readable error code (snake_case)

      Maximum length is 100.

    • message string Required

      Human-readable error summary

      Maximum length is 500.

    • details object Required

      Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available.

      Additional properties are allowed.

  • 429 application/json

    Too many requests. Retry after the indicated number of seconds.

    Hide headers attributes Show headers attributes
    • Retry-After integer

      Seconds to wait before retrying

    • X-RateLimit-Limit

      Maximum requests allowed in the current window

    • X-RateLimit-Remaining

      Requests remaining in the current window

    • X-RateLimit-Reset

      Unix timestamp when the rate limit window resets

    Hide response attributes Show response attributes object
    • code string Required

      Machine-readable error code (snake_case)

      Maximum length is 100.

    • message string Required

      Human-readable error summary

      Maximum length is 500.

    • details object Required

      Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available.

      Additional properties are allowed.

  • default application/json

    Unexpected server error

    Hide response attributes Show response attributes object
    • code string Required

      Machine-readable error code (snake_case)

      Maximum length is 100.

    • message string Required

      Human-readable error summary

      Maximum length is 500.

    • details object Required

      Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available.

      Additional properties are allowed.

GET /runs/{run_id}/samples/{sample_id}/actual
curl \
 --request GET 'https://sampleplatform.ccextractor.org/api/v1/runs/{run_id}/samples/{sample_id}/actual?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": {}
}