This guide explains a basic example of how to read and update a device's Outputs shadow using Postman. The same patterns apply to other shadows (System, Inputs, Encoders, Alerts, Containers).
Before proceeding, please make sure you've completed a walkthrough of the article: How to control Videon devices with Shadows 101.
Table of contents:
Encoder Creation, Modification, and Deletion from Cloud UI/Postman
Creating/Deleting an Encoder through Cloud UI
First, we create an Opus audio encoder from the Devices page → CONFIGURATION → Encoders → Create Encoder on the top right corner.
Save the encoder and from Postman, get the current Encoders shadow (navigate to the hyperlink to determine the request needed and change the query param shadow_names to shadow_names=Encoders). Then copy and paste the response to your Postman Encoders Shadow SET Template (see screenshot below).
If you delete the encoder on the Cloud UI, go to Postman and run another Get Encoders Shadow, and you should see that the Opus encoder is no longer returned in the response.
Creating/Modifying/Deleting an Encoder through Postman
Copy the states from Get Device Shadow and copy/paste it into Send Device Shadow (on the left in the screenshot). Make sure every encoder you need is included to avoid unexpected deletion.
Each encoder only needs an id, a type, and a config. You can delete other components of the encoder in Send Device Shadow.
seconds_in_status, current_bitrate, etc.id is false. Make sure you have a name for the encoder. See example block below.{
"id": false,
"type": "audio",
"config": {
"active": false,
"in_channel_id": 23,
"mix_mode": "STEREO",
"sample": "SAMPLE_48_khz",
"name": "Opus Audio",
"codec": "opus",
"bitrate_mode": "constant",
"bitrate": 64,
"selected_channels": [
1,
2
],
"enable_retry": true
}
In the bottom of Get Device Shadow, there’s a line indicating the current version. (current_version). Remember the number, and change the target_version at the top of Send Device Shadow to that number plus one. (If current_version is 35, change target_version to 36).
Save and send both Send Device Shadow and Track Command GUID. Check that in Track Command GUID, “finished” is true and “command_state” is succeeded.
Go to Cloud UI, click FORCE SYNC at the top right. You will see the new encoder in the encoders list!
To modify an encoder, first, get the id from running Get Device Shadow and change the id from false to that number in Send Device Shadow. Then you are free to make modifications on variables in the block in Send Device Shadow on Postman.
Update the target version in Send Device Shadow to current version in Get Device Shadow + 1. Save and send both Send Device Shadow and Track Command GUID. Check that in Track Command GUID, “finished” is true and “command_state” is succeeded.
Go to your Cloud UI, click FORCE SYNC (if the modifications are not showing, try RELOAD or refreshing the page). You should see the modifications being made to your encoder.
To delete an encoder, delete the corresponding block in Send Device Shadow. Follow the underlined instructions above this paragraph. You should see the encoder is gone on the Cloud UI.