Billing: get consumption data from the new operator

Description

PRDE - Story default text according to the team DoR (Definition of Ready)

01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):
02 - STORY BRIEFING (AS A < PERSONA >, I [WANT TO] < NEED >, [SO THAT] < GOAL >):
03 - PROBLEM (WHAT'S THE CURRENT PROBLEM SCENARIO OR PAIN TO BE RESOLVED?):
04 - GOAL (DESCRIBE THE PROPOSED SOLUTION):

SRE released a new version of the operator allowing the billing to get the consumption data grouped by date.

Before, we were calling like:

curl        'https://api.operator.carol.ai/api/billing/report?start=2020-11-01&end=2020-12-01' -H 'accept: application/json' -H 'content-type: application/json' -H 'x-auth-token: TOKEN' --compressed

And it was returning:

[
    {
        "billing_id": "adp",
        "details": [
            {
                "machine_type": "c1.medium",
                "preemptible": true,
                "hours": 0.18139835361111112
            }
        ]
    }
]

Now we need to call:

'https://api.operator.carol.ai/api/billing/report?start=2020-11-01&end=2020-12-01&group_by=day'

And it will return the data grouped daily for the specified period:

[
    {
        "billing_id": "adp",
        "details": [
            {
                "machine_type": "c1.medium",
                "preemptible": true,
                "hours": 0.1016954875,
                "date": "2020-11-28"
            },
            {
                "machine_type": "c1.medium",
                "preemptible": true,
                "hours": 0.0797028661111111,
                "date": "2020-11-29"
            }
        ]
    }
]

05 - WHO CAN USE THIS FEATURE (USER ROLES):
06 - ACTIVITY DIAGRAM (ACTIVITY DIAGRAM LINK AND IMAGE):
07 - STEPS (ACTIONS TO BE PERFORMED LINKING TO SCREENSHOTS):
08 - ALTERNATIVE STEPS:
09 - ASSETS (FIGMA LINKS, RELEVANT DOCUMENTATION LINKS, JSON EXAMPLES, ETC):
10 - ACCEPTANCE CRITERIA:

  • Billing storing Carol App Execution time data grouped daily.