Get breakdown for a billing group

/billing/groups/{billing_group}/breakdown

For general information on the API, including formatting, parameters, and pagination, please see the API Overview.

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://cavatica-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 Cavatica 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: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9304ea9d9873156740f74
curl -s -H "X-SBG-Auth-Token: 3210a98c1db9304ea9d9873156740f74" -H "content-type: application/json" - X GET "https://cavatica-api.sbgenomics.com/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your Cavatica 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 Cavatica-specific response codes that may be contained in the body of the response.

Example response body

{
  "href": "https://cavatica-api.sbgenomics.com/v2/billing/groups/ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7/breakdown",
  "project_breakdown": [
    {
      "href": "https://cavatica-api.sbgenomics.com/v2/projects/RFranklin/my_project",
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.23"
      },
      "task_breakdown": [
        {
          "href": "https://cavatica-api.sbgenomics.com/v2/tasks/48f79ccf-12b3-45b6-789c-b1e8d88dabcd",
          "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://cavatica-api.sbgenomics.com/v2/projects/RFranklin/test",
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.92"
      },
      "task_breakdown": [
        {
          "href": "https://cavatica-api.sbgenomics.com/v2/tasks/1fd125fa-789c-45b6-12b3-2a3ab3bedcba",
          "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://cavatica-api.sbgenomics.com/v2/tasks/f0b89de2-45b6-789c-12b3-05b832c576c6",
          "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://cavatica-api.sbgenomics.com/v2/tasks/67f68072-45b6-12b3-789c-37be8b0f2f04",
          "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://cavatica-api.sbgenomics.com/v2/projects/RFranklin2/my-project",
      "analysis_spending": {
        "currency": "USD",
        "amount": "0.46"
      },
      "task_breakdown": [
        {
          "href": "https://cavatica-api.sbgenomics.com/v2/tasks/723c949a-789c-12b3-45b6-b2dd0d8d0021",
          "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://cavatica-api.sbgenomics.com/v2/tasks/bd5e95d9-12b3-789c-45b6-34d8696571a9",
          "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://cavatica-api.sbgenomics.com/v2/tasks/48f79ccf-12b3-45b6-789c-b1e8d88dabcd",
          "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://cavatica-api.sbgenomics.com/v2/tasks/1fd125fa-789c-45b6-12b3-2a3ab3bedcba",
          "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://cavatica-api.sbgenomics.com/v2/tasks/f0b89de2-45b6-789c-12b3-05b832c576c6",
          "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