Update Device Activity
This API is used to update the device activity.
Important Note:
If the value of device_management
is set to 1, which means that the system is enabled. This configuration is obtained from the server at the endpoint /api/base/configs
. The system will remain enabled until you explicitly disable it.
On the other hand, if the value device_management
is anything other than 1, the system is considered disabled.
To provide a seamless user experience, it is essential to handle the error message display only when the device_banned
status code is received. In all other cases, no error code should impact the user experience. Prioritizing a smooth user interaction, avoid unnecessary interruptions or error messages for non-banned devices.
Furthermore, to maintain an uninterrupted user experience, verifying that the device has an active internet connection is recommended before sending these requests. If the internet is not connected, refrain from sending these requests to prevent any adverse effects on the user experience.
API Route
{{apiBase}}/v2/device_activity
Request
Method: POST
Parameters
Parameter | Type | Description |
---|---|---|
| String | Required. The unique identifier of the device. |
| Integer | Required for some screens. The ID of the content that is currently being displayed or played on the device. |
| Integer | Required for some screens. The type of the content that is currently being displayed or played on the device. |
| String | Required. The current screen of the device. This value must be one of the predefined values. |
Here are the accepted current_screen
values, their respective requirements for content_id
and content_type
, when to trigger the endpoint, and the possible content_type
values:
Current Screen | Content ID & Type Required | When to Trigger |
---|---|---|
| No | When the user is on the home screen |
| Yes | When the user is viewing the information about a specific content (movie, series, etc.) |
| Yes | When the user is viewing live TV |
| Yes | When the user is viewing the Electronic Program Guide (EPG) |
| No | When the goes to content list in left menu or clicks on view all |
| Yes | When the goes to content list group in left menu |
| No | When the user is in the search screen |
| No | When the user is viewing their personal list of contents |
| No | When the user is on the help screen |
| Yes | When the user is playing a specific content (movie, series, etc.) |
| Yes | When the user is browsing a movie category |
| Yes | When the user is browsing a series category |
| No | When the user is viewing all available movies in spotlight |
| No | When the user is viewing all available series in spotlight |
content_type
values:
Value | Label |
---|---|
1 | Movie |
2 | Series |
3 | Episode |
4 | Live |
5 | Trailer |
8 | Category |
13 | Content List Group |
Usage Example
Success Response
Status: 200
Description: Indicates that the device activity was updated successfully.
Body: The response body contains the updated device activity details in JSON format.
Error Response
Status: 400
Description: Indicates an error occurred during the device activity update.
Body: The response body provides information about the specific error that occurred.
Device Not Found
If you receive the error code device_not_found
, make the "add device" call first.
Last updated