cURL example
(The token and the Authorization header in these examples are 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: Basic YWRtaW5AZXhhbXBsZS5jb206c2VjcmV0' \
--header 'X-Tenant: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0ZW5hbnQiOiJsb2NhbHplbSJ9.Js6_AlQ_Pl1n4KxCIWrzhRXlRZ7U4NcHmVKl6tWBXIQ' \
--data '{
"hostname": "security_entrance",
"group": "GROUP_01",
"profile": "CAMERA",
"macs": [""]
}'
(Note here how there's still an empty array provided as a value for the macs field,
otherwise the request will be deemed invalid)
Create device (MAC and IP specified)
curl --request POST \
--url https://app.zem.com/api/device \
--header 'Authorization: Basic YWRtaW5AZXhhbXBsZS5jb206c2VjcmV0' \
--header 'X-Tenant: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0ZW5hbnQiOiJsb2NhbHplbSJ9.Js6_AlQ_Pl1n4KxCIWrzhRXlRZ7U4NcHmVKl6tWBXIQ' \
--data '{
"hostname": "security_entrance",
"group": "GROUP_01",
"profile": "CAMERA",
"macs": ["00:11:22:33:44:55"],
"ips": ["100.1.1.10"]
}'