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 configuration parameters docid 94vzb6djztjxfyzb78uj request and compare the results with the policy and overridden device parameters if jetstream determines that there is a variance, then a logentryevent docid 29y5yuyif83jhs1f2y r0 (policyerror) will be published parameters property location details accesskey string required unique header the access key for your user account this value is a 36 character guid provided during user account sign up https //jetstreamrfid com/login/signup 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 the name of the policy this value is one of the policies retrieved by the get all policies docid\ trcfpseda oo4vvkdn3dj 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 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 if a device's parameters do not match the policy, a logentryevent docid 29y5yuyif83jhs1f2y r0 (policyexception) is published lastpolicyupdate string body 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 the date/time value indicating when a policy was last set a device's configuration parameters docid\ llqub1kfyhmeomohn 1fc to the specified device this value is generated by jetstream – do not define it in requests example request url post https //api jetstreamrfid com/2/devices/{devicename}/policy request body { 	"name" "mypolicyname", 	"parameters" { 	 "aggregateeventscancount" 3 	} } response code 201 created response body { 	"name" " mypolicyname", 	"parameters" { 	 "aggregateeventscancount" "3" 	}, 	"lastpolicyupdate" "2017 05 18t18 56 27z", 	"lastpolicysync" "" } version changes replaces adddevicetopolicy