Vision
Справочник APIПапки

Создание папки

Базовый URL

POST
https://v1.empr.cloud/api/v1/folders

Запрос

Заголовки запроса

Prop

Type

Тело запроса

Prop

Type

Примеры запроса

var myHeaders = new Headers();

myHeaders.append("Content-Type", "application/json");
myHeaders.append("X-Token", "YOUR_TOKEN_HERE");

var raw = JSON.stringify({
  "folder_name": "Kevin3",
  "folder_icon": "Discord",
  "folder_color": "#3366FF3D"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://v1.empr.cloud/api/v1/folders/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://v1.empr.cloud/api/v1/folders/"

payload = json.dumps({
  "folder_name": "Kevin3",
  "folder_icon": "Discord",
  "folder_color": "#3366FF3D"
})
headers = {
  'Content-Type': 'application/json',
  'X-Token': 'YOUR_TOKEN_HERE'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ответ

Данные ответа

Prop

Type

Пример ответа

{
"data": [
    {
    "id": "cf4003e0-e630-4bc3-9961-61d81c2f3aa5",
    "owner": "28a3abfc-6892-4dd0-a4f1-57b449851865",
    "folder_name": "Google Accounts",
    "folder_icon": "Google",
    "folder_color": "#3366FF3D",
    "created_at": "2023-06-22T17:35:58.373758Z",
    "updated_at": "2023-06-22T17:35:58.373758Z",
    "deleted_at": null
    },
]
}

Типы

Prop

Type

*Types that end with a question mark (?) are optional.*

На этой странице