On this page

    Billing Transactions

    Use the Billing API to retrieve information about transactions performed on billing accounts.

    Billing-Transaction Object
    {
      "id": "40bf837e-fd97-4d7d-bb3d-0cefd76ae9ca",
      "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
      "type": "CREDIT_LOAD",
      "attributes": {
        "description": "Free DCUs from Dremio!"
      },
      "invoice": "",
      "creditDelta": 1000,
      "createdAt": 1644423410015
    }
    

    Billing-Transaction Attributes

    id

    String

    The UUID of the billing transaction.


    billingId

    String

    The UUID of the billing account the transaction refers to.


    type

    String

    The type of transaction.

    Enum USAGE , CREDIT_LOAD , CREDIT_EXPIRED


    attributes

    String

    Additional information about the transaction. The type of information included depends on the type of transaction.


    invoice

    String

    A URL for the invoice associated with the transaction. Can be null.


    creditDelta

    Double

    The change in credits for this transaction.


    createdAt

    Integer

    The number of milliseconds since UNIX epoch at which the transaction was created.


    attributes

    startDate

    Integer

    When the transaction type is USAGE: The number of milliseconds since UNIX epoch at which the usage began.


    endDate

    Integer

    When the transaction type is USAGE: The number of milliseconds since UNIX epoch at which the usage ended.


    description

    String

    When the transaction type is CREDIT_LOAD: Optional additional notes about the transaction.


    expiredAt

    Integer

    When the transaction type is CREDIT_EXPIRED: The number of milliseconds since UNIX epoch at which the credit expired.


    Listing All Transactions for a Billing Account

    Lists the transactions that have been performed in the billing account specified by its ID.

    List All Transactions for a Billing Account
    GET /v0/organizations/{organizationId}/billing/{id}/transactions
    

    Parameters

    organizationId

    path

    String

    The UUID for the organization.


    id

    path

    String

    The UUID for the billing account.

    Example Request
    curl -X GET 'https://api.dremio.cloud/v0/organizations/3b4046f3-94c3-404b-85bb-f7deb8652a40/billing/cebe4692-498e-4c04-81ac-8ad04210ca9d/transactions' \
    -H 'Authorization: Bearer <personal access token>' \
    -H 'Content-Type: application/json'
    
    Example Response
    {
      "data": [
        {
          "id": "40bf837e-fd97-4d7d-bb3d-0cefd76ae9ca",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 1000 DCUs."
          },
          "invoice": "",
          "creditDelta": 1000,
          "createdAt": 1644423410015
        },
        {
          "id": "301f79b4-3d02-4ccf-b42e-bb8472cb32dc",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 10 DCUs"
          },
          "invoice": "",
          "creditDelta": 10,
          "createdAt": 1644523726133
        },
        {
          "id": "077192cb-cf99-4dd6-8371-0602dc807a1e",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 23 DCUs"
          },
          "invoice": "",
          "creditDelta": 23,
          "createdAt": 1644524431748
        },
        {
          "id": "d4ede155-b519-4237-9800-f55787d892e3",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 15 DCUs"
          },
          "invoice": "",
          "creditDelta": 15,
          "createdAt": 1644524431748
        },
        {
          "id": "2da12850-174a-4ab8-a353-083400fd7aaa",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 30 DCUs"
          },
          "invoice": "",
          "creditDelta": 30,
          "createdAt": 1644524431748
        },
        {
          "id": "ea0eef10-57ed-4cce-8d9b-7dcda36fe50a",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 100 DCUs"
          },
          "invoice": "",
          "creditDelta": 100,
          "createdAt": 1644524431748
        },
        {
          "id": "e7c9f50e-4193-4c69-9e3f-355a5ecb4b55",
          "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
          "type": "CREDIT_LOAD",
          "attributes": {
            "description": "Adding 50 DCUs"
          },
          "invoice": "",
          "creditDelta": 50,
          "createdAt": 1644523726133
        }
      ],
      "nextPageToken": null,
      "previousPageToken": null,
      "totalResults": 7
    }
    

    Responses

    200

    Success.

    401

    User is not allowed to view transactions for this billing account.

    404

    No billing account with the provided ID was found.


    Retrieving a Transaction for a Billing Account

    Retrieves information about a transaction, specified by its ID, performed in a billing account specified by its ID.

    Retrieve a Transaction for a Billing Account
    GET /v0/organizations/{organizationId}/billing/{billingId}/transactions/{id}
    

    Parameters

    organizationId

    path

    String

    The UUID for the organization.


    billingId

    path

    String

    The UUID for the billing account.


    transactionId

    path

    String

    The UUID for the transaction.

    Example Request
    curl -X GET 'https://api.dremio.cloud/v0/organizations/3b4046f3-94c3-404b-85bb-f7deb8652a40/billing/cebe4692-498e-4c04-81ac-8ad04210ca9d/transactions/40bf837e-fd97-4d7d-bb3d-0cefd76ae9ca' \
    -H 'Authorization: Bearer <personal access token>' \
    -H 'Content-Type: application/json'
    
    Example Response
    {
      "id": "40bf837e-fd97-4d7d-bb3d-0cefd76ae9ca",
      "billingId": "cebe4692-498e-4c04-81ac-8ad04210ca9d",
      "type": "CREDIT_LOAD",
      "attributes": {
        "description": "Adding 1000 DCUs"
      },
      "invoice": "",
      "creditDelta": 1000,
      "createdAt": 1644423410015
    }
    

    Responses

    200

    Success.

    401

    User is not allowed to view this billing transaction.

    404

    Transaction not found.