-
Story
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
5
-
False
-
-
False
-
BIZ-679 - Ansible on AWS, SaaS
-
-
Summary
Implement a new endpoint to return the list of billing_provider_ids for all instances currently reporting under a specified org_id and optional product_tag/billing_provider
Acceptance Criteria
Endpoint Details:
New GET endpoint at /api/swatch-tally/v1/instances/billing_provider_ids
Required Parameters:
org_id, string, can support one or multiple values
Optional Parameters:
product_tag, string
billing_provider, string
Headers:
x-rh-identity
Authorization:
Admin Users: If the user is an admin, the org_id in the header does not need to match the org_id in the query parameters.
Non-Admin Users: If the user is not an admin, the org_id in the header must match the org_id in the query parameters. If it does not, return a 403 Unauthorized response.
Response:
200 OK: Returns an array of objects with fields:
- product_tag
- billing_provider
- billing_provider_id
If no billing provider IDs match the specified filters, return an empty array.
Configuration:
Add an entry to the nginx reverse proxy configuration in the swatch-api to direct requests to /api/rhsm-subscriptions/v1/instances/billing_provider_ids to /api/swatch-tally/v1/instances/billing_provider_ids
Performance Consideration:
Consider which "starting point" (e.g. host_tally_buckets, tally_snapshots) will have the lowest cardinality of data loaded into memory
- clones
-
SWATCH-3028 Create API to query billing_provider_ids for active subscriptions
- Backlog