Get egress breakdown for a billing group

This call returns an egress 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.sbgenomics.com/v2/billing/groups/{billing_group}/breakdown/egress
https://eu-api.sbgenomics.com/v2/billing/groups/{billing_group}/breakdown/egress

Example request

GET /v2/billing/groups/8ccc6222-ef6f-4526-99d7-9f56b716d43a/breakdown/egress HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl -s -H "X-SBG-Auth-Token: 8ccc6222-ef6f-4526-99d7-9f56b716d43a" -H "content-type: application/json" - X GET "https://api.sbgenomics.com/v2/billing/groups/eb5fdee2-36c3-41d1-b179-d9f5d0a0f6f7/breakdown/egress"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

billing_group = api.billing_groups.get(
    id='8ccc6222-ef6f-4526-99d7-9f56b716d43a'
)

# 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

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

billing_group

The ID of the billing group.

Query parameters

Name

Data type

Description

limit

integer

The 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.

offset

integer

The 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.

fields

string

Selector specifying a subset of fields to include in the response.

date_from

string

Specify the starting date for retrieving egress analysis in the following format: mm-dd-yyyy.

date_to

string

Specify the ending date for retrieving egress analysis in the following format: mm-dd-yyyy.

invoice_id

string

Specify Invoice ID to show a breakdown for the specific invoice.

If omitted, the current spending breakdown is returned.

Response

See the list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
  "href":" https://api.sbgenomics.com/v2/billing/groups/8ccc6222-ef6f-4526-99d7-9f56b716d43a/breakdown/egress?offset=0&limit=1",
  "items": [
    {
      "project_name": "my project",
      "project_locked": false,
      "downloaded_by":"rfranklin",
      "downloaded": {
          "size": "0.005730",
          "unit": "GB"
      }
      "egress_cost": {
          "currency": "USD",
          "amount": "0.000516"
      }
    }
  ],
  "links": [
     {
       "href": "https://api.sbgenomics.com/v2/billing/groups/8ccc6222-ef6f-4526-99d7-9f56b716d43a/breakdown/egress?offset=1&limit=1",
       "rel": "next",
       "method": "GET"
     }
  ]
}

Example of a response for a locked project

{
    "href": "https://api.sbgenomics.com/v2/billing/groups/f9fd8fa0-e570-48a0-be00-335957f5ed2c/breakdown/egress?offset=0&limit=1",
    "items": [
        {
            "project_locked": true,
            "downloaded": {
                "size": "0.005730",
                "unit": "GB"
            },
            "egress_cost": {
                "currency": "USD",
                "amount": "0.000516"
            }
        }
    ],
    "links": [
     {
       "href": "https://api.sbgenomics.com/v2/billing/groups/f9fd8fa0-e570-48a0-be00-335957f5ed2c/breakdown/egress?offset=1&limit=1",
       "rel": "next",
       "method": "GET"
     }
  ]
}