Jetstream API
...
API Endpoints
Policy Configuration
Add a Policy to a Device
6min
about add a specified policy to the specified device in your jetstream application this triggers monitoring of the device's configuration values for any discrepancies from the policy – jetstream will automatically schedule a get a device's policy parameters docid\ g6s4nzg5dsgaf dcagbtb request and compare the results with the policy and overridden device parameters parameters property location details accesskey string required unique header the access key for your user account this value is a 36 character guid provided in your getting started docid\ bbifqiuixnd5iafmrebbi devicename string required unique url the name of the device this value has a max length of 128 ascii characters this value must adhere to this regular expression ^\[a za z0 9 , ] $ the device must not already have a policy added to it name string required unique body request response the name of the policy this value is one of the policies retrieved by the get all policies docid\ drwgilnwaaq3tjs0ku6kt request this value has a max length of 128 ascii characters this value must adhere to this regular expression ^\[a za z0 9 , ] $ parameters dictionary(string,string) body request response the parameters and values to override what’s currently set for them in the policy all parameters defined must be in the policy’s associated device definition all values defined must be of the type (e g , int, bool, string, float, datetime) defined in the policy’s associated device definition lastpolicyupdate string body response the date/time value indicating when a policy was last added to the specified device this value is generated by jetstream – do not define it in requests lastpolicysync string body response the date/time value indicating when a policy was last set a device's policy parameters docid\ g2ehibf dqnwc4nh0cx1w to the specified device this value is generated by jetstream – do not define it in requests example request url post https //api jetstreamrfid com/3/devices/{devicename}/policy request body { 	"name" "mypolicyname", 	"parameters" { 	 "aggregateeventscancount" 3 	} } response code 201 created response body { 	"id" 1, 	"name" " mypolicyname", 	"parameters" { 	 "aggregateeventscancount" "3" 	}, 	"lastpolicyupdate" "2018 05 18t18 56 27z", 	"lastpolicysync" "" } version changes addition of the id property