Get breakdown for a billing group

/billing/groups/{billing_group}/breakdown

This call returns a breakdown of spending per-project for the billing group specified by billing_group. For each project that the billing group is associated with, information is shown on each task run, including its initiating user (the runner_username), start and end times, and cost.

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

https://cgc-api.sbgenomics.com/v2/billing/groups/{billing_group}/breakdown

📘

Billing periods

The spending will be shown for the current billing period, unless the billing group specified is a free billing group (i.e. pilot funds that you are using the CGC with), in which case all spending on the account will be shown.

Request

Example request

GET /v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown HTTP/1.1
Host: cgc-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://cgc-api.sbgenomics.com/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown"

Header Fields

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

Path parameters

NameDescription
billing_groupThe ID of the billing group.

Query parameters

NameData typeDescription
fieldsstringSelector specifying a subset of fields to include in the response.

Response

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

Example response body

{
  "href": "https://cgc-api.sbgenomics.com/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown",
  "project_breakdown": [
    {
      "href": "https://cgc-api.sbgenomics.com/v2/projects/RFranklin/my_project",
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.23"
      },
      "task_breakdown": [
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/1fd125fa-789c-45b6-12b3-2a3ab3bedcba",
          "runner_username": "Rfranklin",
          "time_started": "2015-12-11T11:03:08Z",
          "time_finished": "2015-12-11T11:08:49Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        }
      ]
    },
    {
      "href": "https://cgc-api.sbgenomics.com/v2/projects/RFranklin/test",
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.92"
      },
      "task_breakdown": [
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/f0b89de2-45b6-789c-12b3-05b832c576c6",
          "runner_username": "RFranklin",
          "time_started": "2015-11-26T14:15:18Z",
          "time_finished": "2015-11-26T14:20:30Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/67f68072-45b6-12b3-789c-37be8b0f2f04",
          "runner_username": "RFranklin",
          "time_started": "2015-11-25T16:26:23Z",
          "time_finished": "2015-11-25T16:30:46Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/723c949a-789c-12b3-45b6-b2dd0d8d0021",
          "runner_username": "RFranklin",
          "time_started": "2015-11-26T12:11:58Z",
          "time_finished": "2015-11-26T12:16:33Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
      ]
    },
    {
      "href": "https://cgc-api.sbgenomics.com/v2/projects/Rfranklin/my-project",
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.46"
      },
      "task_breakdown": [
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/bd5e95d9-12b3-789c-45b6-34d8696571a9",
          "runner_username": "RFranklin",
          "time_started": "2015-11-25T14:02:13Z",
          "time_finished": "2015-11-25T14:07:06Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/48f79ccf-12b3-45b6-789c-b1e8d88dabcd",
          "runner_username": "RFranklin",
          "time_started": "2015-11-24T19:19:52Z",
          "time_finished": "2015-11-24T19:24:45Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
      ]
    },
    {
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.69"
      },
      "task_breakdown": [
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/468dca93-123a-45b6-78c9-a080151d0687",
          "runner_username": "RFranklin",
          "time_started": "2015-11-25T14:30:45Z",
          "time_finished": "2015-11-25T14:35:31Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/dc0e6559-123a-45b6-78c9-72e5bfb3c077",
          "runner_username": "RFranklin",
          "time_started": "2015-11-25T14:37:59Z",
          "time_finished": "2015-11-25T14:47:10Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        },
        {
          "href": "https://cgc-api.sbgenomics.com/v2/tasks/a8364b07-123a-45b6-78c9-045a3a2c41a1",
          "runner_username": "RFranklin",
          "time_started": "2015-11-25T14:43:02Z",
          "time_finished": "2015-11-25T14:48:18Z",
          "task_cost": {
            "currency": "USD",
            "amount": "0.23"
          }
        }
      ]
    }
  ],
  "total_spending": {
    "currency": "USD",
    "amount": "2.00"
  }
}
Language