Справочник APIПрофили
Получение списка профилей
Базовый URL
GET
https://v1.empr.cloud/api/v1/folders/{folderId}/profiles
Запрос
Заголовки запроса
Prop
Type
Параметры URL
Prop
Type
Примеры запроса
const url = "https://v1.empr.cloud/api/v1/folders/{folderId}/profiles"; const options = { method: "GET", headers: { "X-Token": "Your Token", }, };fetch(url, options) .then((response) => { response.json().then((data) => { console.log(data); }); }) .catch((error) => { console.error(error); });import requestsurl = 'https://v1.empr.cloud/api/v1/folders/{folderId}/profiles' headers = { 'X-Token': 'Your Token', 'Content-Type': 'application/json'}response = requests.get(url, headers=headers)print(response.json())<?php$url = "https://v1.empr.cloud/api/v1/folders/{folderId}/profiles";$token = "Your Token"; $headers = array( 'X-Token: '.$token, 'Content-Type: application/json');$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);$data = curl_exec($ch);if (curl_errno($ch)) { print "Error: " . curl_error($ch);} else { var_dump($data); curl_close($ch);}?>// Requires tokio with features = ["macros", "rt-multi-thread"]// Requires reqwest with features = ["json"]// Requires serde_json#[tokio::main]async fn main() { let url = "https://v1.empr.cloud/api/v1/folders/{folderId}/profiles"; let token = "Token"; let client = reqwest::Client::new(); let response = client .get(url) .header("X-Token", token) .send() .await .expect("Failed to send request") .json::<serde_json::Value>() .await .expect("Failed to parse response"); dbg!(response);}package mainimport ( "io" "net/http")func main() { url := "https://v1.empr.cloud/api/v1/folders/{folderId}/profiles" token := "Your Token" client := http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { panic(err) } req.Header.Add("X-Token", token) resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) println(string(body))}var url = "https://v1.empr.cloud/api/v1/folders/{folderId}/profiles";var token = "Your Token"; var client = new HttpClient();client.DefaultRequestHeaders.Add("X-Token", token);var response = await client.GetAsync(url);var content = await response.Content.ReadAsStringAsync();Console.WriteLine(content);Ответ
Данные ответа
Prop
Type
Пример ответа
{
"data": {
"total": 1,
"items": [
{
"owner": "5a55b193-84aa-47ce-b377-c651412adf44",
"id": "9bd9b8cf-edaf-42b3-a9cc-fc68ff0b7f77",
"folder_id": "6e15ecb4-d46d-416c-ac5c-4777bd89a2d8",
"proxy_id": null,
"profile_name": "Matthew Nelson",
"profile_notes": "",
"profile_status": null,
"profile_tags": [],
"browser": "chrome",
"platform": "macos",
"running": false,
"pinned": false,
"worktime": 0,
"last_run_at": null,
"created_at": "2023-12-21T12:42:46.483047Z",
"updated_at": "2023-12-21T12:42:46.483047Z",
"recovered": 0,
"is_received": false,
"app_version": "0.0.0",
"proxy": null
}
]
}
}