Run Configuration Test
Runs an inline test of a given configuration against an eICR/RR pair.
This endpoint orchestrates the validation and refinement process by:
- Handling file input, either from a user upload or a default sample file.
- Calling the inline_testing service, which validates that the specified configuration's condition is reportable in the provided file.
- Handling the service response:
- If validation fails, raises a 400 Bad Request with a specific error.
- If successful, proceeds with the returned refined document.
- Packaging the original eICR, RR, and the single refined eICR into a new in-memory zip archive.
- Uploading the archive to S3 and generating a pre-signed download URL.
- Returning a ConfigurationTestResponse with the download URL and details of the successful refinement.
Args: id: The ID of the configuration to test. uploaded_file: An optional user-provided zip file with an eICR and RR. create_output_zip: Dependency to create a zip archive in memory. upload_zip: Dependency to upload the archive to S3. user: The authenticated user making the request. db: The database connection. sample_zip_path: Path to the default sample zip file. logger: The application logger.
Returns: A response object containing the original eICR, a URL to download the zipped results, and details about the refined condition.
Request
- The document declares no server URL.
- Auth: none declared
Response
Successful Response
Changes
No recorded changes to this operation across all 50 revisions of this API.