configurations

Run Configuration Test

Changed on

Runs an inline test of a given configuration against an eICR/RR pair.

This endpoint orchestrates the validation and refinement process by:

  1. Handling file input, either from a user upload or a default sample file.
  2. Calling the inline_testing service, which validates that the specified configuration's condition is reportable in the provided file.
  3. Handling the service response:
    • If validation fails, raises a 400 Bad Request with a specific error.
    • If successful, proceeds with the returned refined document.
  4. Packaging the original eICR, RR, and the single refined eICR into a new in-memory zip archive.
  5. Uploading the archive to S3 and generating a pre-signed download URL.
  6. 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.

post/api/v1/configurations/test

Request

  • The document declares no server URL.
  • Auth: none declared

Response

Successful Response

original_eicrstring required
refined_download_keystring required

Changes

    • breaking

      removed the required property / from the response with the status

    • info

      added the required property / to the response with the status

    • breaking

      the / request property contentMediaType changed from to application/octet-stream

    • info

      the / request property format was generalized from binary to no format