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

# Get Metrics For Sources



## OpenAPI

````yaml /openapi/openapi.json get /sources/metrics
openapi: 3.1.0
info:
  title: Streamkap REST API
  description: >-
    The Streamkap REST API allows you to programmatically manage your CDC
    pipelines, sources, destinations, transforms, and more.


    Authenticate using a bearer token obtained from the [Access
    Token](/api-reference/auth/access-token) endpoint with your API client
    credentials.
  contact:
    name: Streamkap Support
    url: https://streamkap.com/
    email: support@streamkap.com
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api.streamkap.com
    description: Production
security: []
tags:
  - name: Alerts
    description: Manage alert subscribers, preferences, and notification credentials.
  - name: Authentication
    description: Obtain and refresh access tokens, manage client credentials and roles.
  - name: Billing
    description: Retrieve usage metrics, summaries, and export billing data.
  - name: Consumer Groups
    description: List, inspect, and reset Kafka consumer group offsets.
  - name: Dashboard
    description: Retrieve organisation-level statistics and overview data.
  - name: Destinations
    description: Create, configure, and manage data destinations and their lifecycle.
  - name: Kafka Access
    description: Manage Kafka users and their access permissions.
  - name: Logs
    description: Query and summarise system logs.
  - name: Pipelines
    description: Create, configure, and manage CDC pipelines and their lifecycle.
  - name: Project Keys
    description: Manage project keys that bundle API credentials and optional Kafka access.
  - name: Schema Registry
    description: Browse schema subjects, versions, and retrieve schema definitions.
  - name: Services
    description: View and switch service metadata.
  - name: Sources
    description: >-
      Create, configure, and manage data sources, snapshots, and their
      lifecycle.
  - name: Tags
    description: Create, update, and manage resource tags for organisation.
  - name: Topics
    description: Browse topic details, statistics, configurations, metrics, and messages.
  - name: Transforms
    description: >-
      Create, deploy, and manage data transforms, unit tests, and implementation
      details.
