Get itemized costs by deployments. Currently unavailable in self-hosted ECE. Deprecated

GET /billing/costs/{organization_id}/deployments/{deployment_id}/items

EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the given deployment.

Headers

  • Accept string

    Determines the response body format. Can be either application/json or text/csv.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

Responses

  • The costs associated to a set items billed for a single deployment.

    Hide response attributes Show response attributes object
    • costs object Required

      Costs for the organization

      Additional properties are allowed.

      Hide costs attributes Show costs attributes object
      • total number(double) Required

        Total costs

      • dimensions array[object] Required

        A collection of billing details by dimension.

        Hide dimensions attributes Show dimensions attributes object
        • type string Required

          The type of the billing dimension

          Values are capacity, data_in, data_internode, data_out, storage_api, or storage_bytes.

        • cost number(double) Required

          The cost of the billing dimension

    • data_transfer_and_storage array[object] Required

      List of the detailed costs associated to the Data Transfer and Storage (DTS) dimensions

      Hide data_transfer_and_storage attributes Show data_transfer_and_storage attributes object
      • cost number(double) Required

        Costs associated to the Data Transfer and Storage (DTS) dimensions for an organization

      • name string Required

        DTS dimension name

      • quantity object Required

        DTS usage

        Additional properties are allowed.

        Hide quantity attributes Show quantity attributes object
      • rate object Required

        Cost per unit

        Additional properties are allowed.

        Hide rate attributes Show rate attributes object
      • sku string Required

        DTS dimension Stock Keeping Unit (SKU)

      • type string Required

        Type of the DTS dimension usage

    • resources array[object] Required

      Costs of the list of resources

      Hide resources attributes Show resources attributes object
      • hours integer(int64) Required

        Resource usage in hours

      • instance_count integer(int32) Required

        Number of instances

      • period object Required

        Period

        Additional properties are allowed.

        Hide period attributes Show period attributes object
        • start string(date-time) Required

          Start

        • end string(date-time) Required

          End

      • kind string Required

        Kind of resource

        Values are elasticsearch, kibana, apm, integrations_server, appsearch, or enterprise_search.

      • price number(double) Required

        Resource price

      • price_per_hour number(double) Required

        Price per hour

      • name string Required

        Resource name

      • sku string Required

        Stock Keeping Unit (SKU)

  • The specified date range is invalid. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

    • The organization was not found. (code: organization.not_found)
    • The Elasticsearch cluster was not found. (code: billing_service.es_cluster_id_not_found)
    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Values are organization.not_found or billing_service.es_cluster_id_not_found.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

  • An error occurred when fetching the itemized costs for the given deployment of the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

GET /billing/costs/{organization_id}/deployments/{deployment_id}/items
curl \
 -X GET https://api.elastic-cloud.com/api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/items \
 -H "Accept: string"
Response examples (200)
{
  "costs": {
    "total": 42.0,
    "dimensions": [
      {
        "type": "capacity",
        "cost": 42.0
      }
    ]
  },
  "data_transfer_and_storage": [
    {
      "cost": 42.0,
      "name": "string",
      "quantity": {
        "value": 42,
        "formatted_value": "string"
      },
      "rate": {
        "value": 42.0,
        "formatted_value": "string"
      },
      "sku": "string",
      "type": "string"
    }
  ],
  "resources": [
    {
      "hours": 42,
      "instance_count": 42,
      "period": {
        "start": "2024-05-04T09:42:00+00:00",
        "end": "2024-05-04T09:42:00+00:00"
      },
      "kind": "elasticsearch",
      "price": 42.0,
      "price_per_hour": 42.0,
      "name": "string",
      "sku": "string"
    }
  ]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}