- 
    Task 
- 
    Resolution: Done
- 
    Major 
- 
    None
- 
    None
- 
    None
- 
        5
- 
        False
- 
        
- 
        False
- 
        subs-swatch-thunder
- 
        
- 
        
The endpoint is already defined in the openapi.yaml file and has a default implementation that returns a 501 Not Implemented.
Implement the API such that:
- It is secured using the test security role (should use an API key via the x-rh-swatch-psk header).
- It uses the outbox repository to fetch the all of the existing outbox records using the org_id path parameter.
Required Testing
- Unit tests covering the endpoint.
- Existing IQE component test is updated
	- Rename to test_fetch_all_outbox_records
- Uses the POST API to create outbox records with different org_ids and use the GET API to fetch the records matching the org_id parameter.
 
- Existing IQE POST API test is updated to make use of the GET API to assert that the correct record exists.
- Tests are added to validate that the endpoint is secured appropriately for each role.
- Thought has been given to any other negative test cases that might be out of scope of this card, and are documented somewhere.
Acceptance Criteria
- The endpoint can be used to fetch all outbox records by org_id and is properly secured.
- Adequate test coverage exists.
- is blocked by
- 
                    SWATCH-3777 Define and generate an internal REST API for the swatch-metrics-hbi outbox records. -         
- Release Pending
 
-         
- 
                    SWATCH-3778 Implement POST /api/swatch-metrics-hbi/internal/outbox -         
- Release Pending
 
-         
- 
                    SWATCH-3862 Configure swatch-common-security in swatch-metrics-hbi -         
- Closed
 
-