Add a Policy to a Device
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 request and compare the results with the policy and overridden device parameters. If Jetstream determines that there is a variance, then a LogEntryEvent (PolicyError) will be published.
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. |
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 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 (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 synced to the specified device. This value is generated by Jetstream – do not define it in requests. |
POST https://api.jetstreamrfid.com/2/devices/{DeviceName}/Policy
201 Created
Replaces AddDeviceToPolicy