Send a Polyfence configuration to a Device (POST)
https://core.rock7.com/API3/Polyfence/{polyfence_id}/Send
Once a Polyfence has been defined; it can be sent to devices.
Sending a Polyfence to a device will “lock” the Polyfence so no further Geofences may be attached. If you wish to include additional Geofences, a new Polyfence must be created.
Issuing this command will replace any other Polyfences associated with this device.
A device can be identified either by its device identifier or its serial.
Parameter | Type | Description | Example/Possible Values |
---|---|---|---|
PATH PARAMS | |||
polyfence_id | string | required Polyfence identifier | LpwjgJyDQqreRkExXlEAGYmVlazNdOMX |
QUERY PARAMS | |||
device | string | Device identifier (preferred) | device_identifier |
serial | string | Device serial number (optional) | device_serial_number |
Example with Parameters
curl --request POST \
--url 'https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Send?device=device_identifier&serial=device_serial_number&username=myUsername&password=myPassword' \
--header 'accept: application/json'
Response
{
"polyfence": {
"created": "2024-07-12T16:14:22.000Z",
"geofences": [
{
"geofence": {
"name": "bermuda_triangle",
"definition": "25.41,-80.23,32.38,-64.67,18.38,-65.63",
"id": "JYXyvGekqxMKABvYGyEzbRDgVQZOwmdp",
"type": "geofence"
},
"behaviour": "IN"
}
],
"name": "Polyfence XYZ",
"id": "OVdRorbmlwqkNBpaZynJYPZvxaXpzjLg",
"type": "polyfence",
"locked": true
}
}