Jetstream API
Jetstream Workflow Guides
Configuring a Device: Policies & Parameters
10min
terso devices are remotely configurable and each device, with the exception of the handheld, contains dozens of customizable settings, which we call parameters performing this configuration with the api takes several sequential steps, but following this guide will ensure that your device configuration goes as smoothly as possible let's review the high level steps to configure a device's parameters before we dive into the details create a policy for each type of terso device you have you can also add multiple policies for each device type if you want different parameter configurations add the appropriate policy to each device, overriding individual parameters as desired sync the configuration parameters to the physical jetstream device verify that the policy applied is working as desired modify as needed creating a policy a policy is a complete set of configuration parameters that can be applied to a terso device to override it's factory default parameters therefore you only need to create and apply policies if you wish to change the default settings determine which device types docid 0mdmv9mheyzodrera8n7x and firmware version you are creating a policy for if the device is already registered and communicating, you can find the current fw version by reviewing a statusevent docid\ wfpf7d 2jsp7uavkaqvmp sent from the device and referencing the "agentversion" property if you need help determining the firmware version, contact us mailto\ support\@tersosolutions com for that device type, review the config parameters section to learn more about what parameters can be configured for that device, as well as what the defaults are, and in what fw version they were introduced using the create a device docid\ p7nz8balv5 rd8s82wh5d endpoint, enter every config parameter for the selected device type and fw version in the body of the request whenever you are not sure if you want to change a value, simply enter the default value in your policy you can always later override individual parameters when adding the policy to a device networking parameters (dns, gateway ip, subnet) should be left as default and carefully overridden per device as needed overrides to those settings should only be applied while you have physical access to the unit, so that if you send incorrect networking settings, you can correct these settings locally on the unit, and quickly restore jetstream connectivity errors or typos when setting networking parameters cannot be fixed remotely, as the invalid settings now set on the unit will prevent communication adding a policy to a device now that the policy exists in jetstream, you must link it to each relevant device for which you wish to override the factory defaults use the add a policy to a device docid 8iinkl mz80hpiut5zv2e endpoint to create the link between the policy and the device you may specify individual parameters to override, or assign the policy as is syncing the parameters to a device at this point, jetstream knows that a policy has been assigned to the device, but the physical device has not yet received the command to use the new parameters for each device that has a policy added to it in jetstream, use the set a device's policy parameters docid\ g2ehibf dqnwc4nh0cx1w endpoint to apply the policy as it is configured in jetstream only sync the parameters to a device when the device is online and able to receive the command if the device does not receive the command within 24 hours, the command will time out and the parameters will not be synced you can verify that a device is online using the get device status docid 0r9xzn3hnqid911qs3wxg command, an online device should respond with "websockets enabled" reviewing policies, policies added to devices, and synced parameters we have created a standalone policy record in jetstream, added the policy to the device in jetstreamwith possible overrides, and synced the parameters to the device you can review each of these steps using different endpoints review all existing policy records using the get all policies docid\ drwgilnwaaq3tjs0ku6kt endpoint review a specific policy record using the get a policy docid\ n2frgd2 rnnu0gftrn2jd endpoint review the policy added to a specific device and any overrides in jetstream using the get a device's policy docid\ jpvlogcer v a1msoxawa endpoint review the current parameters the physical device is actually operating with using the get a device's policy parameters docid\ g6s4nzg5dsgaf dcagbtb endpoint the device will return it's current parameters via a getconfigvalues commandcompletionevent docid\ sj1tshbqvf4fri6az1ywg in the event queue, which can be retrieved via the get events docid\ exupifhp3manjooqyjsiz endpoint modifying a device's configuration parameters you have successfully created a policy, added it to the device in jetstream, and set the device's configuration parameters if you wish to modify the parameters of a device at this point, you have multiple options, depending on your goal create a new policy this option is best when you want to change the exact same parameters for multiple devices create an entirely new policy with the desired parameter changes following the steps above remove the existing policy from devices using the remove a policy from a device docid 2sh8ii2y bw9eb7d7hlbh endpoint add the policy to the device, using the steps above sync the config parameters to the device, using the steps above remove and add the policy to the device with new overrides this option is best if you are only looking to change the parameters for a single device remove the existing policy from devices using the remove a policy from a device docid 2sh8ii2y bw9eb7d7hlbh endpoint re add the policy to the device using the steps above, but override the parameters you would like to change sync the config parameters to the device, using the steps above removing a policy from a device in jetstream does not do anything to change the parameters on the device itself if you wish to "reset parameters to defaults", you will need to create and sync a policy that have these values set to defaults, or override a policy with the default values devices are intentionally designed to remember their last policy settings, so even removing the device from jetstream entirely will not do anything to clear or reset the parameter settings on the device