paths:
  /sources/metrics:
    get:
      tags:
        - Sources
      summary: Get Metrics For Sources
      operationId: listSourcesMetrics
      parameters:
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Entity identifier to fetch metrics for
            title: Id
          description: Entity identifier to fetch metrics for
        - name: topic_list_from
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Starting index for topic list pagination
            title: Topic List From
          description: Starting index for topic list pagination
        - name: topic_list_size
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Number of topics to return in the list
            title: Topic List Size
          description: Number of topics to return in the list
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: integer
              - type: 'null'
            description: Starting key for cursor-based pagination
            title: From
          description: Starting key for cursor-based pagination
        - name: size
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Number of results to return
            title: Size
          description: Number of results to return
        - name: level
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Metrics aggregation level (e.g., 'connector', 'task', 'topic')
            title: Level
          description: Metrics aggregation level (e.g., 'connector', 'task', 'topic')
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: string
              - type: 'null'
            description: Page number for pagination
            title: Page
          description: Page number for pagination
        - name: timestamp_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              End timestamp for metrics range (ISO 8601, e.g.,
              '2025-01-15T10:00:00Z')
            title: Timestamp To
          description: >-
            End timestamp for metrics range (ISO 8601, e.g.,
            '2025-01-15T10:00:00Z')
        - name: timestamp_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Start timestamp for metrics range (ISO 8601, e.g.,
              '2025-01-15T09:00:00Z')
            title: Timestamp From
          description: >-
            Start timestamp for metrics range (ISO 8601, e.g.,
            '2025-01-15T09:00:00Z')
        - name: time_unit
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Time unit for aggregation (e.g., 'minute', 'hour', 'day')
            title: Time Unit
          description: Time unit for aggregation (e.g., 'minute', 'hour', 'day')
        - name: time_interval
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: string
              - type: 'null'
            description: Time interval value for aggregation
            title: Time Interval
          description: Time interval value for aggregation
        - name: time_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Type of time-based query: ''timeseries'', ''latest'', or ''timesummary'''
            title: Time Type
          description: 'Type of time-based query: ''timeseries'', ''latest'', or ''timesummary'''
        - name: tenant_ids
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: A comma-separated list of Tenant IDs
            title: Tenant Ids
          description: A comma-separated list of Tenant IDs
        - name: ids
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: A comma-separated list of source IDs
            title: Ids
          description: A comma-separated list of source IDs
        - name: snapshot
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Snapshot status filter
            title: Snapshot
          description: Snapshot status filter
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Field to sort results by
            title: Sort
          description: Field to sort results by
        - name: sort_dir
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - asc
                  - desc
                type: string
              - type: 'null'
            description: 'Sort direction: ''asc'' or ''desc'''
            title: Sort Dir
          description: 'Sort direction: ''asc'' or ''desc'''
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/SourceMetricsReqBody'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceMetricsRes'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    SourceMetricsReqBody:
      properties:
        ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: string
            - type: 'null'
          title: Ids
          description: >-
            List of source IDs (as array) or comma-separated string. Body takes
            precedence over query params.
        tenant_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: string
            - type: 'null'
          title: Tenant Ids
          description: >-
            List of tenant IDs (as array) or comma-separated string. Body takes
            precedence over query params.
      additionalProperties: true
      type: object
      title: SourceMetricsReqBody
      description: >-
        Body model for POST /sources/metrics requests.


        Supports large lists of IDs that would exceed URL length limits when
        using GET.

        Body parameters take precedence over query parameters when both are
        provided.
    SourceMetricsRes:
      properties:
        account_metrics:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/SourceBaseMetrics'
              type: object
            - type: 'null'
          title: Account Metrics
        connector_metrics:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/SourceBaseMetrics'
              type: object
            - type: 'null'
          title: Connector Metrics
        inline_metrics:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/SourceBaseMetrics'
              type: object
            - type: 'null'
          title: Inline Metrics
        task_metrics:
          anyOf:
            - additionalProperties:
                additionalProperties:
                  $ref: '#/components/schemas/SourceBaseMetrics'
                type: object
              type: object
            - type: 'null'
          title: Task Metrics
        topic_metrics:
          anyOf:
            - additionalProperties:
                additionalProperties:
                  $ref: '#/components/schemas/SourceBaseMetrics'
                type: object
              type: object
            - type: 'null'
          title: Topic Metrics
      additionalProperties: true
      type: object
      title: SourceMetricsRes
      description: Source metrics response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SourceBaseMetrics:
      properties:
        timeseries:
          anyOf:
            - $ref: '#/components/schemas/SourceTimeseriesMetrics'
            - type: 'null'
        latest:
          anyOf:
            - $ref: '#/components/schemas/SourceLatestMetrics'
            - type: 'null'
        timesummary:
          anyOf:
            - $ref: '#/components/schemas/SourceTimesummaryMetrics'
            - type: 'null'
      additionalProperties: true
      type: object
      title: SourceBaseMetrics
      description: Source base metrics.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SourceTimeseriesMetrics:
      properties:
        SnapshotMilliSecondsSinceLastEvent:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Snapshotmillisecondssincelastevent
          default: []
        SnapshotTotalNumberOfEventsSeen:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Snapshottotalnumberofeventsseen
          default: []
        StreamingMilliSecondsBehindSource:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Streamingmillisecondsbehindsource
          default: []
        StreamingMilliSecondsSinceLastEvent:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Streamingmillisecondssincelastevent
          default: []
        StreamingTotalNumberOfCreateEventsSeen:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Streamingtotalnumberofcreateeventsseen
          default: []
        StreamingTotalNumberOfDeleteEventsSeen:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Streamingtotalnumberofdeleteeventsseen
          default: []
        recordSendTotal:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Recordsendtotal
          default: []
        StreamingTotalNumberOfUpdateEventsSeen:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Streamingtotalnumberofupdateeventsseen
          default: []
        recordRetryTotal:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Recordretrytotal
          default: []
        recordWrittenTotal:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Recordwrittentotal
          default: []
        byteTotal:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Bytetotal
          default: []
        sourceRecordWriteTotal:
          items:
            $ref: '#/components/schemas/TimeseriesEntry'
          type: array
          title: Sourcerecordwritetotal
          default: []
      additionalProperties: true
      type: object
      title: SourceTimeseriesMetrics
      description: Source timeseries metrics.
      example:
        SnapshotMilliSecondsSinceLastEvent:
          - timestamp: '2025-03-02 08:00:00'
            value: 500
          - timestamp: '2025-03-02 09:00:00'
            value: 300
        SnapshotTotalNumberOfEventsSeen:
          - timestamp: '2025-03-02 08:00:00'
            value: 100
          - timestamp: '2025-03-02 09:00:00'
            value: 150
        StreamingMilliSecondsBehindSource:
          - timestamp: '2025-03-02 08:00:00'
            value: 1000
          - timestamp: '2025-03-02 09:00:00'
            value: 800
        StreamingMilliSecondsSinceLastEvent:
          - timestamp: '2025-03-02 08:00:00'
            value: 200
          - timestamp: '2025-03-02 09:00:00'
            value: 150
        StreamingTotalNumberOfCreateEventsSeen:
          - timestamp: '2025-03-02 08:00:00'
            value: 20
          - timestamp: '2025-03-02 09:00:00'
            value: 35
        StreamingTotalNumberOfDeleteEventsSeen:
          - timestamp: '2025-03-02 08:00:00'
            value: 5
          - timestamp: '2025-03-02 09:00:00'
            value: 8
        StreamingTotalNumberOfUpdateEventsSeen:
          - timestamp: '2025-03-02 08:00:00'
            value: 30
          - timestamp: '2025-03-02 09:00:00'
            value: 45
        byteTotal:
          - timestamp: '2025-03-02 08:00:00'
            value: 10000
          - timestamp: '2025-03-02 09:00:00'
            value: 15000
        recordRetryTotal:
          - timestamp: '2025-03-02 08:00:00'
            value: 2
          - timestamp: '2025-03-02 09:00:00'
            value: 3
        recordSendTotal:
          - timestamp: '2025-03-02 08:00:00'
            value: 50
          - timestamp: '2025-03-02 09:00:00'
            value: 70
        recordWrittenTotal:
          - timestamp: '2025-03-02 08:00:00'
            value: 40
          - timestamp: '2025-03-02 09:00:00'
            value: 60
        sourceRecordWriteTotal:
          - timestamp: '2025-03-02 08:00:00'
            value: 25
          - timestamp: '2025-03-02 09:00:00'
            value: 40
    SourceLatestMetrics:
      properties:
        SnapshotTotalNumberOfEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Snapshottotalnumberofeventsseen
        SnapshotMilliSecondsSinceLastEvent:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Snapshotmillisecondssincelastevent
        StreamingMilliSecondsBehindSource:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
          title: Streamingmillisecondsbehindsource
        StreamingTotalNumberOfDeleteEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingtotalnumberofdeleteeventsseen
        StreamingTotalNumberOfUpdateEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingtotalnumberofupdateeventsseen
        StreamingTotalNumberOfCreateEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingtotalnumberofcreateeventsseen
        StreamingMilliSecondsSinceLastEvent:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingmillisecondssincelastevent
        StreamingLastEvent:
          anyOf:
            - type: string
            - type: 'null'
          title: Streaminglastevent
        recordRetryTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Recordretrytotal
        byteTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Bytetotal
        sourceRecordWriteTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Sourcerecordwritetotal
        SnapshotRunning:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Snapshotrunning
        SnapshotCompleted:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Snapshotcompleted
        StreamingConnected:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingconnected
        recordSendTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Recordsendtotal
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        streamingState:
          anyOf:
            - type: string
            - type: 'null'
          title: Streamingstate
        snapshotStatus:
          anyOf:
            - items:
                additionalProperties:
                  anyOf:
                    - type: string
                    - type: integer
                    - type: 'null'
                type: object
              type: array
            - type: 'null'
          title: Snapshotstatus
          default: []
        snapshotState:
          anyOf:
            - type: string
            - type: 'null'
          title: Snapshotstate
        recordWrittenTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Recordwrittentotal
        connector_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector Status
        latency:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
          title: Latency
      additionalProperties: true
      type: object
      title: SourceLatestMetrics
      description: Source latest metrics.
      example:
        SnapshotCompleted: 2
        SnapshotMilliSecondsSinceLastEvent: 3600000
        SnapshotRunning: 0
        SnapshotTotalNumberOfEventsSeen: 20254
        StreamingConnected: 1
        StreamingLastEvent: >-
          position: {ord: 14}, key: {"id" :
          ""ceaafb88-2a60-4bd9-8515-719ba64ea05c-close""}
        StreamingMilliSecondsBehindSource: 500
        StreamingMilliSecondsSinceLastEvent: 200
        StreamingTotalNumberOfCreateEventsSeen: 73
        StreamingTotalNumberOfDeleteEventsSeen: 312
        StreamingTotalNumberOfUpdateEventsSeen: 0
        byteTotal: 9018776
        connector_status: Active
        latency: 150
        recordRetryTotal: 10
        recordSendTotal: 400
        recordWrittenTotal: 395
        snapshotState: completed
        snapshotStatus:
          - status: completed
            submit_timestamp: '2023-10-01T10:00:00Z'
            topic_id: source_111111111111111111111111.Test.test_data1
          - status: completed
            submit_timestamp: '2023-10-01T10:10:00Z'
            topic_id: source_111111111111111111111111.Test.test_data2
        sourceRecordWriteTotal: 27785
        state: Streaming
        streamingState: connected
    SourceTimesummaryMetrics:
      properties:
        SnapshotTotalNumberOfEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Snapshottotalnumberofeventsseen
        SnapshotMilliSecondsSinceLastEvent:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Snapshotmillisecondssincelastevent
        StreamingMilliSecondsBehindSource:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
          title: Streamingmillisecondsbehindsource
        StreamingTotalNumberOfDeleteEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingtotalnumberofdeleteeventsseen
        StreamingTotalNumberOfUpdateEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingtotalnumberofupdateeventsseen
        StreamingTotalNumberOfCreateEventsSeen:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingtotalnumberofcreateeventsseen
        StreamingMilliSecondsSinceLastEvent:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Streamingmillisecondssincelastevent
        recordRetryTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Recordretrytotal
        recordSendTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Recordsendtotal
        recordWrittenTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Recordwrittentotal
        byteTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Bytetotal
        sourceRecordWriteTotal:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Sourcerecordwritetotal
        snapshotStatus:
          anyOf:
            - items:
                additionalProperties:
                  anyOf:
                    - type: string
                    - type: integer
                    - type: 'null'
                type: object
              type: array
            - type: 'null'
          title: Snapshotstatus
          default: []
        snapshotState:
          anyOf:
            - type: string
            - type: 'null'
          title: Snapshotstate
        connector_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector Status
        latency:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
          title: Latency
      additionalProperties: true
      type: object
      title: SourceTimesummaryMetrics
      description: Source timesummary metrics.
      example:
        SnapshotMilliSecondsSinceLastEvent: 500
        SnapshotTotalNumberOfEventsSeen: 65
        StreamingMilliSecondsBehindSource: 200
        StreamingMilliSecondsSinceLastEvent: 100
        StreamingTotalNumberOfCreateEventsSeen: 20
        StreamingTotalNumberOfDeleteEventsSeen: 13
        StreamingTotalNumberOfUpdateEventsSeen: 25
        byteTotal: 6000
        connector_status: Active
        latency: 100
        recordRetryTotal: 5
        recordSendTotal: 60
        recordWrittenTotal: 58
        snapshotState: completed
        snapshotStatus:
          - status: completed
            submit_timestamp: '2023-10-01T12:00:00Z'
            topic_id: source_111111111111111111111111.Test.test_data1
          - status: completed
            submit_timestamp: '2023-10-01T12:05:00Z'
            topic_id: source_111111111111111111111111.Test.test_data2
        sourceRecordWriteTotal: 547
    TimeseriesEntry:
      properties:
        value:
          anyOf:
            - type: integer
            - type: number
          title: Value
          description: The metric value at this timestamp
        timestamp:
          type: string
          title: Timestamp
          description: ISO 8601 timestamp for this data point
      additionalProperties: true
      type: object
      required:
        - value
        - timestamp
      title: TimeseriesEntry
      description: A single data point in a time series.
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````