Difference between revisions of "TVOpen Message Manager API Command - Update Audio for Live Channel"

From Gvp-public
Jump to navigation Jump to search
(Created page with "==== Update Audio for Live Channel ==== ''Command name'': update_audio_for_live_channel ''Command-speci...")
 
 
Line 1: Line 1:
==== [[TVOpen Message Manager API Command - Update Audio for Live Channel|Update Audio for Live Channel]] ====
+
== URL STRUCTURE ==
''Command name'': update_audio_for_live_channel
+
<big>http://{host}:{port}/msg_mng/commands/update_audio_for_live_channel</big>
  
''Command-specific entry parameters'':
+
== HTTP METHOD ==
* channel_id: ID of the channel on which to force a specific audio language. Mandatory.
+
POST
* audio language in ISO 639-1 format. If this value is empty, this channel will return to its default audio language, specified in a local configuration variable; if this local configuration variable doesn’t exist then [[OPCHToken_DefaultAudioLanguage|DefaultAudioLanguage]] will be used. Optional.
 
''Command-specific parameters sent to GVP DataHub'':
 
* Audio language established for the channel.
 
* ChannelID which audio language has been changed.
 
''Supported targets'': it must be possible to send this command to one STB.
 
  
''Description'': This command changes the configuration of the STB enforcing a certain audio language for a certain channel. It overwrites the configuration that might have been eventually set by the end user in the STBs UI. This configuration is stored in /tmp/ChannelSettings.ini internal file, so it is stored in volatile memory and it will be lost in every STB reboot.<br>
+
== PARAMETERS ==
Message Manager won’t validate that the channel_id corresponds to a valid id configured in the instance; it is the responsibility of the source of the command to perform this validation.
+
{| class="wikitable"
 +
|-
 +
! Name !! Description !! Parameter !! Mandatory !! Type !! Format
 +
|-
 +
| colspan=6 align="center" | '''<big>[[TVOpen Message Manager API Common Parameters|Common Parameters]]</big>'''
 +
|-
 +
| channel_id || ID of the channel on which to force audio language || Specific || true || integer || int32
 +
|-
 +
| audio || Audio language in [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1] format.<br>If this value is empty, this channel will return to its default audio language,specified in local configuration value [[OPCHToken_DefaultAudioLanguage|DefaultAudioLanguage]].<br><br>If operator wants to set the "Original" audio track (which does not exists on ISO639-n codes) on any channel, set this variable to '''og'''. || Specific || false || string || string
 +
|}
 +
 
 +
== RESPONSES ==
 +
{| class="wikitable"
 +
|-
 +
! Code !! Summary !! Response !! Type !! Description
 +
|-
 +
| 200 || Object Response || status_code <br> message || int32 <br> string || Identifier that indicates the operation is correct (0) <br> Message description response
 +
|-
 +
| 400 || Unrecognized mandatory fields|| status_code <br> message || int32 <br> string || Error code from Message Manager <br>   Error description response
 +
|-
 +
| 500 || Unexpected Error || status_code <br> message || int32 <br> string || Error code from Message Manager or destination server (Infopush/Sprayer) <br> Error description response
 +
|}
 +
 
 +
== SAMPLE ==
 +
=== Request ===
 +
curl --data "instance_id=25&device_type=802&command_id=inh70eozkjxpw7jsqjtel9er&start_time=2017-01-03T12:1&end_time=2017-01-03T12:18:00Z&target_type=stb_id&stb_id=keke&source_id=0&channel_id=12" http://localhost:8585/msg_mng/commands/update_audio_for_live_channel
 +
 
 +
=== Response ===
 +
{"status_code": 0, "message": "Operation successful. Info push message: Message inserted into database"}

Latest revision as of 12:34, 30 April 2020

URL STRUCTURE

http://{host}:{port}/msg_mng/commands/update_audio_for_live_channel

HTTP METHOD

POST

PARAMETERS

Name Description Parameter Mandatory Type Format
Common Parameters
channel_id ID of the channel on which to force audio language Specific true integer int32
audio Audio language in ISO 639-1 format.
If this value is empty, this channel will return to its default audio language,specified in local configuration value DefaultAudioLanguage.

If operator wants to set the "Original" audio track (which does not exists on ISO639-n codes) on any channel, set this variable to og.
Specific false string string

RESPONSES

Code Summary Response Type Description
200 Object Response status_code
message
int32
string
Identifier that indicates the operation is correct (0)
Message description response
400 Unrecognized mandatory fields status_code
message
int32
string
Error code from Message Manager
Error description response
500 Unexpected Error status_code
message
int32
string
Error code from Message Manager or destination server (Infopush/Sprayer)
Error description response

SAMPLE

Request

curl --data "instance_id=25&device_type=802&command_id=inh70eozkjxpw7jsqjtel9er&start_time=2017-01-03T12:1&end_time=2017-01-03T12:18:00Z&target_type=stb_id&stb_id=keke&source_id=0&channel_id=12" http://localhost:8585/msg_mng/commands/update_audio_for_live_channel

Response

{"status_code": 0, "message": "Operation successful. Info push message: Message inserted into database"}