cURL example
(The API key in these examples is not real, i.e. running them will result in "Server error".)
Create device (no MAC or IP specified)
curl --request POST \
--url https://app.zem.com/api/device \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"hostname": "security_entrance",
"group": "GROUP_01",
"profile": "CAMERA"
}'
(Both macs and ips may be omitted entirely. The device is then created without any MAC
addresses, but still with an IP address allocated for every IP/MAC pair the profile allows -
the same as adding the device through the interface and leaving the MAC fields empty.)
Create device (IP specified, no MAC)
curl --request POST \
--url https://app.zem.com/api/device \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"hostname": "security_entrance",
"group": "GROUP_01",
"profile": "CAMERA",
"ips": ["100.1.1.10"]
}'
Create device (MAC and IP specified)
curl --request POST \
--url https://app.zem.com/api/device \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"hostname": "security_entrance",
"group": "GROUP_01",
"profile": "CAMERA",
"macs": ["00:11:22:33:44:55"],
"ips": ["100.1.1.10"]
}'