Get storage breakdown for a billing group

This call returns a storage breakdown for a billing group.

To find the billing_group, use the call list billing groups to list all your billing groups.

Request

https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/billing/groups/{billing_group}/breakdown/storage

Example request

GET /v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown/storage HTTP/1.1 Host: api.sb.biodatacatalyst.nhlbi.nih.gov X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" - X GET "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown/storage"
from sevenbridges import Api api = Api(url='https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2', token='3210a98c1db9318fa9d9273156740f74') billing_group = api.billing_groups.get( id='ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7' ) # send GET request to SB API breakdown = billing_group.breakdown() print(breakdown.total_spending.currency, breakdown.total_spending.amount) for project_breakdown in breakdown.project_breakdown: print(project_breakdown.analysis_spending.currency, project_breakdown.analysis_spending.amount) print(len(project_breakdown.task_breakdown))

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your Platform authentication token.

Path parameters

NameDescription
billing_groupThe ID of the billing group.

Query parameters

NameData typeDescription
limitstringThe maximum number of collection items to return for a single request.

The default value is 50, while the maximum value is 100.

This is a pagination-specific attribute.
offsetstringThe zero-based starting index in the entire collection of the first item to return.

The default value is 0. This is a pagination-specific attribute.
fieldsstringSelector specifying a subset of fields to include in the response.
date_fromstringSpecify the starting date for retrieving storage analysis in the following format: mm-dd-yyyy.
date_tostringSpecify the ending date for retrieving storage analysis in the following format: mm-dd-yyyy.
invoice_idstringSpecify Invoice ID to show a breakdown for the specific invoice.

If omitted, the current spending breakdown is returned.

Response

See a list of specific response codes that may be contained in the body of the response.

Example response body

{ "href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/billing/groups/ec1dc1e3-142a3-4b56-789c-e3f2dca0c6f7/breakdown/storage?offset=0&limit=2", "items": [ { "project_name": "my project", "project_locked": false, "project_created_by":"voluptatem-pariatu/rfranklin", "active": { "size": "0.032300", "unit": "GB/Month", "cost" { "amount": "0.0023", "currency": "USD" } }, "archived": { "size": "0.000000", "unit": "GB/Month", "cost" { "amount": "0.0023", "currency": "USD" } }, "location": "aws:us-east-1" }, { "project_name": "my project", "project_locked": false "project_created_by": "div/rfranklin", "active": { "size": "0.032300", "unit": "GB/Month", "cost" { "amount": "0.0023", "currency": "USD" } }, "archived": { "size": "0.000000" "unit": "GB/Month", "cost" { "amount": "0.0023", "currency": "USD", } }, "links": [ { "href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown/storage?offset=2&limit=2", "rel": "next", "method": "GET" }

Example of a response for a locked project

{ "href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown/storage?offset=0&limit=5", "items": [ { "active": { "size": "0.032300", "unit": "GB/Month" }, "archived": { "size": "0.000000", "unit": "GB/Month" }, "cost" { "amount": "0.0023", "currency": "USD" }, "project_locked": true } ], "links": [] }