Справочник APIСтатусы
Получить список прокси
Базовый URL
GET
https://v1.empr.cloud/api/v1/folders/{folderId}/statuses
Запрос
Заголовки запроса
Prop
Type
Параметры запроса
Prop
Type
Пример запроса
const url = "https://v1.empr.cloud/api/v1/folders/{folderId}/statuses"; 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}/statuses' 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}/statuses";$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}/statuses"; 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}/statuses" 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}/statuses";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": [
{
"user_id": "***privacy***",
"id": "***privacy***",
"folder_id": "***privacy***",
"status": "CHECK",
"status_color": "#FFC107",
"created_at": "2023-06-22T17:36:12.605923Z",
"updated_at": "2023-06-22T17:36:12.605923Z"
},
{
"user_id": "***privacy***",
"id": "***privacy***",
"folder_id": "***privacy***",
"status": "ERROR",
"status_color": "#FF4842",
"created_at": "2023-06-22T17:36:36.444060Z",
"updated_at": "2023-06-22T17:36:36.444060Z"
},
{
"user_id": "***privacy***",
"id": "***privacy***",
"folder_id": "***privacy***",
"status": "GOOD",
"status_color": "#00AB55",
"created_at": "2023-06-22T17:36:12.605923Z",
"updated_at": "2023-06-22T17:36:12.605923Z"
}
]
}Типы
Prop
Type