DoiT Allocations API

Define how costs are distributed across your organization.

Business capability
IT Financial Management BC-600.80

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /analytics/v1/allocations List cost allocations · List allocations #
Ask an LLM
“What allocations are defined for splitting our cloud costs?”
“Can I filter allocations or change their sort order?”
Tell an agent
List all allocations.
List allocations matching {filter}.
POST /analytics/v1/allocations Create a cost allocation · Create an allocation #
Ask an LLM
“How do I group cloud costs by team or project with an allocation?”
“Can I turn on anomaly detection for a new allocation?”
Tell an agent
Create allocation {name} described as {description}.
Create allocation {name} ({description}) with rules {rules} in folder {folderId}.
GET /analytics/v1/allocations/{id} Retrieve an allocation · Retrieve an allocation #
Ask an LLM
“How do I see the rules behind one allocation?”
“What does a specific allocation include?”
Tell an agent
Get allocation {id}.
Show me the rules of allocation {id}.
DELETE /analytics/v1/allocations/{id} Delete an allocation · Delete an allocation #
Ask an LLM
“How do I get rid of an allocation we stopped using?”
“Can I delete an allocation permanently?”
Tell an agent destructive · confirm first
Delete allocation {id}.
Remove allocation {id}.
PATCH /analytics/v1/allocations/{id} Update an existing allocation · Update an allocation #
Ask an LLM
“How do I change the rules of an allocation I already have?”
“Can I move an existing allocation into a different folder?”
Tell an agent
Update allocation {id} with rules {rules}.
Move allocation {id} to folder {folderId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/doit:doit-allocations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

doit-allocations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DoiT Allocations API
  description: Programmatic access to DoiT Platform
  version: v1
servers:
- url: https://api.doit.com
security:
- api_key: []
- tenantId: []
  api_key: []
tags:
- name: Allocations
  description: Define how costs are distributed across your organization.
paths:
  /analytics/v1/allocations:
    get:
      tags:
      - Allocations
      summary: List allocations
      description: 'Returns a list of allocations that your account has access to.

        Allocations are listed in reverse chronological order by default.'
      operationId: listAllocations
      parameters:
      - $ref: '#/components/parameters/maxResults'
      - $ref: '#/components/parameters/pageToken'
      - name: filter
        in: query
        description: 'An expression for filtering the results.

          Valid fields: **type**, **owner**, **name**, **folderId**.'
        example: type:custom
        schema:
          type: string
      - $ref: '#/components/parameters/nameContains'
      - name: sortBy
        in: query
        description: A field by which the results will be sorted.
        schema:
          type: string
          enum:
          - id
          - name
          - owner
          - description
          - type
          - createTime
          - updateTime
      - $ref: '#/components/parameters/sortOrder'
      responses:
        '200':
          description: OK - The request succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  pageToken:
                    type: string
                    description: Page token, returned by a previous call, to request the next page of results.
                  rowCount:
                    type: integer
                    description: Total number of allocations in the result set.
                  allocations:
                    type: array
                    items:
                      $ref: '#/components/schemas/AllocationListItem'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    post:
      tags:
      - Allocations
      summary: Create an allocation
      description: Creates a new allocation.
      operationId: createAllocation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAllocationRequest'
      responses:
        '200':
          description: OK - The request succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Allocation'
          links:
            getAllocation:
              operationId: getAllocation
              parameters:
                id: $response.body#/id
            updateAllocation:
              operationId: updateAllocation
              parameters:
                id: $response.body#/id
            deleteAllocation:
              operationId: deleteAllocation
              parameters:
                id: $response.body#/id
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
      x-codegen-request-body-name: Body
  /analytics/v1/allocations/{id}:
    get:
      tags:
      - Allocations
      summary: Retrieve an allocation
      description: Returns an allocation by the specified Id.
      operationId: getAllocation
      parameters:
      - name: id
        in: path
        description: Allocation ID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - Allocation returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Allocation'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
      - Allocations
      summary: Delete an allocation
      description: Deletes the allocation specified by the Id.
      operationId: deleteAllocation
      parameters:
      - name: id
        in: path
        description: Allocation ID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - Allocation deleted.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
              example: {}
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: Conflict - The allocation cannot be deleted because it is used by other resources.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AllocationDeleteValidation'
    patch:
      tags:
      - Allocations
      summary: Update an allocation
      description: Updates the allocation specified by the Id.
      operationId: updateAllocation
      parameters:
      - name: id
        in: path
        description: Allocation ID
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAllocationRequest'
      responses:
        '200':
          description: OK - Allocation updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Allocation'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
      x-codegen-request-body-name: Body
components:
  schemas:
    GroupAllocationRule:
      required:
      - action
      type:
      - object
      - 'null'
      description: Allocation rule for a group type allocation. Components can reference other existing allocation rules by using the "allocation_rule" dimension type.
      properties:
        name:
          type: string
          description: Name of the allocation rule.
        description:
          type: string
          description: Description of the allocation rule.
        action:
          type: string
          description: Action to perform with this rule.
          enum:
          - create
          - update
          - select
        id:
          type: string
          description: ID of existing allocation (required for 'update' or 'select' action).
        components:
          type: array
          description: List of allocation filter components (required for 'create' or 'update' action). Can include components of type "allocation_rule" to reference existing allocation rules.
          items:
            $ref: '#/components/schemas/AllocationComponent'
        formula:
          type: string
          description: Formula for combining components (A is the first component, B is the second one, etc.)
          example: A AND B
        valueExtraction:
          $ref: '#/components/schemas/AllocationValueExtraction'
        validityPeriods:
          type:
          - array
          - 'null'
          description: Ordered, non-overlapping date ranges when this rule applies. Empty or absent means the rule always applies.
          items:
            $ref: '#/components/schemas/AllocationRulePeriod'
    AllocationValueExtractionSource:
      type: object
      required:
      - type
      - key
      properties:
        type:
          type: string
          description: The dimension type to read the value from. Label-map types (label, tag, project_label, system_label, gke_label) extract the value of the given key; "fixed" extracts a raw table dimension (for example project_id, service_description, region). Derived dimensions such as credits are not extractable.
          enum:
          - label
          - tag
          - project_label
          - system_label
          - gke_label
          - fixed
        key:
          type: string
          description: The label/tag key, or the fixed dimension ID, whose value is extracted.
        providers:
          type:
          - array
          - 'null'
          description: Optional cloud providers this source applies to.
          items:
            type: string
    AllocationDimensionsTypes:
      description: Dimension filter type for allocation rule components. See `DimensionsTypes` for per-value meanings. Allocation components do not support `allocation`, `attribution`, or `attribution_group` types.
      type: string
      enum:
      - datetime
      - fixed
      - optional
      - label
      - tag
      - project_label
      - system_label
      - allocation_rule
      - gke
      - gke_label
      x-enumDescriptions:
        fixed: Standard built-in billing dimensions.
        label: Customer-defined resource labels; key is the label key.
        tag: AWS cost allocation tags; key is the tag key.
        project_label: Google Cloud project-level labels.
        system_label: DoiT- or provider-generated system labels.
        optional: Console grouping for label/tag keys; use a concrete subtype in filters.
        datetime: Time dimensions for date-based filtering.
        allocation_rule: Reference another allocation rule by ID.
        gke: Google Kubernetes Engine cost-allocation dimensions.
        gke_label: GKE workload labels.
    AllocationRule:
      required:
      - components
      - formula
      type:
      - object
      - 'null'
      description: Single allocation rule. Components can reference other existing allocation rules by using the "allocation_rule" dimension type.
      properties:
        components:
          type: array
          description: List of allocation filter components.
          items:
            $ref: '#/components/schemas/AllocationComponent'
        formula:
          type: string
          description: Formula for combining components (A is the first component, B is the second one, etc.).
          example: A AND B
        validityPeriods:
          type:
          - array
          - 'null'
          description: Ordered, non-overlapping date ranges when this rule applies. Empty or absent means the rule always applies.
          items:
            $ref: '#/components/schemas/AllocationRulePeriod'
    Error:
      type: object
      description: Standard error response structure.
      properties:
        error:
          type: string
          description: Detailed error message.
    AllocationValueExtraction:
      type:
      - object
      - 'null'
      required:
      - sources
      description: Makes the rule emit a value extracted from the first non-empty source instead of the rule name.
      properties:
        sources:
          type: array
          minItems: 1
          maxItems: 5
          description: Ordered extraction sources; the first non-empty value wins.
          items:
            $ref: '#/components/schemas/AllocationValueExtractionSource'
        onMissing:
          type: string
          description: What happens when every source is missing or empty on a matching row. "useFallback" (default) emits the fallback value, which is required in that mode; "nextRule" lets the row fall through to the next rule in the group.
          enum:
          - useFallback
          - nextRule
          default: useFallback
        fallback:
          type:
          - string
          - 'null'
          description: Literal emitted when every source is missing. Required with onMissing "useFallback" (the default); not allowed with onMissing "nextRule".
    CreateAllocationRequest:
      required:
      - name
      - description
      type: object
      description: Request body for creating an allocation.
      properties:
        name:
          type: string
          description: Allocation name.
        description:
          type: string
          description: Allocation description.
        anomalyDetection:
          type: boolean
          description: Whether anomaly detection is enabled for this allocation. Only applicable to single allocations.
        rule:
          $ref: '#/components/schemas/AllocationRule'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/GroupAllocationRule'
        unallocatedCosts:
          type:
          - string
          - 'null'
          description: Custom label for values that do not fit into allocation (required for group type allocation).
        folderId:
          type: string
          description: Identifier of the folder that contains the allocation. Set to "root" if the allocation is at the top level (not in a folder).
          default: root
          example: root
    UpdateAllocationRequest:
      type: object
      description: Request body for updating an allocation.
      properties:
        name:
          type:
          - string
          - 'null'
          description: Allocation name
        description:
          type:
          - string
          - 'null'
          description: Allocation description
        anomalyDetection:
          type: boolean
          description: Whether anomaly detection is enabled for this allocation. Only applicable to single allocations.
        rule:
          $ref: '#/components/schemas/AllocationRule'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/GroupAllocationRule'
        unallocatedCosts:
          type:
          - string
          - 'null'
          description: Custom label for values that do not fit into allocation (required for group type allocation).
        folderId:
          type: string
          description: Identifier of the folder that contains the allocation. Set to "root" if the allocation is at the top level (not in a folder).
          default: root
          example: root
    AllocationRulePeriod:
      type: object
      description: 'A date range when a rule applies. startDate and endDate are both inclusive, so a handover between two rules needs a one-day gap: the first rule''s endDate the day before, the second rule''s startDate the handover day. Only the first period in the list may omit startDate, and only the last may omit endDate.'
      properties:
        startDate:
          type:
          - string
          - 'null'
          description: Start date (YYYY-MM-DD, UTC), inclusive. Absent means no lower bound.
          example: '2026-03-15'
        endDate:
          type:
          - string
          - 'null'
          description: End date (YYYY-MM-DD, UTC), inclusive. Absent means no upper bound.
          example: '2026-06-15'
    AllocationListItem:
      type: object
      description: Summary information for an allocation.
      properties:
        id:
          type: string
          description: Allocation ID.
        name:
          type: string
          description: Allocation name.
        owner:
          type: string
          description: Allocation owner.
        description:
          type: string
          description: Allocation description.
        type:
          type: string
          description: Type of allocation (preset or custom).
        allocationType:
          type: string
          description: Composition type of allocation (single or group).
          enum:
          - single
          - group
        createTime:
          type: integer
          description: The time when the allocation was created (in UNIX timestamp).
          format: int64
        updateTime:
          type: integer
          description: Last time the allocation was modified (in UNIX timestamp).
          format: int64
        urlUI:
          type: string
          description: URL to view the allocation in the DoiT console.
        folderId:
          type: string
          description: Identifier of the folder that contains the allocation. Set to "root" if the allocation is at the top level (not in a folder).
          default: root
          example: root
        anomalyDetection:
          type: boolean
          description: Whether anomaly detection is enabled for this allocation. Only applicable to single allocations.
    Allocation:
      type: object
      description: Allocation object, including rules and metadata.
      properties:
        id:
          type: string
          description: Allocation ID.
        name:
          type: string
          description: Allocation name.
        description:
          type: string
          description: Allocation description.
        type:
          type: string
          description: Type of allocation (preset or custom).
        allocationType:
          type: string
          description: Composition type of allocation.
          enum:
          - single
          - group
        createTime:
          type: integer
          description: The time when the allocation was created (in UNIX timestamp).
          format: int64
        updateTime:
          type: integer
          description: Last time the allocation was modified (in UNIX timestamp).
          format: int64
        anomalyDetection:
          type: boolean
          description: Whether anomaly detection is enabled for this allocation. Only applicable to single allocations.
        rule:
          $ref: '#/components/schemas/AllocationRule'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/GroupAllocationRule'
        unallocatedCosts:
          type:
          - string
          - 'null'
          description: Custom label for values that do not fit into allocation (required for group type allocation).
        folderId:
          type: string
          description: Identifier of the folder that contains the allocation. Set to "root" if the allocation is at the top level (not in a folder).
          default: root
          example: root
    ResourceReference:
      type: object
      description: Reference to another resource, used when listing blockers or usages.
      properties:
        id:
          type: string
          description: Resource identifier
        name:
          type: string
          description: Resource name
        owner:
          type: string
          description: Resource owner (only present if requester doesn't have access)
    AllocationDeleteValidation:
      type: object
      description: Details about why an allocation cannot be deleted.
      properties:
        id:
          type: string
          description: Allocation ID.
        type:
          type: string
          description: Type of allocation.
          enum:
          - single
          - group
        error:
          type: string
          description: Error message explaining why deletion failed.
        resources:
          type: object
          description: Map of resources using this allocation, keyed by resource type.
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ResourceReference'
    AllocationComponent:
      required:
      - key
      - type
      - values
      - mode
      type: object
      description: 'A filter component used inside allocation rules.

        When the type is "allocation_rule", the component references existing allocation rules (nested allocation rules).

        A maximum nesting depth of 3 levels is supported, and circular references are not allowed.'
      properties:
        key:
          type: string
          description: 'Key of an existing dimension. Examples: "billing_account_id", "country". When type is "allocation_rule", the key must be set to "allocation_rule".

            Use `GET /analytics/v1/dimensions` to retrieve all available dimensions.'
        type:
          $ref: '#/components/schemas/AllocationDimensionsTypes'
        values:
          type: array
          description: Values to filter on. When type is "allocation_rule", the values are IDs of existing allocation rules.
          items:
            type: string
        inverse:
          type: boolean
          description: If true, all selected values will be excluded.
          default: false
        includeNull:
          type: boolean
          description: Include null values.
          default: false
        caseInsensitive:
          type: boolean
          description: If true, string matching is case-insensitive. Effective only for starts_with, ends_with, and contains modes; rejected otherwise.
          default: false
        mode:
          type: string
          description: Filter mode to apply. When type is "allocation_rule", only "is" and "contains" modes are supported.
          enum:
          - is
          - starts_with
          - ends_with
          - contains
          - regexp
  parameters:
    sortOrder:
      name: sortOrder
      in: query
      description: Specifies the sort direction; accepts asc for ascending (lowest to highest) or desc for descending (highest to lowest).
      schema:
        type: string
        enum:
        - asc
        - desc
    pageToken:
      name: pageToken
      in: query
      description: Page token, returned by a previous call, to request the next page of results
      schema:
        type: string
    maxResults:
      name: maxResults
      in: query
      description: The maximum number of results to return in a single page. Use the page tokens to iterate through the entire collection.
      schema:
        type: integer
        format: int64
        default: 50
    nameContains:
      name: nameContains
      in: query
      description: Case-insensitive substring match against the resource name. Combined with the "filter" parameter using AND semantics.
      example: monthly spend
      schema:
        type: string
  responses:
    '400':
      description: Bad Request - The server cannot process the request, often due to a malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '401':
      description: Unauthorized - Invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '403':
      description: Forbidden - The client is not authorized to perform the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not Found - The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      description: Use the "Bearer <API_KEY>" format or sign in for autofill
      in: header
    tenantId:
      type: apiKey
      name: X-Tenant-Id
      description: 'Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint''s normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.'
      in: header
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://console.doit.com/sign-in/oauth
          tokenUrl: https://console.doit.com/api/auth/token
          scopes:
            dci: Access All Data
x-samples-languages:
- curl
- go
- node
- python
x-cli-config:
  security: oauth2
  params:
    client_id: cli
x-provenance:
  method: harvested
  publisher: DoiT
  source: https://api.doit.com/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)