Create a new object and return its instance resource.
HTTP POST
POST /api/2013-12-01/Objects/[Agency ID]
You must POST at least the following to create a new object.
Parameter | Description |
---|---|
Border | The color of the border around the object. Valid values include Black, Blue, Green, Orange, Pink, Purple, Red, White, Yellow |
Indicator | The color of the indicator icon inside the object. Valid values include Black, Blue, Green, Orange, Pink, Purple, Red, White, Yellow |
Name | The new object’s name. Maximum of 32 characters. |
Tab ID | The ID of the tab you’d like this object to appear on. |
Type | The type of object you’d like to create. Valid values include Role, Group, Camera. |
You may also set the following information when creating your new object.
Parameter | Description |
---|---|
Contact ID | The Contact ID of the primary point of contact (Occupant) that should be assigned to the object. |
Subtitle | The subtitle that appears underneath the object name. Maximum of 255 characters. |
Weblink | A weblink to an external resource. Maximum of 255 characters. |
Example Request
$ curl -XPOST https://[Site Name].readyop.com/api/2013-12-01/Objects/[Agency ID] \
-d "Border=Red" \
-d "Contact ID=3858158" \
-d "Indicator=Green" \
-d "Name=My%20Object" \
-d "Subtitle=Object%20Subtitle" \
-d "Tab ID=23" \
-d "Type=Group" \
-u "[API Account ID]:[API Token]"
Request Result
{
"code": 0,
"status": 200,
"detail": "Success",
"timestamp": "2019-01-31T19:12:46+00:00",
"object": {
"Object ID": 13310
}
}