List Company Video Metrics

An overview of the List Company Video Metrics

Endpoint Description

Retrieve a list of all videos in the R1 Discover video library watched by users that are within your accessible companies (subscriptions). Endpoints return detail describing watch metrics.

HTTP Method

GET /api/v2/metrics/metrics/videos/companies/{companyId}

Request

Headers:

  • Content-Type: application/json - Specifies that the request body format is JSON.

  • Accept: application/json - Indicates that the client expects a JSON response.

  • Authorization: Bearer {token} - A valid Bearer token must be provided to authenticate the request.

URL Parameters

  • companyId (integer, required): The id of the company (subscription) to query user activity data. Example: 1

Query Parameters:

  • page (integer, required): Specifies the page number in the pagination sequence to retrieve a specific set of results.

  • limit (integer, required): Specifies the number of records to retrieve per page, controlling the volume of data returned.

Request Examples

curl --request GET \
    --get "http://r1discoverapi.local/api/v2/metrics/metrics/videos/companies/1?page=1&limit=50" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Bearer {token}"

Response

Meta:

Each List endpoint will contain a meta element which will describe the returned package. In this endpoint, the meta will provide the following information:

  • total_items (Integer): The number of activities returned across all queried companies

  • total pages (integer): The number of pages returned in the call to the endpoint. (Total Items / per_page limit)

  • current_page (integer): Indicates the current page number of the results

  • per_page (integer): Indicates the number of results (topics) that will be listed on a single page. The default is 50, the limit is 100.

Data Dictionary:

  • video_log_id (integer): R1 unique identifier for the video log.

  • video_url (string): The URL to access the video via the Remote Login Token (RLT) for integration via an iFrame.

  • user_id (integer): The ID of the user that accessed the video.

  • video_title (string): The title of the video.

  • start_time_stamp (string): The date/time the video session was started.

  • completion_time_stamp (string): The date/time the video session was completed.

  • watched_percentage (float): The percentage of the video that was watched in this session.

  • watched_duration (float): The number of seconds of the video that were watched in this session.

Response Examples

{
    "meta": {
        "total_items": 1,
        "total_pages": 1,
        "current_page": 1,
        "per_page": 50
    },
    "data": {
        "company_id": "1342",
        "video_metrics": [
            {
                "video_log_id": 1,
                "video_url": "",
                "user_id": 19876,
                "video_title": "Explore the Stages of Change Model",
                "start_time_stamp": "2024-01-07T21:50:27.000000Z",
                "completion_time_stamp": "2024-01-07T21:50:53.000000Z",
                "watched_percentage": "100.00",
                "watched_duration": "126.92"
            }
        ]
    }
}
Link to endpoint in Postman.

Notes

  • Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to access the endpoint.

  • Response Handling: Implement pagination to manage data effectively, especially when dealing with large datasets.

Last updated