Restricted Requests
The token used in this requests is of specific usage and can't be generated by our Authentication request. To get access to such token, please get in contact with us via chat, Whatsapp or e-mail.
Create Clients
- Path: https://app.monuv.com.br/api/v1/clients?token={token}
- Method: POST
Parameters:
Response:
[
{
"id": 1,
"name": "Client name",
"document_type": "2",
"document_number": "99.999.999/9999-99",
"phone": "(11) 99999-9999",
"cep": "00000-000",
"address": "Rua Teste",
"address_number": "99",
"address_nh": "Bairro",
"city": "São Paulo",
"state": "São Paulo",
"create_url": "https://my.site.com",
"create_ip": "127.0.0.1",
"updated_at": "2023-01-01 12:00:00",
"created_at": "2023-01-01 12:00:00",
"users": [ // if passed information for user creation
{
"id": 2,
"user_type_id": 6,
"name": "My Name",
"email": "my@email.com.br",
"phone": "11999999999",
"updated_at": "2023-01-01 12:00:00",
"created_at": "2023-01-01 12:00:00",
"update_user_id": 1,
"api_token": "TOKEN"
}
]
}
]
Create Client Users
- Path: https://app.monuv.com.br/api/v1/clients/{client_id}/users?token={token}
- Method: POST
Parameters:
Response:
[
{
"id": 2,
"user_type_id": 6, // 6 = Client
"name": "user name",
"email": "user@email.com.br",
"phone": "(11) 99999-9999",
"updated_at": "2023-01-01 12:00:00",
"created_at": "2023-01-01 12:00:00",
"update_user_id": 1
}
]
Block/Unblock partner's clients
Gives and revokes access to certain partner's clients
- Block Path: https://app.monuv.com.br/api/client/block/{token}/{document}
- Unblock Path: https://app.monuv.com.br/api/client/unblock/{token}/{document}
- Method: GET
Parameters:
Response:
{
"code": 0,
"msg": ""
}
Code example
curl --location 'https://app.monuv.com.br/api/client/block/{token}/{document}'
const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://app.monuv.com.br/api/client/block/{token}/{document}',
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://app.monuv.com.br/api/client/block/{token}/{document}"
response = requests.request("GET", url)
print(response.text)
Block/Unblock Users
Gives and revokes access to certain users
- Block User Path: https://app.monuv.com.br/api/user/block/{token}/{id}
- Unblock User Path: https://app.monuv.com.br/api/user/unblock/{token}/{id}
- Method: GET
Parameters:
Response:
{
"code": 0,
"msg": ""
}
Code example
curl --location 'https://app.monuv.com.br/api/user/block/{token}/{id}'
curl --location 'https://app.monuv.com.br/api/user/unblock/{token}/{id}'
const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://app.monuv.com.br/api/user/block/{token}/{id}',
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://app.monuv.com.br/api/user/block/{token}/{id}"
response = requests.request("GET", url)
print(response.text)
Information to Create/Update cameras
Retrieve informations necessary to create/update a camera
- Path: https://app.monuv.com.br/api/v1/cameras/create?token={token}
- Method: GET
Parameters:
Response:
{
"manufacturer": [
{
"id": 5,
"name": "Hikvision",
"camera_model": [
{
"id": 6,
"name": "Câmera IP",
"manufacturer_id": 5
},
{
"id": 25,
"name": "DVR",
"manufacturer_id": 5
},
...
]
},
{
"id": 22,
"name": "Generico",
"camera_model": [
{
"id": 39,
"name": "Camera IP",
"manufacturer_id": 22
},
{
"id": 40,
"name": "DVR",
"manufacturer_id": 22
}
]
},
...
],
"plans": {
"history_days": [
1,
3,
7,
...
],
"resolutions": [
{
"id": 1,
"name": "VGA"
},
...
]
},
"installation_info": {
"installation_local": {
"1": "Privado (dentro de dependências privadas)",
"2": "Público (ruas, praças, etc)"
},
"installation_area": {
"1": "Área interna",
"2": "Área externa"
},
"equipment_state": {
"1": "Câmera\/DVR novo",
"2": "Câmera\/DVR pré-existente"
}
}
}
Create Cameras
- Path: https://app.monuv.com.br/api/v1/cameras?token={token}
- Method: POST
Parameters:
demo is no longer supported on camera API v1. If sent, it will be treated as 0 (false). client_id is always required.
Response:
[
{
"id": 1,
"description": "My camera",
"stream_status": 2,
"status_description": "OFFLINE",
"rtmp_url": "rtmp://rtmp.monuv.com.br/my.stream"
}
]
Update Cameras
- Path: https://app.monuv.com.br/api/v1/cameras/{id}?token={token}
- Method: PUT
Parameters:
demo is no longer supported on camera API v1. If sent, it will be treated as 0 (false). client_id is always required.
Response:
[
{
"id": 1,
"description": "My camera",
"stream_status": 2,
"status_description": "OFFLINE",
"rtmp_url": "rtmp://rtmp.monuv.com.br/my.stream"
}
]
List Events
Return a paginated list of events
- Path: https://app.monuv.com.br/api/v1/events?token={token}
- Method: GET
Parameters:
Response:
[
{
"total": 100, // total events
"per_page": 30, // Event per page
"current_page": 1,
"last_page": 4,
"data": [
{
"id": 1,
"event_at": "01/01/2023 12:00:00",
"event_type": 4,
"event_description": "Detecção Presença/Ausência",
"event_url": "https://detection.monuv.com.br/IMAGE_PATH.jpg",
"camera_id": 1001,
"camera_description": "My Camera"
},
...
]
}
]
Code example:
curl --request GET \
--url 'https://app.monuv.com.br/api/v1/events?camera=1001&event_types=1%2C4&start_at=2023-01-01&end_at=2023-01-02&page=2&token={TOKEN}'
const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();
axios.get('https://app.monuv.com.br/api/v1/events', {
'camera': 1001,
'event_types': '1,4',
'start_at': '2023-01-01',
'end_at': '2023-01-02',
'page': 2
})
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://app.monuv.com.br/api/v1/events"
params = {
'camera': 1001,
'event_types': '1,4',
'start_at': '2023-01-01',
'end_at': '2023-01-02',
'page': 2
}
response = requests.get(url, params)
print(response.json())