Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3028

Create API to query billing_provider_ids for active subscriptions

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • BIZ-679 - Ansible on AWS, SaaS

      Summary
      Implement a new endpoint to return the list of billing_provider_ids for all subscriptions for a specified org_id and optional product_tag/billing_provider
       
      Acceptance Criteria
      Endpoint Details:
      New GET endpoint at /api/swatch-contracts/v1/subscriptions/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/subscriptions/billing_provider_ids to /api/swatch-contracts/v1/subscriptions/billing_provider_ids

              Unassigned Unassigned
              bcourt@redhat.com Barnaby Court
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: