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

# Get User Activity

> Get a user's activity for this week, and the last 25 activities



## OpenAPI

````yaml get /activity/{workspaceId}/user/{userId}
openapi: 3.0.3
info:
  title: Hyra API
  description: Hyra Monolythic API
  version: 2.0.0
servers:
  - url: https://api.hyra.io
security: []
paths:
  /activity/{workspaceId}/user/{userId}:
    get:
      tags:
        - Activity
      description: Get a user's activity for this week, and the last 25 activities
      parameters:
        - schema:
            type: boolean
          in: query
          name: withGame
          required: false
          description: Include the game in the response
        - schema:
            type: string
          in: path
          name: userId
          required: true
          description: The user's ID/@me
        - schema:
            type: string
          in: path
          name: workspaceId
          required: true
        - schema:
            type: string
          in: header
          name: X-Socket-Id
          required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  totals:
                    type: object
                    properties:
                      minutes:
                        type: number
                      messages:
                        type: number
                      period:
                        type: string
                    required:
                      - minutes
                      - messages
                      - period
                  last_25:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                        start:
                          type: string
                        end:
                          type: string
                        ended:
                          type: boolean
                        game:
                          type: string
                        friends:
                          type: array
                          items:
                            type: string
                        consolidation_state:
                          type: string
                        error:
                          type: string
                        tracked_idle:
                          type: number
                        duration:
                          type: number
                        gifted_by:
                          type: string
                        messages_sent:
                          type: number
                        game_details:
                          type: object
                          description: Only returned if ?withGame=true
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            thumbnail:
                              type: string
                            url:
                              type: string
                            dominant:
                              type: string
                            brightness:
                              type: number
                        manual_punch:
                          type: boolean
                        events:
                          type: array
                          items:
                            type: object
                            properties:
                              event:
                                type: string
                              timestamp:
                                type: string
                                format: date-time
                              data:
                                type: object
                                additionalProperties: true
                              _id:
                                type: string
                              user:
                                type: string
                            required:
                              - event
                              - timestamp
                              - data
                              - _id
                              - user
                        job_id:
                          type: string
                      required:
                        - _id
                        - start
                        - ended
                        - game
                        - tracked_idle
                  week_starts_on:
                    type: string
                required:
                  - totals
                  - last_25
                  - week_starts_on
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````