The method and parameters
|
POST /api/v1/billing/tree |
There are two types of tree structures: one for cameras and one for intercoms.
When creating elements, you can specify a custom key to reference that element. These keys must be unique within the same tree type.
When creating a subtree element, you can provide either an ID from the VMS database or the custom key specified during creation.
A tree element cannot simultaneously contain both child elements and terminal objects.
After creating a root tree element, it will become accessible to administrators who have permission to Synchronize tree root elements to user (groups-root-sync).
{
"name": "new name",
"type": "cameras|intercoms",
"external_id": null,
"parent_external_id": null,
"parent_id": null,
"is_last": true,
"log_extra": {
"some": "information"
}
}
The parameters
string name, Name of the tree element
string type, Tree type
string|int external_id, Key for tree element
int parent_id, Necessary for creating a subelement in the tree through id in VMS database
string|int parent_external_id, Required to create a subelement in the tree through the unique key specified when creating it
bool is_last, To create a final group to which elements can be added
string|array log_extra, Additional information received from an external system
|
201 |
|
Successful response JSON
|
|
422 |
|
Returns a JSON object with an error. For details, see General information > Validation. JSON
|