ActivTrak Reports API

Live Data API - query activity reports (Working Hours, Activity Log).

OpenAPI Specification

activtrak-reports-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ActivTrak Public APIs Administration Reports API
  version: v2
  description: 'ActivTrak''s Public APIs provide REST endpoints for accessing digital activity reports (Live Data API) and for administering an ActivTrak instance (users, groups via SCIM 2.0, clients, consumers) plus bulk HR data import. Authentication is via an API key. Reference: https://developers.activtrak.com/'
  contact:
    name: ActivTrak Support
    email: support@activtrak.com
    url: https://developers.activtrak.com/
  termsOfService: https://www.activtrak.com/terms-of-use/
servers:
- url: https://api.activtrak.com
  description: United States (default)
- url: https://api-eu.activtrak.com
  description: European Union
- url: https://api-uk.activtrak.com
  description: United Kingdom
- url: https://api-ca.activtrak.com
  description: Canada
- url: https://api-au.activtrak.com
  description: Australia
security:
- ApiKeyAuth: []
tags:
- name: Reports
  description: Live Data API - query activity reports (Working Hours, Activity Log).
paths:
  /reports/v2/activitylog:
    get:
      operationId: getActivityLog
      summary: This API call returns a list of Activity Log objects
      tags:
      - Reports
      description: This API call returns a list of Activity Log objects
      parameters:
      - name: startDate
        in: query
        required: false
        description: 'The starting date. Format: YYYY-MM-DD. If a cursor is provided for pagination, this field does not affect your query results. The default value is {TODAY}'
        schema:
          type: string
          format: date-time
          default: The current timestamp
      - name: endDate
        in: query
        required: false
        description: 'The end date (inclusive). Format: YYYY-MM-DD. This field should only be used to bind your data to a specific date range. Otherwise, you only require the start date and you can paginate through to all available data from that point.'
        schema:
          type: string
          format: date-time
      - name: clientId
        in: query
        required: false
        description: The specific client id to fetch data. The default value of -1 returns data "all users" Only one of the fields (clientId, groupId, deviceId) can be sent per request
        schema:
          type: string
      - name: deviceId
        in: query
        required: false
        description: The specific device id to fetch data. Only one of the fields (clientId, groupId, deviceId) can be sent per request
        schema:
          type: string
      - name: groupId
        in: query
        required: false
        description: The specific group id to fetch data. Only one of the fields (clientId, groupId, deviceId) can be sent per request
        schema:
          type: string
      - name: pageSize
        in: query
        required: false
        description: The page size for number of results to return per request. The maximum value is 1000. The default value is 150.
        schema:
          type: integer
          format: int32
          default: 150
      - name: cursor
        in: query
        required: false
        description: The cursor for pagination. When a request is made without a cursor, the response returns results based on the date range. Each response returns a cursor. You should input the new cursor value for each subsequent request if you wish to paginate through additional data. If you do provide a cursor, the startDate no longer affects the result boundaries. This allows you to receive old records that have arrived late. If you receive no results with a valid/provided cursor, it means that no new records have been received yet. A cursor request which returns no results will return the same cursor back to the caller.
        schema:
          type: string
      - name: minDuration
        in: query
        required: false
        description: The minimum duration in seconds (inclusive). Only activities that have a duration greater than or equal to this value will be returned.
        schema:
          type: string
      - name: maxDuration
        in: query
        required: false
        description: The maximum duration in seconds (inclusive). Only activities that have a duration less than or equal to this value will be returned.
        schema:
          type: string
      responses:
        '200':
          description: A response with the Report for Users.
          content:
            application/json:
              schema:
                type: object
                properties:
                  activity:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        logId:
                          type: integer
                          format: int64
                        productivity:
                          type: integer
                          format: int32
                        screenshotUrl:
                          type: string
                          nullable: true
                        popupAlarm:
                          type: boolean
                          nullable: true
                        emailAlarm:
                          type: boolean
                          nullable: true
                        externalNotificationAlarm:
                          type: boolean
                          nullable: true
                        terminate:
                          type: boolean
                          nullable: true
                        time:
                          type: string
                          format: date-time
                        computerId:
                          type: integer
                          format: int32
                        computer:
                          type: string
                          nullable: true
                        primaryDomain:
                          type: string
                          nullable: true
                        privateIp:
                          type: string
                          nullable: true
                        publicIp:
                          type: string
                          nullable: true
                        loginDomain:
                          type: string
                          nullable: true
                        user:
                          type: string
                          nullable: true
                        session:
                          type: integer
                          format: int32
                        duration:
                          type: integer
                          format: int32
                        applicationId:
                          type: integer
                          format: int32
                        websiteId:
                          type: integer
                          format: int32
                          nullable: true
                        titleBar:
                          type: string
                          nullable: true
                        executable:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        website:
                          type: string
                          nullable: true
                        subpage:
                          type: string
                          nullable: true
                        url:
                          type: string
                          nullable: true
                        location:
                          type: string
                          nullable: true
                        time_zone:
                          type: string
                          nullable: true
                        time_utc:
                          type: string
                          format: date-time
                  cursor:
                    type: string
                    nullable: true
        '400':
          description: Bad request. Failed StatusResponse with an error message indicating the reason of the failure.
        '500':
          description: Internal Server Error.
      security:
      - ApiKeyAuth: []
  /reports/v2/workinghours/computers:
    get:
      operationId: getWorkingHoursForComputers
      summary: This API call returns a list of Working Hour Activity objects along with a total (used for pagination). This data will b
      tags:
      - Reports
      description: This API call returns a list of Working Hour Activity objects along with a total (used for pagination). This data will be from the computer perspective.
      parameters:
      - name: from
        in: query
        required: true
        description: 'The starting date. Format: YYYY-MM-DD.'
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        required: true
        description: 'The end date (inclusive). Format: YYYY-MM-DD.'
        schema:
          type: string
          format: date-time
      - name: deviceId
        in: query
        required: false
        description: The specific device id to fetch data. Only one of the fields (clientId, groupId, deviceId) can be sent per request.
        schema:
          type: string
      - name: groupId
        in: query
        required: false
        description: The specific group Id to fetch data. Only one of the fields (clientId, groupId, deviceId) can be sent per request.
        schema:
          type: string
      - name: page
        in: query
        required: false
        description: The page number used in pagination.
        schema:
          type: integer
          format: int32
          default: 1
      - name: pageSize
        in: query
        required: false
        description: The page size for the number of results to return per request. The maximum value is 1000.
        schema:
          type: integer
          format: int32
          default: 150
      responses:
        '200':
          description: A response with the Report for Computers.
          content:
            application/json:
              schema:
                type: object
                properties:
                  activity:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date-time
                        userId:
                          type: integer
                          format: int64
                          nullable: true
                        computerId:
                          type: integer
                          format: int64
                          nullable: true
                        user:
                          type: string
                          nullable: true
                        computer:
                          type: string
                          nullable: true
                        groups:
                          type: array
                          nullable: true
                          items:
                            type: array
                            nullable: true
                            items: {}
                        computers:
                          type: array
                          nullable: true
                          items:
                            type: array
                            nullable: true
                            items: {}
                        users:
                          type: array
                          nullable: true
                          items:
                            type: array
                            nullable: true
                            items: {}
                        firstActivity:
                          type: string
                          format: date-time
                          nullable: true
                        lastActivity:
                          type: string
                          format: date-time
                          nullable: true
                        lastActivityLog:
                          type: string
                          format: date-time
                          nullable: true
                        activeTime:
                          type: object
                          properties:
                            productive:
                              type: integer
                              format: int64
                            unproductive:
                              type: integer
                              format: int64
                            undefined:
                              type: integer
                              format: int64
                            total:
                              type: integer
                              format: int64
                        passiveTime:
                          type: object
                          properties:
                            productive:
                              type: integer
                              format: int64
                            unproductive:
                              type: integer
                              format: int64
                            undefined:
                              type: integer
                              format: int64
                            total:
                              type: integer
                              format: int64
                        totalTime:
                          type: integer
                          format: int64
                  total:
                    type: integer
                    format: int64
        '400':
          description: Bad request. Failed StatusResponse with an error message indicating the reason of the failure.
        '500':
          description: Internal Server Error.
      security:
      - ApiKeyAuth: []
  /reports/v2/workinghours/users:
    get:
      operationId: getWorkingHoursForUsers
      summary: This API call returns a list of Working Hour Activity objects along with a total (used for pagination). This data is fro
      tags:
      - Reports
      description: This API call returns a list of Working Hour Activity objects along with a total (used for pagination). This data is from the user's perspective.
      parameters:
      - name: from
        in: query
        required: true
        description: 'The starting date. Format: YYYY-MM-DD.'
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        required: true
        description: 'The end date (inclusive). Format: YYYY-MM-DD.'
        schema:
          type: string
          format: date-time
      - name: clientId
        in: query
        required: false
        description: The specific client Id to fetch data. The default value of -1 returns data "all users". Only one of the fields(clientId, groupId, deviceId) can be sent per request.
        schema:
          type: string
      - name: groupId
        in: query
        required: false
        description: The specific group Id to fetch data. Only one of the fields (clientId, groupId, deviceId) can be sent per request.
        schema:
          type: string
      - name: page
        in: query
        required: false
        description: The page number used in pagination.
        schema:
          type: integer
          format: int32
          default: 1
      - name: pageSize
        in: query
        required: false
        description: The page size for the number of results to return per request. The maximum value is 1000.
        schema:
          type: integer
          format: int32
          default: 150
      responses:
        '200':
          description: A response with the Report for Users.
          content:
            application/json:
              schema:
                type: object
                properties:
                  activity:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date-time
                        userId:
                          type: integer
                          format: int64
                          nullable: true
                        computerId:
                          type: integer
                          format: int64
                          nullable: true
                        user:
                          type: string
                          nullable: true
                        computer:
                          type: string
                          nullable: true
                        groups:
                          type: array
                          nullable: true
                          items:
                            type: array
                            nullable: true
                            items: {}
                        computers:
                          type: array
                          nullable: true
                          items:
                            type: array
                            nullable: true
                            items: {}
                        users:
                          type: array
                          nullable: true
                          items:
                            type: array
                            nullable: true
                            items: {}
                        firstActivity:
                          type: string
                          format: date-time
                          nullable: true
                        lastActivity:
                          type: string
                          format: date-time
                          nullable: true
                        lastActivityLog:
                          type: string
                          format: date-time
                          nullable: true
                        activeTime:
                          type: object
                          properties:
                            productive:
                              type: integer
                              format: int64
                            unproductive:
                              type: integer
                              format: int64
                            undefined:
                              type: integer
                              format: int64
                            total:
                              type: integer
                              format: int64
                        passiveTime:
                          type: object
                          properties:
                            productive:
                              type: integer
                              format: int64
                            unproductive:
                              type: integer
                              format: int64
                            undefined:
                              type: integer
                              format: int64
                            total:
                              type: integer
                              format: int64
                        totalTime:
                          type: integer
                          format: int64
                        TotalOfflineMeetings:
                          type: integer
                        location:
                          type: string
                  total:
                    type: integer
                    format: int64
        '400':
          description: Bad request. Failed with an error message indicating the reason of the failure.
        '500':
          description: Internal Server Error.
      security:
      - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Public API key sent in the x-api-key header. Some endpoints also accept `Authorization: Bearer {apiKey}`. Keys are created in the ActivTrak app under API & Integrations > API Keys.'