Update a case for people counting
Analytics case update
Updating an analytics case for the Counting people in an area type.
JSON
{
"title": "Counting objects in an area",
"type": "person-counting",
"cameras": [
{
"id": 10,
"analytic_case_camera_user_status": null,
"scripts": [
{
"id": 20,
"is_enabled": true
}
],
"meta": {
"figures": [
{
"name": "Figure 1",
"coords": [
{
"x": 0.153125,
"y": 0.31666666666666665
},
{
"x": 0.3421875,
"y": 0.7361111111111112
},
{
"x": 0.86875,
"y": 0.6472222222222223
},
{
"x": 0.78125,
"y": 0.125
}
]
}
],
"reaction_after_value": 3
}
},
{
"id": 7,
"analytic_case_camera_user_status": null,
"scripts": [
{
"id": 20,
"is_enabled": true
}
],
"meta": {
"figures": [
{
"name": "Figure 1",
"coords": [
{
"x": 0.153125,
"y": 0.31666666666666665
},
{
"x": 0.3421875,
"y": 0.7361111111111112
},
{
"x": 0.86875,
"y": 0.6472222222222223
},
{
"x": 0.78125,
"y": 0.125
}
]
}
],
"reaction_after_value": 3
}
}
]
}
PUT /api/v1/analytic-case/{case} |
Parameters
int
case, Unique identifier of the analytics case to update
string
title, Title of the analytics case to be updated
array
cameras, Array of camera objects to be deleted, indicating the type of deletion
object array
bool
cameras.
REQUIRED
, .force Delete type.
bool
cameras.
REQUIRED
, .force Delete type.
200 |
Returns the analytics case
JSON
|
401 |
Authorization token not sent or not valid |
402 |
The license limit for the selected analytics case has been exceeded |
422 |
Returns a JSON object with an error.
JSON
|
cURL
BASH
curl -k --request POST \
--url 'https://your-domain/api/v1/analytic-case/{case}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"case": 0,
"title": "string",
"cameras": {
"": true
},
"cameras.": "void"
}'
PHP
PHP
$data = array (
'case' => 0,
'title' => 'string',
'cameras' =>
array (
'' => true,
),
'cameras.' => 'void',
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'PUT',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/v1/analytic-case/{case}', false, $context);