CloudZero Allocation Telemetry API

Send, edit, and delete allocation telemetry data for splitting cloud cost data through custom allocation dimensions.

OpenAPI Specification

cloudzero-allocation-telemetry-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: CloudZero Allocation Telemetry API
  description: The CloudZero API V2 enables you to automate the collection, allocation, and analysis of your infrastructure spend. It is organized around REST with predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP methods, headers, response codes, and authentication.
  version: 2.0.0
  contact:
    name: CloudZero
    url: https://www.cloudzero.com/
  termsOfService: https://www.cloudzero.com/terms-of-service
servers:
- url: https://api.cloudzero.com
  description: CloudZero Production API
security:
- apiKey: []
tags:
- name: Allocation Telemetry
  description: Send, edit, and delete allocation telemetry data for splitting cloud cost data through custom allocation dimensions.
paths:
  /v1/telemetry/allocation/{stream_name}/sum:
    post:
      operationId: postAllocationTelemetrySum
      summary: CloudZero Post allocation telemetry records (sum)
      description: Sends allocation telemetry data that will be summed with any existing data at the same timestamp and granularity within the stream.
      tags:
      - Allocation Telemetry
      parameters:
      - name: stream_name
        in: path
        required: true
        schema:
          type: string
        description: Name of the allocation telemetry stream.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                records:
                  type: array
                  items:
                    $ref: '#/components/schemas/AllocationTelemetryRecord'
              required:
              - records
      responses:
        '202':
          description: Telemetry records accepted for processing.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized. Invalid or missing API key.
        '429':
          description: Rate limit exceeded.
  /v1/telemetry/allocation/{stream_name}/replace:
    post:
      operationId: postAllocationTelemetryReplace
      summary: CloudZero Post allocation telemetry records (replace)
      description: Sends allocation telemetry data that will replace any existing data at the same timestamp and granularity within the stream.
      tags:
      - Allocation Telemetry
      parameters:
      - name: stream_name
        in: path
        required: true
        schema:
          type: string
        description: Name of the allocation telemetry stream.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                records:
                  type: array
                  items:
                    $ref: '#/components/schemas/AllocationTelemetryRecord'
              required:
              - records
      responses:
        '202':
          description: Telemetry records accepted for processing.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized. Invalid or missing API key.
        '429':
          description: Rate limit exceeded.
  /v1/telemetry/allocation/{stream_name}/delete:
    post:
      operationId: deleteAllocationTelemetry
      summary: CloudZero Delete allocation telemetry records
      description: Deletes any allocation data within the appropriate stream that matches the supplied properties. Timestamp and granularity are minimally required.
      tags:
      - Allocation Telemetry
      parameters:
      - name: stream_name
        in: path
        required: true
        schema:
          type: string
        description: Name of the allocation telemetry stream.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                timestamp:
                  type: string
                  format: date-time
                  description: Timestamp of the records to delete.
                granularity:
                  type: string
                  enum:
                  - HOURLY
                  - DAILY
                  - MONTHLY
                  description: Granularity of the records to delete.
              required:
              - timestamp
              - granularity
      responses:
        '200':
          description: Records deleted successfully.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized. Invalid or missing API key.
components:
  schemas:
    AllocationTelemetryRecord:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp for the telemetry record.
        value:
          type: number
          format: double
          description: Numeric value for the allocation.
        granularity:
          type: string
          enum:
          - HOURLY
          - DAILY
          - MONTHLY
          description: Time granularity of the record.
        element:
          type: object
          additionalProperties:
            type: string
          description: Key-value pairs identifying the element being allocated.
      required:
      - timestamp
      - value
      - granularity
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: API key for authentication. Include your API key directly in the Authorization header.