# Get expected output for a regression test result **GET /runs/{run_id}/samples/{sample_id}/expected** 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. ## Servers - Production: https://sampleplatform.ccextractor.org/api/v1 (Production) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **run_id** (integer) Numeric run ID - **sample_id** (integer) Numeric sample or regression result ID ### Query parameters - **regression_id** (integer) Regression test definition ID - **output_id** (integer) Output file ID within a regression test definition - **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. ## Responses ### 200 Expected output file #### Body: application/json (object) - **run_id** (integer | null) Null for expected output not tied to a specific run. - **sample_id** (integer) - **regression_id** (integer) - **output_id** (integer) - **filename** (string) - **content_type** (string) - **encoding** (string) utf-8 only when file is confirmed text. Default is base64. - **content** (string) - **sha256** (string) - **storage_status** (string) ok = verified in both local and GCS storage. degraded = exists in one backend only. missing = not found in either backend. ### 401 Missing, expired, or invalid bearer token #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### 403 Token is valid but lacks the required scope or role #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### 404 Resource not found #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### 429 Too many requests. Retry after the indicated number of seconds. #### Headers - **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 #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### default Unexpected server error #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. [Powered by Bump.sh](https://bump.sh)