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

# Get User Activity Metric

> Requires `userActivityMetrics: true` in the credential's `entitiesToSync` selection and a connector that supports this operation. [Choose what data to sync](https://rollout.com/docs/advanced-guides/controlling-which-records-sync-with-rollout), or [fix an entity that is not configured to sync](https://rollout.com/docs/troubleshooting/entity-not-configured-to-sync).



## OpenAPI

````yaml /openapi/tms.json get /user-activity-metrics/{id}
openapi: 3.1.2
info:
  title: Universal TMS API Documentation
  description: Development documentation
  version: '1.0'
servers:
  - url: https://tms.universal.rollout.com/api
security: []
paths:
  /user-activity-metrics/{id}:
    get:
      tags:
        - User Activity Metrics
      summary: Get User Activity Metric
      description: >-
        Requires `userActivityMetrics: true` in the credential's
        `entitiesToSync` selection and a connector that supports this operation.
        [Choose what data to
        sync](https://rollout.com/docs/advanced-guides/controlling-which-records-sync-with-rollout),
        or [fix an entity that is not configured to
        sync](https://rollout.com/docs/troubleshooting/entity-not-configured-to-sync).
      operationId: getUser-activity-metricsById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: fields
          in: query
          required: false
          schema:
            type: string
            description: >-
              Comma-separated top-level fields to return; the parameter can also
              be repeated, once per field. `id` is always returned. Omit it, or
              pass `allFields`, to get every field, including `original`.
              Unknown names return 400.
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  userId:
                    description: Present unless the request's `fields` leaves it out.
                    type:
                      - string
                      - 'null'
                  periodStart:
                    description: Present unless the request's `fields` leaves it out.
                    type: string
                    format: date
                  periodEnd:
                    description: Present unless the request's `fields` leaves it out.
                    type: string
                    format: date
                  activityType:
                    description: Present unless the request's `fields` leaves it out.
                    type: string
                  activityTypeName:
                    description: Present unless the request's `fields` leaves it out.
                    type: string
                  value:
                    description: Present unless the request's `fields` leaves it out.
                    type: number
                  unit:
                    description: Present unless the request's `fields` leaves it out.
                    type: string
                    enum:
                      - count
                      - minutes
                      - hours
                  breakdown:
                    description: >-
                      How much of `value` was for each deal, and the contact on
                      it, in `unit`. A split of `value`, never added to it: what
                      the entries leave is the activity the source didn't link
                      to a deal. An id is `null` when that deal or contact isn't
                      synced, and the entry keeps its value. `[]` when the
                      source can link activity to deals and linked none; `null`
                      when it can't link this activity to deals at all. Only
                      Sisu fills it today; every other app returns `[]` for now,
                      which doesn't mean its activity was unlinked. Present
                      unless the request's `fields` leaves it out.
                    type:
                      - array
                      - 'null'
                    items:
                      type: object
                      properties:
                        transactionId:
                          type:
                            - string
                            - 'null'
                        personId:
                          type:
                            - string
                            - 'null'
                        value:
                          type: number
                      required:
                        - transactionId
                        - personId
                        - value
                  created:
                    description: Present unless the request's `fields` leaves it out.
                    type:
                      - string
                      - 'null'
                    format: date-time
                  updated:
                    description: Present unless the request's `fields` leaves it out.
                    type:
                      - string
                      - 'null'
                    format: date-time
                  rolloutUpdated:
                    description: Present unless the request's `fields` leaves it out.
                    type: string
                    format: date-time
                  originalIds:
                    description: Present unless the request's `fields` leaves it out.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type:
                        - number
                        - string
                  original:
                    description: Present unless the request's `fields` leaves it out.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties: {}
                required:
                  - id
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorMessage:
                    type: string
                required:
                  - errorMessage
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    const: RESOURCE_NOT_FOUND
                  errorMessage:
                    type: string
                required:
                  - code
                  - errorMessage
      security:
        - jwt: []
          credential_id: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      description: Consumer JWT minted by the tenant's backend
    credential_id:
      type: apiKey
      in: header
      name: X-Rollout-Credential-Id
      description: The Rollout Credential ID to use for queries/mutations

````

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