Update Device Activity
This API is used to update the device activity.
Last updated
This API is used to update the device activity.
Last updated
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.
{{apiBase}}/v2/device_activity
Method: POST
Parameters
Parameter | Type | Description |
---|---|---|
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 |
---|---|---|
content_type
values:
Usage Example
Status: 200
Description: Indicates that the device activity was updated successfully.
Body: The response body contains the updated device activity details in JSON format.
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.
Value | Label |
---|---|
mac_address
String
Required. The unique identifier of the device.
content_id
Integer
Required for some screens. The ID of the content that is currently being displayed or played on the device.
content_type
Integer
Required for some screens. The type of the content that is currently being displayed or played on the device.
current_screen
String
Required. The current screen of the device. This value must be one of the predefined values.
home
No
When the user is on the home screen
content_info
Yes
When the user is viewing the information about a specific content (movie, series, etc.)
livetv
Yes
When the user is viewing live TV
epg
Yes
When the user is viewing the Electronic Program Guide (EPG)
content_list
No
When the goes to content list in left menu or clicks on view all
content_list_group
Yes
When the goes to content list group in left menu
search
No
When the user is in the search screen
my_list
No
When the user is viewing their personal list of contents
help
No
When the user is on the help screen
player
Yes
When the user is playing a specific content (movie, series, etc.)
movie_category
Yes
When the user is browsing a movie category
series_category
Yes
When the user is browsing a series category
all_movies
No
When the user is viewing all available movies in spotlight
all_series
No
When the user is viewing all available series in spotlight
1
Movie
2
Series
3
Episode
4
Live
5
Trailer
8
Category
13
Content List Group