> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get one cost anomaly

> Includes contributing regions and linked savings findings.

**Scope:** `optimize:anomalies:read`. See [API Tokens](https://docs.cloudthinker.io/guide/api/tokens.md#scopes).


## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces/{workspace_id}/optimize/anomalies/{anomaly_id}
openapi: 3.1.0
info:
  title: CloudThinker Public API
  version: 1.0.0
  description: >-
    Public API v1. Every path names its workspace. IDs are UUIDs. Lists page
    with `limit` and `cursor`. Writes take `Idempotency-Key`. A write runs at
    once when the token's scopes allow it. Clients ask their person first for
    operations marked `x-confirm`.
servers:
  - url: https://app.cloudthinker.io/api/public
security:
  - bearer: []
tags:
  - name: token
    description: The calling token.
  - name: chat
    description: Ask CloudThinker and read past conversations.
  - name: resolve
    description: Production signals, incidents and root cause analysis.
  - name: review
    description: Code reviews, findings and release risk.
  - name: approvals
    description: Approval requests waiting for a person.
  - name: workspace
    description: Connections and their health.
  - name: optimize
    description: Cloud cost overview, savings findings and anomalies.
  - name: cyber
    description: Pentest apps and findings, code audits.
paths:
  /v1/workspaces/{workspace_id}/optimize/anomalies/{anomaly_id}:
    get:
      tags:
        - optimize
      summary: 'Get one cost anomaly: baseline, impact, daily evidence.'
      description: Includes contributing regions and linked savings findings.
      operationId: optimize.anomalies.get
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - name: anomaly_id
          in: path
          required: true
          description: Anomaly id.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostAnomalyDetail'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - bearer: []
components:
  parameters:
    WorkspaceId:
      name: workspace_id
      in: path
      required: true
      description: Workspace to act in. Every call names it.
      schema:
        type: string
        format: uuid
  headers:
    X-Request-ID:
      description: Request id. Quote it to support.
      schema:
        type: string
    RateLimit-Limit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window resets.
      schema:
        type: integer
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  schemas:
    CostAnomalyDetail:
      type: object
      title: CostAnomalyDetail
      properties:
        id:
          type: string
          format: uuid
        connection_id:
          type: string
          format: uuid
        provider:
          $ref: '#/components/schemas/CloudProvider'
        service:
          type: string
        started_on:
          type: string
          format: date
        last_observed_on:
          type: string
          format: date
        currency:
          type: string
        actual_cost:
          type: string
          description: Decimal amount as a string, in `currency`.
        baseline_cost:
          type: string
          description: Decimal amount as a string, in `currency`.
        expected_upper_bound:
          type: string
          description: Decimal amount as a string, in `currency`.
        estimated_impact:
          type: string
          description: Decimal amount as a string, in `currency`.
        deviation_pct:
          type: string
        severity:
          $ref: '#/components/schemas/Severity'
        state:
          $ref: '#/components/schemas/CostAnomalyReviewState'
        disposition:
          anyOf:
            - $ref: '#/components/schemas/CostAnomalyDisposition'
            - type: 'null'
        note:
          type:
            - string
            - 'null'
        linked_findings:
          type: array
          items:
            $ref: '#/components/schemas/CostAnomalyLinkedFinding'
        detection:
          $ref: '#/components/schemas/CostAnomalyDetectionState'
        detection_source:
          $ref: '#/components/schemas/CostAnomalyDetectionSource'
        detector_score:
          type: string
        retracted_at:
          type:
            - string
            - 'null'
          format: date-time
        retracted_reason:
          type:
            - string
            - 'null'
        evidence:
          type: array
          items:
            $ref: '#/components/schemas/CostAnomalyEvidencePoint'
        contributors:
          type: array
          items:
            $ref: '#/components/schemas/CostAnomalyContributor'
      required:
        - id
        - connection_id
        - provider
        - service
        - started_on
        - last_observed_on
        - currency
        - actual_cost
        - baseline_cost
        - expected_upper_bound
        - estimated_impact
        - deviation_pct
        - severity
        - state
        - disposition
        - note
        - linked_findings
        - detection
        - detection_source
        - detector_score
        - retracted_at
        - retracted_reason
        - evidence
        - contributors
      description: 'One cost anomaly: baseline, impact, daily evidence and linked findings.'
    CloudProvider:
      type: string
      enum:
        - AWS
        - GCP
        - AZURE
      title: CloudProvider
    Severity:
      type: string
      enum:
        - critical
        - high
        - medium
        - low
        - info
      title: Severity
    CostAnomalyReviewState:
      type: string
      enum:
        - needs_review
        - investigating
        - reviewed
      title: CostAnomalyReviewState
    CostAnomalyDisposition:
      type: string
      enum:
        - unexpected_change
        - expected_change
        - insignificant
      title: CostAnomalyDisposition
    CostAnomalyLinkedFinding:
      type: object
      title: CostAnomalyLinkedFinding
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        triage:
          anyOf:
            - $ref: '#/components/schemas/QuickWinClass'
            - type: 'null'
      required:
        - id
        - title
        - triage
    CostAnomalyDetectionState:
      type: string
      enum:
        - detected
        - retracted
      title: CostAnomalyDetectionState
    CostAnomalyDetectionSource:
      type: string
      enum:
        - detector
        - agent
      title: CostAnomalyDetectionSource
    CostAnomalyEvidencePoint:
      type: object
      title: CostAnomalyEvidencePoint
      properties:
        usage_date:
          type: string
          format: date
        actual_cost:
          type: string
          description: Decimal amount as a string, in `currency`.
      required:
        - usage_date
        - actual_cost
    CostAnomalyContributor:
      type: object
      title: CostAnomalyContributor
      properties:
        region:
          type: string
        cost_amount:
          type: string
          description: Decimal amount as a string, in `currency`.
        percent_of_actual:
          type: string
      required:
        - region
        - cost_amount
        - percent_of_actual
    ApiErrorResponse:
      type: object
      title: ApiErrorResponse
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorDetail'
        request_id:
          type: string
      required:
        - error
        - request_id
      description: >-
        Every non-2xx response. Read `error.code` and `error.action`; quote
        `request_id` to support.
      x-todo:
        - >-
          detail: deprecated untyped compatibility payload; still sent by the
          server, left out of the public contract
    QuickWinClass:
      type: string
      enum:
        - quick_win
        - needs_review
        - no_action
      title: QuickWinClass
    ApiErrorDetail:
      type: object
      title: ApiErrorDetail
      properties:
        code:
          anyOf:
            - $ref: '#/components/schemas/ApiErrorCode'
            - type: string
        category:
          $ref: '#/components/schemas/ApiErrorCategory'
        message:
          type: string
        action:
          anyOf:
            - $ref: '#/components/schemas/ApiErrorAction'
            - type: 'null'
        action_target:
          type:
            - string
            - 'null'
        retryable:
          type: boolean
        field_errors:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ApiFieldError'
      required:
        - code
        - category
        - message
      x-todo:
        - >-
          context: untyped dict[str, JsonValue] in today's model; type its known
          keys or keep it out of the public contract
    ApiErrorCode:
      type: string
      enum:
        - validation_error
        - unauthenticated
        - forbidden
        - not_found
        - conflict
        - rate_limited
        - dependency_unavailable
        - dependency_timeout
        - internal_error
      title: ApiErrorCode
    ApiErrorCategory:
      type: string
      enum:
        - invalid_input
        - unauthenticated
        - forbidden
        - policy_blocked
        - plan_limit
        - not_found
        - conflict
        - reconnect_required
        - rate_limited
        - dependency_unavailable
        - dependency_timeout
        - internal
      title: ApiErrorCategory
    ApiErrorAction:
      type: string
      enum:
        - fix_input
        - open_settings
        - contact_admin
        - upgrade
        - buy_credits
        - reconnect
        - retry
        - reload
        - sign_in
        - sso_login
        - copy_error_id
      title: ApiErrorAction
    ApiFieldError:
      type: object
      title: ApiFieldError
      properties:
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        code:
          type: string
        message:
          type: string
      required:
        - path
        - code
        - message
  responses:
    BadRequest:
      description: The request is malformed.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    Unauthenticated:
      description: Missing, expired or revoked token.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    Forbidden:
      description: The token lacks the scope, or your role lacks the permission.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    NotFound:
      description: Not found in this workspace, or you are not a member.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    ValidationError:
      description: A parameter or body field is invalid. See `error.field_errors`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    RateLimited:
      description: Too many requests. Wait `Retry-After` seconds.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        CloudThinker token: a personal access token `ct_pat_…` (fine-grained
        scopes, created in Settings) or an OAuth access token `ct_oat_…` (1
        hour, from the OAuth flow). Send `Authorization: Bearer <token>`. Scopes
        have the form `module:resource:read|write`; write includes read.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.