Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-1001

Historical View API query parameter update for daily resolution

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • 2021Q2
    • None
    • None
    • False
    • False
    • COST-573 - Historical view: show 12 to 15 months of data, or a selection of dates instead of monthly data
    • Undefined

      Cost Management Historical views will initially support going back 3 billing periods (~90 days).

      Work will be completed in a separate issue to extend our summary window from 2 billing periods to 3.

      In order for the frontend to get the reporting data needed to fulfill the Historical view perspectives we need to introduce new query parameters to enable the frontend to query based on start and end dates.

      These new parameters should not modify how the existing time_scope_value and time_scope_units works today.

      The view serializer should not allow a start_date that extends past our materialized view window (today 2 billing periods, later it will be 3).  An error should be returned in the event that an API query is made that goes beyond the materialized view range so that we can mitigate any performance problems.

       

      Some examples of queries that should be equivalent: 

       

      If today is Feb 9, 2021

      ?filter[time_scope_units]=month&filter[time_scope_value]=-1&filter[resolution]=daily

      should have the same response as 

       

      ?start_date=2021-02-01&end_date=2021-02-09&filter[resolution]=daily
      

       

      This issue is focused on adding the new query parameters for the daily resolution.  Monthly resolution will be done in a separate Jira issue.

      Acceptance Criteria:

      • New start and end query parameters are added to the report APIs
      • API should throw a 400 response if a query is made to exceed our materialized view window.
      • API should throw a 400 response if start/end parameters are used with monthly resolution.
      • No changes should be made to the API or response for existing time_scope_value parameters.
      • API should return correct report API responses for any date range within the materialized view window

       

              blentz@redhat.com Brett Lentz (Inactive)
              docurtis Doug Curtis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: