Breadcrumbs

Delete a private folder

The method and parameters

DELETE  /api/v1/billing/tree/folders/private

JSON
{
    "id": null,
    "external_id": "external_id_of_tree_element",
    "key": "random_key",
    "log_extra": {
        "some": "information"
    }
}

int id  required – the ID of the tree element (is required when no external_id is specified).


string|int external_id  required – the key of the tree element (is required when no id is specified).


string key  required – the key for the folder, which can be sent instead of the ID when creating a camera, if you need to add a camera to the folder.


string|array log_extra – additional information received from an external system

204  No Content

Successful response

422  Unprocessable Entity

Returns a JSON object with an error. For details, see General information > Validation.

JSON
{
    "message": "No error message here",
    "errors": {
        "any_key": [
            "Error details"
        ]
    }
}

400  Bad Request

Returns a JSON object with an error.

cURL
Bash
curl -k --request DELETE \
	--url 'https://your-domain/api/v1/billing/tree/folders/private' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "id": 0,
    "external_id": "string|int",
    "key": "string",
    "new_key": "string",
    "log_extra": "string|array"
}'
PHP
PHP
$data = array (
  'id' => 0,
  'external_id' => 'string|int',
  'key' => 'string',
  'new_key' => 'string',
  'log_extra' => 'string|array',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'DELETE',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/tree/folders/private', false, $context);