API Endpoints
Statuses
Create statuses

Base URL

POST
https://v1.empr.cloud/api/v1/folders/{folderId}/statuses

Request

Request headers

Headers
Название
Тип / Значение
Описание
X-Token
String
Auth token
Content-Type
application/json

URL Parameters

Query parameters
Название
Тип / Значение
Описание
folderId
UUID
The ID of the folder

Request body

Body
Название
Тип / Значение
Описание
statuses
[[Name, Color]]
Array of statuses

Request examples

1const url =
2  "https://v1.empr.cloud/api/v1/folders/{folderId}/proxies"; 
3
4const body = {
5  "statuses": [
6    [
7      "Good",
8      "#00AB55"
9    ]
10  ]
11}
12
13const options = {
14  method: "POST",
15  headers: {
16    "X-Token": "Your Token", 
17    "Content-Type": "application/json"
18  }, 
19  body: JSON.stringify(body)
20};
21
22fetch(url, options)
23  .then((response) => {
24    response.json().then((data) => {
25      console.log(data);
26    });
27  })
28  .catch((error) => {
29    console.error(error);
30  });

Response

Response data

Response
Название
Тип / Значение
Описание
data
Array<Status>
Array of created statuses

Response example

1{
2    "data": [
3        {
4            "user_id": "***privacy***",
5            "id": "***privacy***",
6            "folder_id": "***privacy***",
7            "status": "Good",
8            "status_color": "#00AB55",
9            "created_at": "2024-01-06T15:32:32.679444Z",
10            "updated_at": "2024-01-06T15:32:32.679444Z"
11        }
12    ]
13}

Types

Status
Название
Тип / Значение
Описание
id
String
ID
user_id
String
Owner ID
status
String
Status
status_color
String
Hexadecimal string representing the status color
created_at
String
Creation date
updated_at
String
Last update date