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

# Get segment metrics

> Get metrics for a segment



## OpenAPI

````yaml https://api.getcargo.io/openapi.json get /segmentation/segments/{uuid}/metrics
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /segmentation/segments/{uuid}/metrics:
    get:
      tags:
        - Segmentation - Segments
      summary: Get segment metrics
      description: Get metrics for a segment
      parameters:
        - in: query
          name: from
          schema:
            type: string
            title: From
            description: Start of the time range.
          required: true
          description: Start of the time range.
        - in: query
          name: to
          schema:
            type: string
            title: To
            description: End of the time range.
          required: true
          description: End of the time range.
        - in: query
          name: unit
          schema:
            type: string
            enum:
              - day
              - week
              - month
              - year
            title: Unit
            description: Time unit for aggregation.
          required: true
          description: Time unit for aggregation.
        - in: path
          name: uuid
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
            title: UUID
            description: Segment identifier.
          required: true
          description: Segment identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  segmentMetrics:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                        totalRecordsCount:
                          type: number
                        addedRecordsCount:
                          type: number
                        updatedRecordsCount:
                          type: number
                        removedRecordsCount:
                          type: number
                        unchangedRecordsCount:
                          type: number
                      required:
                        - date
                        - totalRecordsCount
                        - addedRecordsCount
                        - updatedRecordsCount
                        - removedRecordsCount
                        - unchangedRecordsCount
                      additionalProperties: false
                    title: Segment metrics
                    description: Segment metrics for the selected range.
                required:
                  - segmentMetrics
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````