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 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 user profile.

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 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 synced 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.