API Endpoints
Tags
Create tags

Base URL

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

Request

Request headers

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

URL Parameters

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

Request body

Body
Название
Тип / Значение
Описание
tags
Array<String>
Array of tags to be added to the folder

Request examples

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

Response

Response data

Response
Название
Тип / Значение
Описание
data
Array<Tag>
Array of tags added to the folder

Response examples

1{
2    "data": [
3        {
4            "user_id": "***privacy***",
5            "id": "***privacy***",
6            "folder_id": "***privacy***",
7            "tag_name": "1",
8            "created_at": "2024-01-06T18:35:36.917028Z",
9            "updated_at": "2024-01-06T18:35:36.917028Z"
10        },
11        {
12            "user_id": "***privacy***",
13            "id": "***privacy***",
14            "folder_id": "***privacy***",
15            "tag_name": "2",
16            "created_at": "2024-01-06T18:35:36.917028Z",
17            "updated_at": "2024-01-06T18:35:36.917028Z"
18        }
19    ]
20}

Types

Tag
Название
Тип / Значение
Описание
id
UUID
Unique identifier
user_id
UUID
User identifier
folder_id
UUID
Folder identifier
tag_name
String
Tag name
created_at
Timestamp
Creation date
updated_at
Timestamp
Update date