Get deployments costs for the organization. Currently unavailable in self-hosted ECE. Deprecated

GET /billing/costs/{organization_id}/deployments

EXPERIMENTAL (it may change in future versions): Retrieves the costs associated with all deployments for the organization.

Headers

  • Accept string

    Accept header containing the content preference.

Path parameters

Query parameters

  • from string

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

  • to string

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

Responses

  • The costs associated to a set of products

    Hide response attributes Show response attributes object
    • total_cost number(double) Required

      Total cost for all deployments

    • deployments array[object] Required

      Costs of the list of deployments

      Hide deployments attributes Show deployments attributes object
      • deployment_id string Required

        Elasticsearch deployment id

      • deployment_name string Required

        Elasticsearch deployment name

      • 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

      • hourly_rate number(double) Required

        Price per hour

      • period object

        Period

        Additional properties are allowed.

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

          Start

        • end string(date-time) Required

          End

  • Invalid date range specified. (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

  • Organization not found. (code: organization.not_found)

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

      Value is organization.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 costs associated with all deployments for 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
curl \
 -X GET https://api.elastic-cloud.com/api/v1/billing/costs/{organization_id}/deployments \
 -H "Accept: string"
Response examples (200)
{
  "total_cost": 42.0,
  "deployments": [
    {
      "deployment_id": "string",
      "deployment_name": "string",
      "costs": {
        "total": 42.0,
        "dimensions": [
          {
            "type": "capacity",
            "cost": 42.0
          }
        ]
      },
      "hourly_rate": 42.0,
      "period": {
        "start": "2024-05-04T09:42:00+00:00",
        "end": "2024-05-04T09:42:00+00:00"
      }
    }
  ]
}
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"
      ]
    }
  ]
}