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

# Get Deployment Metrics Route



## OpenAPI

````yaml /openapi.json get /api/v1/deploy/{deployment_id}/metrics
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
servers:
  - url: https://api.trajectory.ai
security: []
paths:
  /api/v1/deploy/{deployment_id}/metrics:
    get:
      tags:
        - deployments
      summary: Get Deployment Metrics Route
      operationId: getDeploymentMetrics
      parameters:
        - name: deployment_id
          in: path
          required: true
          schema:
            type: string
            title: Deployment Id
        - name: window
          in: query
          required: false
          schema:
            type: string
            description: 'One of: 1h, 24h, 7d.'
            default: 1h
            title: Window
          description: 'One of: 1h, 24h, 7d.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentMetricsResponse'
        '404':
          description: >-
            The requested resource does not exist or is not visible to the
            caller.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundErrorResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DeploymentMetricsResponse:
      properties:
        metric_descriptors:
          items:
            $ref: '#/components/schemas/MetricDescriptor'
          type: array
          title: Metric Descriptors
          description: Which metrics/series are present in metric_values.
        metric_values:
          items:
            $ref: '#/components/schemas/MetricValueSet'
          type: array
          title: Metric Values
          description: Time-bucketed values, aligned to metric_descriptors.
      type: object
      required:
        - metric_descriptors
        - metric_values
      title: DeploymentMetricsResponse
      description: Baseten's live deployment metrics, passed through as-is (SERIES mode).
    ResourceNotFoundErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ResourceNotFoundErrorBody'
      type: object
      required:
        - error
      title: ResourceNotFoundErrorResponse
    MetricDescriptor:
      properties:
        name:
          type: string
          title: Name
          description: Baseten metric name, e.g. baseten_inference_requests_total.
        label_sets:
          items:
            additionalProperties:
              type: string
            type: object
          type: array
          title: Label Sets
          description: >-
            One label set per series within this metric, e.g. per status code or
            per latency quantile; see Baseten's metrics API.
      type: object
      required:
        - name
        - label_sets
      title: MetricDescriptor
      description: >-
        One metric Baseten reports; label_sets breaks it into parallel
        per-bucket series.
    MetricValueSet:
      properties:
        start_epoch_millis:
          type: integer
          title: Start Epoch Millis
          description: Bucket start time, Unix epoch milliseconds.
        values:
          items:
            items:
              anyOf:
                - type: number
                - type: 'null'
            type: array
          type: array
          title: Values
          description: >-
            One inner list per metric_descriptors entry; each inner list has one
            value per that metric's label_sets, in the same order.
      type: object
      required:
        - start_epoch_millis
        - values
      title: MetricValueSet
      description: One time bucket's values, index-aligned with metric_descriptors.
    ResourceNotFoundErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: resource_not_found
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ResourceNotFoundErrorBody
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    EmptyErrorContext:
      properties: {}
      additionalProperties: false
      type: object
      title: EmptyErrorContext
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          title: Code
          type: string
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````