Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_TOKEN_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by follow API token.
Endpoints
Lấy Access Token
Phải đăng nhập để sử dụng panel cũng vì vậy để sử dụng API cũng cần phải đăng nhập API này sử dụng thông tin đăng nhập để tạo token và code, 2 giá trị này là bắt buộc nếu muốn sử dụng API
Example request:
curl --request POST \
"https://flashpanel.io/api/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"email\": \"[email protected]\",
\"password\": \"laborum\",
\"code\": \"et\",
\"device_name\": \"voluptatum\"
}"
const url = new URL(
"https://flashpanel.io/api/token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"email": "[email protected]",
"password": "laborum",
"code": "et",
"device_name": "voluptatum"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/token';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'email' => '[email protected]',
'password' => 'laborum',
'code' => 'et',
'device_name' => 'voluptatum',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/token'
payload = {
"email": "[email protected]",
"password": "laborum",
"code": "et",
"device_name": "voluptatum"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy thông tin cấu hình sao lưu
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/backups/100938" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backups/100938"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backups/100938';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backups/100938'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gia hạn chứng chỉ SSL
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/renew" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"id\": 13,
\"token\": \"itaque\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/renew"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"id": 13,
"token": "itaque"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/renew';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'id' => 13,
'token' => 'itaque',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/renew'
payload = {
"id": 13,
"token": "itaque"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách trang web của bạn
requires authentication
Lấy toàn bộ danh sách trang web của tất cả máy chủ của bạn
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách ứng dụng của máy chủ
requires authentication
Lấy danh sách các ứng dụng chính của máy chủ hoặc lấy danh sách extensions của một ứng dụng cụ thể
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/applications" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"extension\": \"php-extension\",
\"binary_name\": \"php8.3\",
\"os_version\": 18
}"
const url = new URL(
"https://flashpanel.io/api/servers/applications"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"extension": "php-extension",
"binary_name": "php8.3",
"os_version": 18
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/applications';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'extension' => 'php-extension',
'binary_name' => 'php8.3',
'os_version' => 18,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/applications'
payload = {
"extension": "php-extension",
"binary_name": "php8.3",
"os_version": 18
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách chuyển giao máy chủ
requires authentication
Lấy danh sách các máy chủ được chuyển giao cho bạn hoặc các máy chủ bạn đã chuyển giao cho người khác
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers-transfer" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers-transfer"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers-transfer';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers-transfer'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Chuyển giao máy chủ
requires authentication
Chuyển giao máy chủ cho một người khác
Example request:
curl --request POST \
"https://flashpanel.io/api/servers-transfer" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"to_id\": \"v\",
\"server_id\": 51
}"
const url = new URL(
"https://flashpanel.io/api/servers-transfer"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"to_id": "v",
"server_id": 51
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers-transfer';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'to_id' => 'v',
'server_id' => 51,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers-transfer'
payload = {
"to_id": "v",
"server_id": 51
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật trạng thái máy chủ được chuyển giao
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers-transfer/8" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"status\": \"cancelled\"
}"
const url = new URL(
"https://flashpanel.io/api/servers-transfer/8"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"status": "cancelled"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers-transfer/8';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'status' => 'cancelled',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers-transfer/8'
payload = {
"status": "cancelled"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách máy chủ
requires authentication
Lấy toàn bộ danh sách máy chủ của bạn
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm mới máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"provider\": \"porro\",
\"name\": \"qui\",
\"custom_script\": 6,
\"customProvider\": \"vel\",
\"ip\": \"doloremque\",
\"ssh_port\": \"dolores\",
\"auth_password\": false,
\"ssh_password\": \"cupiditate\",
\"ssh_private_key\": \"veniam\",
\"ssh_passphrase\": \"velit\",
\"notCustomProvider\": \"vel\",
\"plan\": \"iste\",
\"region\": \"sint\",
\"credential\": \"voluptas\"
}"
const url = new URL(
"https://flashpanel.io/api/servers"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"provider": "porro",
"name": "qui",
"custom_script": 6,
"customProvider": "vel",
"ip": "doloremque",
"ssh_port": "dolores",
"auth_password": false,
"ssh_password": "cupiditate",
"ssh_private_key": "veniam",
"ssh_passphrase": "velit",
"notCustomProvider": "vel",
"plan": "iste",
"region": "sint",
"credential": "voluptas"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'provider' => 'porro',
'name' => 'qui',
'custom_script' => 6,
'customProvider' => 'vel',
'ip' => 'doloremque',
'ssh_port' => 'dolores',
'auth_password' => false,
'ssh_password' => 'cupiditate',
'ssh_private_key' => 'veniam',
'ssh_passphrase' => 'velit',
'notCustomProvider' => 'vel',
'plan' => 'iste',
'region' => 'sint',
'credential' => 'voluptas',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers'
payload = {
"provider": "porro",
"name": "qui",
"custom_script": 6,
"customProvider": "vel",
"ip": "doloremque",
"ssh_port": "dolores",
"auth_password": false,
"ssh_password": "cupiditate",
"ssh_private_key": "veniam",
"ssh_passphrase": "velit",
"notCustomProvider": "vel",
"plan": "iste",
"region": "sint",
"credential": "voluptas"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy thông tin về máy chủ trên hệ thống
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa máy chủ
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy thông tin về máy chủ VPS
requires authentication
Lấy các thông tin về máy chủ VPS như CPU, RAM, DISK, CORE, Swap,...
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/info" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/info"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/info';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/info'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đánh dấu máy chủ yêu thích
requires authentication
Các máy chủ được đánh dấu yêu thích sẽ ưu tiên hiển thị ở đầu danh sách lấy ra
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/favorite" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/favorite"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/favorite';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/favorite'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đối tên hiển thị của máy chủ
requires authentication
Hệ thống cũng sẽ đổi hostname vps và label ở nhà cung cấp vps nếu có
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/name" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"et\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/name"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "et"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/name';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/name'
payload = {
"name": "et"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đổi địa chỉ IP cho máy chủ
requires authentication
Khi bạn thay đổi IP của máy chủ VPS bạn cần cập nhật địa chỉ IP cho máy chủ đó trên hệ thống
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/ip" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"ip\": \"215.99.199.255\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ip"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"ip": "215.99.199.255"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ip';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'ip' => '215.99.199.255',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ip'
payload = {
"ip": "215.99.199.255"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Run hotfix for the server if available
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/hotfix" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/hotfix"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/hotfix';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/hotfix'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sync backup configuration
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/sync-backup-configuration" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/sync-backup-configuration"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/sync-backup-configuration';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/sync-backup-configuration'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm khóa SSH máy chủ cho nhà cung cấp quản lý mã nguồn
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/keys" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"providers\": [
5.640163
]
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/keys"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"providers": [
5.640163
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/keys';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'providers' => [
5.640163,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/keys'
payload = {
"providers": [
5.640163
]
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài agent cho máy chủ
requires authentication
Agent dùng để quản lý file cho máy chủ
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/agent/install" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/agent/install"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/agent/install';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/agent/install'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tạo token chứng thực kết nối với agent
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/agent/token" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/agent/token"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/agent/token';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/agent/token'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xem nhật ký cấu hình daemon
requires authentication
Xem nhật ký của tập tin cấu hình daemon
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/daemons/5/log" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/5/log"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/5/log';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/5/log'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xem trạng thái daemon
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/daemons/8/status" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/8/status"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/8/status';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/8/status'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa nhật ký tập tin cấu hình daemon
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/daemons/18/clear-log" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/18/clear-log"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/18/clear-log';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/18/clear-log'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khởi động lại cấu hình daemon
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/daemons/8/restart" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/8/restart"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/8/restart';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/8/restart'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khởi động cấu hình daemon
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/daemons/20/start" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/20/start"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/20/start';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/20/start'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dừng cấu hình daemon
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/daemons/7/stop" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/7/stop"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/7/stop';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/7/stop'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cấu hình daemon
requires authentication
Daemon là chương trình chạy nền giống như các service trên Windows, có thể tắt mở tự động mà không ảnh hưởng gì đến giao diện người dùng. Bạn có thể dùng để chạy hàng đợi, websocket, laravel-echo-server, ... Hệ thống sử dụng Supervisor để chạy câu lệnh của bạn và đảm bảo nó vẫn tiếp tục hoạt động
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/daemons" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"description\": \"Debitis eum placeat ut aut.\",
\"command\": \"nisi\",
\"directory\": \"ut\",
\"user\": \"voluptatem\",
\"processes\": 1.6,
\"start_secs\": 47.75
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"description": "Debitis eum placeat ut aut.",
"command": "nisi",
"directory": "ut",
"user": "voluptatem",
"processes": 1.6,
"start_secs": 47.75
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'description' => 'Debitis eum placeat ut aut.',
'command' => 'nisi',
'directory' => 'ut',
'user' => 'voluptatem',
'processes' => 1.6,
'start_secs' => 47.75,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons'
payload = {
"description": "Debitis eum placeat ut aut.",
"command": "nisi",
"directory": "ut",
"user": "voluptatem",
"processes": 1.6,
"start_secs": 47.75
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa cấu hình daemon
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/daemons/18" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/daemons/18"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/daemons/18';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/daemons/18'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đồng bộ Firewall Rule từ máy chủ
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/rules/sync" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/rules/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/rules/sync';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/rules/sync'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách Firewall Rules
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/rules" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/rules"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/rules';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/rules'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm Firewall Rule
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/rules" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"l\",
\"port\": \"aut\",
\"type\": \"et\",
\"ip_address\": \"182.141.88.189\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/rules"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "l",
"port": "aut",
"type": "et",
"ip_address": "182.141.88.189"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/rules';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'l',
'port' => 'aut',
'type' => 'et',
'ip_address' => '182.141.88.189',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/rules'
payload = {
"name": "l",
"port": "aut",
"type": "et",
"ip_address": "182.141.88.189"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa Firewall Rule
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/rules/504" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/rules/504"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/rules/504';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/rules/504'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách Schedules (cronjobs)
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/schedules" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/schedules"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/schedules';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/schedules'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm Cronjob
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/schedules" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"command\": \"id\",
\"user\": \"sit\",
\"cron\": \"veniam\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/schedules"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"command": "id",
"user": "sit",
"cron": "veniam"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/schedules';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'command' => 'id',
'user' => 'sit',
'cron' => 'veniam',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/schedules'
payload = {
"command": "id",
"user": "sit",
"cron": "veniam"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sửa Cronjob
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/schedules/100732" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"command\": \"accusantium\",
\"user\": \"perspiciatis\",
\"cron\": \"necessitatibus\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/schedules/100732"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"command": "accusantium",
"user": "perspiciatis",
"cron": "necessitatibus"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/schedules/100732';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'command' => 'accusantium',
'user' => 'perspiciatis',
'cron' => 'necessitatibus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/schedules/100732'
payload = {
"command": "accusantium",
"user": "perspiciatis",
"cron": "necessitatibus"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa Cronjob
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/schedules/100732" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/schedules/100732"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/schedules/100732';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/schedules/100732'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bật php opcache.
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/settings/php/opcache" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/settings/php/opcache"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/settings/php/opcache';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/settings/php/opcache'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tắt php opcache.
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/settings/php/opcache" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/settings/php/opcache"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/settings/php/opcache';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/settings/php/opcache'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật upload_max_filesize cho PHP
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/settings/php/max-upload-size" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"max_file_upload_size\": 58
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/settings/php/max-upload-size"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"max_file_upload_size": 58
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/settings/php/max-upload-size';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'max_file_upload_size' => 58,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/settings/php/max-upload-size'
payload = {
"max_file_upload_size": 58
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật max_execution_time cho PHP
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/settings/php/max-execution-time" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"max_execution_time\": 32
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/settings/php/max-execution-time"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"max_execution_time": 32
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/settings/php/max-execution-time';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'max_execution_time' => 32,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/settings/php/max-execution-time'
payload = {
"max_execution_time": 32
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thay đổi phiên bản PHP mặc định của máy chủ
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/php/cli" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"version\": \"voluptatem\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/php/cli"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"version": "voluptatem"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/php/cli';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'version' => 'voluptatem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/php/cli'
payload = {
"version": "voluptatem"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone Backup Configuration
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/backups/100938/clone" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"servers\": [
17
],
\"all_sites\": false,
\"all_databases\": false
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backups/100938/clone"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"servers": [
17
],
"all_sites": false,
"all_databases": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backups/100938/clone';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'servers' => [
17,
],
'all_sites' => false,
'all_databases' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backups/100938/clone'
payload = {
"servers": [
17
],
"all_sites": false,
"all_databases": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Danh sáchsao lưu
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/backups" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backups"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backups';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backups'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm mới cấu hình sao lưu
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/backups" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"code\": \"temporibus\",
\"drive\": \"drive\",
\"memo\": \"eum\",
\"expression\": \"0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)\",
\"cycle\": 1,
\"all_sites\": false,
\"excludes\": [
\"qui\"
],
\"sites\": [
{
\"id\": 13,
\"excludes\": [
\"nostrum\"
]
}
],
\"all_databases\": false,
\"databases\": [
3,
7
]
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backups"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"code": "temporibus",
"drive": "drive",
"memo": "eum",
"expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
"cycle": 1,
"all_sites": false,
"excludes": [
"qui"
],
"sites": [
{
"id": 13,
"excludes": [
"nostrum"
]
}
],
"all_databases": false,
"databases": [
3,
7
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backups';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'code' => 'temporibus',
'drive' => 'drive',
'memo' => 'eum',
'expression' => '0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)',
'cycle' => 1,
'all_sites' => false,
'excludes' => [
'qui',
],
'sites' => [
[
'id' => 13,
'excludes' => [
'nostrum',
],
],
],
'all_databases' => false,
'databases' => [
3,
7,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backups'
payload = {
"code": "temporibus",
"drive": "drive",
"memo": "eum",
"expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
"cycle": 1,
"all_sites": false,
"excludes": [
"qui"
],
"sites": [
{
"id": 13,
"excludes": [
"nostrum"
]
}
],
"all_databases": false,
"databases": [
3,
7
]
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sửa cấu hình sao lưu
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/backups/100938" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"is_active\": false,
\"memo\": \"illum\",
\"expression\": \"0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)\",
\"cycle\": 10,
\"all_sites\": true,
\"excludes\": [
\"porro\"
],
\"sites\": [
{
\"id\": 14,
\"excludes\": [
\"illo\"
]
}
],
\"all_databases\": true,
\"databases\": [
3,
7
]
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backups/100938"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"is_active": false,
"memo": "illum",
"expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
"cycle": 10,
"all_sites": true,
"excludes": [
"porro"
],
"sites": [
{
"id": 14,
"excludes": [
"illo"
]
}
],
"all_databases": true,
"databases": [
3,
7
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backups/100938';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'is_active' => false,
'memo' => 'illum',
'expression' => '0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)',
'cycle' => 10,
'all_sites' => true,
'excludes' => [
'porro',
],
'sites' => [
[
'id' => 14,
'excludes' => [
'illo',
],
],
],
'all_databases' => true,
'databases' => [
3,
7,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backups/100938'
payload = {
"is_active": false,
"memo": "illum",
"expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
"cycle": 10,
"all_sites": true,
"excludes": [
"porro"
],
"sites": [
{
"id": 14,
"excludes": [
"illo"
]
}
],
"all_databases": true,
"databases": [
3,
7
]
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa cấu hình sao lưu
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/backups/100938" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backups/100938"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backups/100938';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backups/100938'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách lịch sử sao lưu
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/backup-histories" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/backup-histories"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/backup-histories';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/backup-histories'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khởi chạy ứng dụng
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/applications/1/start" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/applications/1/start"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/applications/1/start';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/applications/1/start'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dừng ứng dụng
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/applications/1/stop" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/applications/1/stop"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/applications/1/stop';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/applications/1/stop'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khởi chạy lại ứng dụng
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/applications/1/restart" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/applications/1/restart"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/applications/1/restart';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/applications/1/restart'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách ứng dụng của máy chủ
requires authentication
Lấy danh sách các ứng dụng chính của máy chủ hoặc lấy danh sách extensions của một ứng dụng cụ thể
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/applications" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"extension\": \"php-extension\",
\"binary_name\": \"php8.3\",
\"os_version\": 17
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/applications"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"extension": "php-extension",
"binary_name": "php8.3",
"os_version": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/applications';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'extension' => 'php-extension',
'binary_name' => 'php8.3',
'os_version' => 17,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/applications'
payload = {
"extension": "php-extension",
"binary_name": "php8.3",
"os_version": 17
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt ứng dụng cho máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/applications" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"app_id\": \"ID ứng dụng PHP 8.3 là app_id=4432\",
\"version\": \"8.3\",
\"passowrd\": \"esse\",
\"port\": \"8108\",
\"manager_password\": \"similique\",
\"admin_password\": \"reiciendis\",
\"admin_username\": \"suscipit\",
\"ui_port\": \"et\",
\"api_port\": \"nisi\",
\"user\": \"dicta\",
\"password\": \"z\'#kSI]39x\\/cy7\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/applications"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"app_id": "ID ứng dụng PHP 8.3 là app_id=4432",
"version": "8.3",
"passowrd": "esse",
"port": "8108",
"manager_password": "similique",
"admin_password": "reiciendis",
"admin_username": "suscipit",
"ui_port": "et",
"api_port": "nisi",
"user": "dicta",
"password": "z'#kSI]39x\/cy7"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/applications';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'app_id' => 'ID ứng dụng PHP 8.3 là app_id=4432',
'version' => '8.3',
'passowrd' => 'esse',
'port' => '8108',
'manager_password' => 'similique',
'admin_password' => 'reiciendis',
'admin_username' => 'suscipit',
'ui_port' => 'et',
'api_port' => 'nisi',
'user' => 'dicta',
'password' => 'z\'#kSI]39x/cy7',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/applications'
payload = {
"app_id": "ID ứng dụng PHP 8.3 là app_id=4432",
"version": "8.3",
"passowrd": "esse",
"port": "8108",
"manager_password": "similique",
"admin_password": "reiciendis",
"admin_username": "suscipit",
"ui_port": "et",
"api_port": "nisi",
"user": "dicta",
"password": "z'#kSI]39x\/cy7"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa ứng dụng khỏi máy chủ
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/applications/1" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/applications/1"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/applications/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/applications/1'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Kiểm tra dung lượng sử dụng
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/users/usage" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/users/usage"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/users/usage';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/users/usage'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đồng bộ người dùng hệ thống
requires authentication
Đồng bộ người dùng hệ thống từ máy chủ VPS về hệ thống
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/users/sync" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/users/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/users/sync';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/users/sync'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách người dùng hệ thống
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/users" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/users"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/users';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/users'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm mới người dùng hệ thống
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/users" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"uvyjwidtsnhnczgajz\",
\"password\": \"W^Ui_2\",
\"can_ssh\": true,
\"can_ftp\": true
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/users"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "uvyjwidtsnhnczgajz",
"password": "W^Ui_2",
"can_ssh": true,
"can_ftp": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/users';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'uvyjwidtsnhnczgajz',
'password' => 'W^Ui_2',
'can_ssh' => true,
'can_ftp' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/users'
payload = {
"name": "uvyjwidtsnhnczgajz",
"password": "W^Ui_2",
"can_ssh": true,
"can_ftp": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật thông tin người dùng hệ thống
requires authentication
Cập nhật cho phép truy cập SSH/SFTP
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/users/100771" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"can_ssh\": false,
\"can_ftp\": false
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/users/100771"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"can_ssh": false,
"can_ftp": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/users/100771';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'can_ssh' => false,
'can_ftp' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/users/100771'
payload = {
"can_ssh": false,
"can_ftp": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa người dùng hệ thống
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/users/100771" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/users/100771"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/users/100771';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/users/100771'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dọn dẹp hệ thống
requires authentication
Hệ thống sẽ dọn dẹp những thứ không cần thiết trong hệ thống như nhật ký hệ thống, cache do các ứng dụng sinh ra
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/clean" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/clean"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/clean';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/clean'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách múi giờ
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/timezone" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/timezone"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/timezone';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/timezone'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật múi giờ cho máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/timezone" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"timezone\": \"modi\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/timezone"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"timezone": "modi"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/timezone';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'timezone' => 'modi',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/timezone'
payload = {
"timezone": "modi"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cấu hình SSH cho máy chủ
requires authentication
Cấu hình đổi cổng SSH kết nối đến máy chủ và cấu hình cho phép đăng nhập SSH đến máy chủ bằng mật khẩu
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/sshd_config" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"port\": 9,
\"password\": false
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/sshd_config"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"port": 9,
"password": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/sshd_config';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'port' => 9,
'password' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/sshd_config'
payload = {
"port": 9,
"password": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách khóa SSH đã thêm vào máy chủ
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/ssh-keys" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ssh-keys"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ssh-keys';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ssh-keys'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm Khóa SSH vào máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/ssh-keys" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"laborum\",
\"user\": \"et\",
\"public_key\": \"nesciunt\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ssh-keys"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "laborum",
"user": "et",
"public_key": "nesciunt"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ssh-keys';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'laborum',
'user' => 'et',
'public_key' => 'nesciunt',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ssh-keys'
payload = {
"name": "laborum",
"user": "et",
"public_key": "nesciunt"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa Khóa SSH khỏi máy chủ
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/ssh-keys/et" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ssh-keys/et"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ssh-keys/et';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ssh-keys/et'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xuất cơ sở dữ liệu
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/databases/365/backup" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases/365/backup"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases/365/backup';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases/365/backup'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Nhập dữ liệu cho cơ sở dữ liệu
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/databases/365/import" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"path\": \"exrl.sql\",
\"remove\": true
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases/365/import"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"path": "exrl.sql",
"remove": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases/365/import';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'path' => 'exrl.sql',
'remove' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases/365/import'
payload = {
"path": "exrl.sql",
"remove": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Downloads a backup file for the given server and database.
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/databases/365/download" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases/365/download"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases/365/download';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases/365/download'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách cơ sở dữ liệu
requires authentication
Lấy danh sách cơ sở dữ liệu của ứng dụng quản trị cơ sở dữ liệu của bạn
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/databases" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm mới cơ sở dữ liệu
requires authentication
Thêm mới cơ sở dữ liệu vào hệ quản trị cơ sở dữ liệu của bạn
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/databases" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"type\": \"animi\",
\"name\": \"emq-sej_b\",
\"users\": [
15
]
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"type": "animi",
"name": "emq-sej_b",
"users": [
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'type' => 'animi',
'name' => 'emq-sej_b',
'users' => [
15,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases'
payload = {
"type": "animi",
"name": "emq-sej_b",
"users": [
15
]
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật cơ sở dữ liệu
requires authentication
Cập nhật cơ sở dữ liệu hệ quản trị cơ sở dữ liệu của bạn
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/databases/365" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"type\": \"sed\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases/365"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"type": "sed"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases/365';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'type' => 'sed',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases/365'
payload = {
"type": "sed"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa cơ sở dữ liệu
requires authentication
Xóa cơ sở dữ liệu khỏi hệ quản trị cơ sở dữ liệu của bạn
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/databases/365" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/databases/365"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/databases/365';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/databases/365'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đồng bộ người dùng cơ sở dữ liệu
requires authentication
Đồng bộ người dùng cơ sở dữ liệu của máy chủ VPS lên hệ thống
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/database-users/sync" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"type\": \"postgresql\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/database-users/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"type": "postgresql"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/database-users/sync';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'type' => 'postgresql',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/database-users/sync'
payload = {
"type": "postgresql"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách người dùng cơ sở dữ liệu
requires authentication
Lấy danh sách người dùng cơ sở dữ liệu của hệ quản trị cơ sở dữ liệu
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/database-users" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/database-users"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/database-users';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/database-users'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm người dùng cơ sở dữ liệu cho máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/database-users" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"type\": \"postgresql\",
\"name\": \"ckxxkrosn\",
\"password\": \"^kdiU@1(>$TY\",
\"databases\": [
16
],
\"access_anywhere\": false
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/database-users"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"type": "postgresql",
"name": "ckxxkrosn",
"password": "^kdiU@1(>$TY",
"databases": [
16
],
"access_anywhere": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/database-users';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'type' => 'postgresql',
'name' => 'ckxxkrosn',
'password' => '^kdiU@1(>$TY',
'databases' => [
16,
],
'access_anywhere' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/database-users'
payload = {
"type": "postgresql",
"name": "ckxxkrosn",
"password": "^kdiU@1(>$TY",
"databases": [
16
],
"access_anywhere": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật người dùng cơ sở dữ liệu
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/database-users/255" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"type\": \"postgresql\",
\"password\": \"\\/(MVeFoFBt\",
\"databases\": [
8
],
\"access_anywhere\": true
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/database-users/255"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"type": "postgresql",
"password": "\/(MVeFoFBt",
"databases": [
8
],
"access_anywhere": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/database-users/255';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'type' => 'postgresql',
'password' => '/(MVeFoFBt',
'databases' => [
8,
],
'access_anywhere' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/database-users/255'
payload = {
"type": "postgresql",
"password": "\/(MVeFoFBt",
"databases": [
8
],
"access_anywhere": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa người dùng cơ sở dữ liệu
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/database-users/255" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/database-users/255"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/database-users/255';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/database-users/255'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khóa SSH console
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/ssh" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ssh"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ssh';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ssh'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy trang web mặc định
requires authentication
Trang web mặc định là trang web mà khi bạn tạo mới trang web thì hệ thống sẽ tạo một file html tĩnh khi bạn truy cập vào trang web vừa được tạo ra thì bạn sẽ thấy giao diện trang web mặc định
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/default-page" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/default-page"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/default-page';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/default-page'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật trang web mặc định
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/default-page" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"default_page\": \"et\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/default-page"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"default_page": "et"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/default-page';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'default_page' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/default-page'
payload = {
"default_page": "et"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Chia sẻ máy chủ giữa các nhóm
requires authentication
Cấp quyền truy cập root cho máy chủ
requires authentication
Vì một lí do nào đó hệ thống không thể truy cập vào máy chủ để quản lý, bạn cần cấp lại quyền root
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/grant-root" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"private_key\": \"quisquam\",
\"password\": \"{JfU1p\'$F\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/grant-root"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"private_key": "quisquam",
"password": "{JfU1p'$F"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/grant-root';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'private_key' => 'quisquam',
'password' => '{JfU1p\'$F',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/grant-root'
payload = {
"private_key": "quisquam",
"password": "{JfU1p'$F"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Normal Restart Server
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/restart/normal" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/restart/normal"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/restart/normal';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/restart/normal'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hard Restart Server
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/restart/hard" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/restart/hard"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/restart/hard';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/restart/hard'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài lại máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/reinstall" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/reinstall"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/reinstall';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/reinstall'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật mật khẩu cho người dùng máy chủ VPS
requires authentication
Khi bạn SSH vào máy chủ thành công, bạn thực hiện các lệnh với quyền sudo hoặc cần nhập mật khẩu. API này sẽ cập nhật mật khẩu người dùng bạn chọn
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/root-password" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"user\": \"dxrmdqoetklflpknodfllpt\",
\"root_password\": \"pmgvmqxoe\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/root-password"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"user": "dxrmdqoetklflpknodfllpt",
"root_password": "pmgvmqxoe"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/root-password';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'user' => 'dxrmdqoetklflpknodfllpt',
'root_password' => 'pmgvmqxoe',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/root-password'
payload = {
"user": "dxrmdqoetklflpknodfllpt",
"root_password": "pmgvmqxoe"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bật IonCubeLoader
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/ioncube/enable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ioncube/enable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ioncube/enable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ioncube/enable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tắt IonCubeLoader
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/ioncube/disable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/ioncube/disable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/ioncube/disable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/ioncube/disable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tính dung lượng đã sử dụng của thư mục trang web
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/sites/usage" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/sites/usage"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/sites/usage';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/sites/usage'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khởi chạy dịch vụ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services/2/start" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2/start"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2/start';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2/start'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dừng dịch vụ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services/2/stop" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2/stop"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2/stop';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2/stop'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Khởi chạy lại dịnh vụ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services/2/restart" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2/restart"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2/restart';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2/restart'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bật khởi chạy dịch vụ cùng với hệ thống khởi động
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services/2/enable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2/enable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2/enable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2/enable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tắt khởi chạy dịch vụ cùng với hệ thống
requires authentication
Bạn sẽ phải khởi chạy thủ công mỗi khi hệ thống khởi động
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services/2/disable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2/disable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2/disable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2/disable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đồng bộ dịch vụ vào máy chủ
requires authentication
Hệ thống sẽ tìm tên dịch vụ bạn nhập trong máy chủ VPS và đồng bộ dịch vụ đó vào hệ thống nếu tìm thấy
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services/sync" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"duobqvjkfi\"
}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "duobqvjkfi"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/sync';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'duobqvjkfi',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/sync'
payload = {
"name": "duobqvjkfi"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách các dịch vụ của máy chủ
requires authentication
Lấy danh sách các dịch bạn đã thêm vào máy chủ
Example request:
curl --request GET \
--get "https://flashpanel.io/api/servers/280/services" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm mới dịch vụ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/servers/280/services" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật dịch vụ
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/servers/280/services/2" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa dịch vụ
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/servers/280/services/2" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/servers/280/services/2"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/services/2';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/servers/280/services/2'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tạo mới trang web
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"quae\",
\"project_type\": \"sit\",
\"directory\": \"voluptates\",
\"username\": \"id\",
\"password\": \"N\'aG`!^Het\",
\"database_name\": \"dolore\",
\"proxy_port\": 15,
\"site_id\": 14,
\"server_id\": 5,
\"php_version\": \"php8.3\",
\"widecards\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "quae",
"project_type": "sit",
"directory": "voluptates",
"username": "id",
"password": "N'aG`!^Het",
"database_name": "dolore",
"proxy_port": 15,
"site_id": 14,
"server_id": 5,
"php_version": "php8.3",
"widecards": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'quae',
'project_type' => 'sit',
'directory' => 'voluptates',
'username' => 'id',
'password' => 'N\'aG`!^Het',
'database_name' => 'dolore',
'proxy_port' => 15,
'site_id' => 14,
'server_id' => 5,
'php_version' => 'php8.3',
'widecards' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites'
payload = {
"name": "quae",
"project_type": "sit",
"directory": "voluptates",
"username": "id",
"password": "N'aG`!^Het",
"database_name": "dolore",
"proxy_port": 15,
"site_id": 14,
"server_id": 5,
"php_version": "php8.3",
"widecards": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy thông tin trang web
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa trang web
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/sites/101417" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"database\": false,
\"database_user\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"database": false,
"database_user": false
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'database' => false,
'database_user' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417'
payload = {
"database": false,
"database_user": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Agent Token
requires authentication
Tạo JWT token
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/agent/token" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/agent/token"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/agent/token';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/agent/token'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Kiểm tra hợp lệ địa chỉ IP máy chủ
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/ip-remote-check" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/ip-remote-check"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/ip-remote-check';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/ip-remote-check'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật tên miền trang web
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/name" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"name\": \"nisi\",
\"wildcards\": true
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/name"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"name": "nisi",
"wildcards": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/name';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'name' => 'nisi',
'wildcards' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/name'
payload = {
"name": "nisi",
"wildcards": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Trang web yêu thích
requires authentication
Thêm trang web vào danh sách yêu thích, các các web được yêu thích sẽ hiển thị lên trên đầu danh sách
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/favorite" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/favorite"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/favorite';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/favorite'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sao chép trang web ra nhiều trang
requires authentication
Sao chép trang web ra nhiều trang web, với tùy chọn sao chép cơ sở dữ liệu
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/clone" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"server_id\": \"qui\",
\"sites\": [
\"quis\"
],
\"database\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/clone"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"server_id": "qui",
"sites": [
"quis"
],
"database": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/clone';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'server_id' => 'qui',
'sites' => [
'quis',
],
'database' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/clone'
payload = {
"server_id": "qui",
"sites": [
"quis"
],
"database": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa mã nguồn cho trang web
requires authentication
Nếu mã nguồn trang web là phpMyAdmin thì sẽ xóa cơ sở dữ liệu được tạo cùng khi cài đặt
Example request:
curl --request DELETE \
"https://flashpanel.io/api/sites/101417/uninstall" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"reset\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/uninstall"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"reset": false
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/uninstall';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'reset' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/uninstall'
payload = {
"reset": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Phân quyền cho thư mục gốc trang web
requires authentication
Tùy theo {type} là file hay folder thì sẽ tìm tất cả các file hoặc folder bên trong thư mục gốc của trang web và gán quyền {permission} cho các file hoặc folder đó
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/chmod" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"permission\": \"gqw\",
\"type\": \"file\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/chmod"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"permission": "gqw",
"type": "file"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/chmod';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'permission' => 'gqw',
'type' => 'file',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/chmod'
payload = {
"permission": "gqw",
"type": "file"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thay đổi chủ sở hữu
requires authentication
Thay đổi chủ sở hữu của thư mục gốc của trang web
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/chown" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/chown"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/chown';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/chown'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enable https www
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/www" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/www"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/www';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/www'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enable or Disable site
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/toggle" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"enabled\": true
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/toggle"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"enabled": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/toggle';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'enabled' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/toggle'
payload = {
"enabled": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật thư mục gốc trang web
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/directory" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"directory\": \"beatae\",
\"sync\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/directory"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"directory": "beatae",
"sync": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/directory';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'directory' => 'beatae',
'sync' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/directory'
payload = {
"directory": "beatae",
"sync": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật git repository cho trang web
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/repository" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"provider\": \"aut\",
\"repository\": \"vtsr.git\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/repository"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"provider": "aut",
"repository": "vtsr.git"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/repository';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'provider' => 'aut',
'repository' => 'vtsr.git',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/repository'
payload = {
"provider": "aut",
"repository": "vtsr.git"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật git branch cho trang web
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/branch" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"branch\": \"repudiandae\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/branch"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"branch": "repudiandae"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/branch';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'branch' => 'repudiandae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/branch'
payload = {
"branch": "repudiandae"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật phiên bản PHP
requires authentication
Cập nhật phiên bản PHP cho trang web
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/php_version" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"php_version\": \"phpirxi\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/php_version"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"php_version": "phpirxi"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/php_version';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'php_version' => 'phpirxi',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/php_version'
payload = {
"php_version": "phpirxi"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật loại trang web
requires authentication
Khi tạo trang web bạn phải chọn loại trang web muốn tạo, endpoint này sẽ cho phép bạn cập nhật loại trang web
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/type" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"project_type\": \"aut\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/type"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"project_type": "aut"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/type';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'project_type' => 'aut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/type'
payload = {
"project_type": "aut"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tự tải lên mã nguồn
requires authentication
API này đánh dấu trang web là người dùng tự tải lên mã nguồn cho trang web một cách thủ công
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/custom" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/custom"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/custom';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/custom'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt mã nguồn phpMyAdmin
requires authentication
Cài đặt mã nguồn phpMyAdmin cho trang web
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/phpmyadmin" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/phpmyadmin"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/phpmyadmin';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/phpmyadmin'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Nâng cấp phpMyAdmin cho trang web
requires authentication
Nâng cấp phiên bản phpMyAdmin lên phiên bản được khuyên chọn
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/phpmyadmin" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/phpmyadmin"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/phpmyadmin';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/phpmyadmin'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt mã nguồn wordpress
requires authentication
Cài đặt mã nguồn wordpress cho trang web
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/wordpress" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"user\": \"dolor\",
\"database\": \"sit\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/wordpress"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"user": "dolor",
"database": "sit"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/wordpress';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'user' => 'dolor',
'database' => 'sit',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/wordpress'
payload = {
"user": "dolor",
"database": "sit"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt mã nguồn github
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/github" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"orgName\": \"Sample Organize\",
\"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
\"branch\": \"main\",
\"composer_install\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/github"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"orgName": "Sample Organize",
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/github';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'orgName' => 'Sample Organize',
'repository' => '[email protected]:sampleuser/samplerepo.git',
'branch' => 'main',
'composer_install' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/github'
payload = {
"orgName": "Sample Organize",
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt mã nguồn gitlab cho trang web
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/gitlab" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
\"branch\": \"main\",
\"composer_install\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/gitlab"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/gitlab';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'repository' => '[email protected]:sampleuser/samplerepo.git',
'branch' => 'main',
'composer_install' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/gitlab'
payload = {
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt mã nguồn bitbucket cho trang web
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/bitbucket" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
\"branch\": \"main\",
\"composer_install\": true
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/bitbucket"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/bitbucket';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'repository' => '[email protected]:sampleuser/samplerepo.git',
'branch' => 'main',
'composer_install' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/bitbucket'
payload = {
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt mã nguồn Git
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/git" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
\"branch\": \"main\",
\"composer_install\": true
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/git"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/git';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'repository' => '[email protected]:sampleuser/samplerepo.git',
'branch' => 'main',
'composer_install' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/git'
payload = {
"repository": "[email protected]:sampleuser\/samplerepo.git",
"branch": "main",
"composer_install": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Đồng bộ lại cấu hình Web Server cho trang web
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/sync" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/sync';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/sync'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách lịch sử triển khai của trang web
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417/deploys" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách các biến triển khai mã nguồn mặc định
requires authentication
Các biến này được hệ thống tạo sẵn để sử dụng trong tập lệnh triển khai mã nguồn
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417/deploys/variables" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/variables"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/variables';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/variables'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật tập lệnh triển khai mã nguồn
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/deploys/script" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"script\": \"vero\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/script"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"script": "vero"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/script';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'script' => 'vero',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/script'
payload = {
"script": "vero"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Triển khai mã nguồn mới nhất
requires authentication
Hệ thống sẽ chạy kịch bản triển khai ứng dụng mà bạn đã cấu hình cho trang web
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/deploys/now" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/now"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/now';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/now'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Làm mới mã thông báo triển khai
requires authentication
Khi bạn thực hiện truy cập GET hoặc POST vào đường dẫn trả về từ API này thì hệ thống sẽ tiến hành cập nhật code mới và chạy kịch bản triển khai ứng dụng
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/deploys/refresh-token" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/refresh-token"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/refresh-token';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/refresh-token'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bật/tắt tự động triển khai
requires authentication
Tính năng Tự động triển khai
cho phép bạn dễ dàng triển khai các dự án của mình khi bạn đẩy mã lên nhà cung cấp Git của mình.
Khi bạn đẩy đến nhánh triển khai đã được cấu hình của mình, hệ thống sẽ lấy mã mới nhất của bạn từ Git và chạy tập lệnh triển khai đã được cấu hình của ứng dụng của bạn.
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/deploys/auto" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/auto"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/auto';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/auto'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tự động thêm khóa triển khai
requires authentication
Tự động thêm khóa triển khai cho trang web của bạn vào máy chủ khóa sẽ được đặt tại /home/{siteLinuxUser}/.ssh/site_{site_id}
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/deploys/key" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/key"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/key';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/key'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa khóa triển khai cho trang web
requires authentication
Xóa khóa triển khai cho trang web, cái mà thêm khi cài đặt mã nguồn cho trang web
Example request:
curl --request DELETE \
"https://flashpanel.io/api/sites/101417/deploys/key" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/deploys/key"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/deploys/key';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/deploys/key'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách các lệnh mà bạn đã thực thi của trang web
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417/commands" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/commands"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/commands';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/commands'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thực thi câu lệnh cho trang web
requires authentication
Các câu lệnh sẽ được thực thi từ đường dẫn gốc của trang web
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/commands" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"script\": \"omnis\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/commands"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"script": "omnis"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/commands';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'script' => 'omnis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/commands'
payload = {
"script": "omnis"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt chứng chỉ miễn phí cho trang web
requires authentication
Chứng chỉ miễn phí bao gồm Let's Encrypt và ZeroSSL
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/free" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"client\": \"voluptas\",
\"auto_active\": false,
\"account\": \"accusamus\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/free"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"client": "voluptas",
"auto_active": false,
"account": "accusamus"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/free';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'client' => 'voluptas',
'auto_active' => false,
'account' => 'accusamus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/free'
payload = {
"client": "voluptas",
"auto_active": false,
"account": "accusamus"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tạo CSR để đi mua SSL
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/csr" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"city\": \"perferendis\",
\"country\": \"r\",
\"department\": \"voluptate\",
\"domain\": \"ut\",
\"organization\": \"maxime\",
\"state\": \"beatae\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/csr"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"city": "perferendis",
"country": "r",
"department": "voluptate",
"domain": "ut",
"organization": "maxime",
"state": "beatae"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/csr';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'city' => 'perferendis',
'country' => 'r',
'department' => 'voluptate',
'domain' => 'ut',
'organization' => 'maxime',
'state' => 'beatae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/csr'
payload = {
"city": "perferendis",
"country": "r",
"department": "voluptate",
"domain": "ut",
"organization": "maxime",
"state": "beatae"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt chứng chỉ SSL đã có
requires authentication
Nếu bạn đã cài có chứng chỉ SSL thì endpoint này sẽ cho phép bạn cài chứng chỉ đó cho trang web của bạn
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/import" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"certificate_key\": \"earum\",
\"certificate_cert\": \"voluptatem\",
\"auto_active\": true
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/import"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"certificate_key": "earum",
"certificate_cert": "voluptatem",
"auto_active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/import';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'certificate_key' => 'earum',
'certificate_cert' => 'voluptatem',
'auto_active' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/import'
payload = {
"certificate_key": "earum",
"certificate_cert": "voluptatem",
"auto_active": true
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sao chép chứng chỉ
requires authentication
Sao chép chứng chỉ từ một trong các chứng chỉ SSL bạn đã cài đặt cho các trang web của các máy chủ của bạn trên hệ thống
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/impedit/clone" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/impedit/clone"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/impedit/clone';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/impedit/clone'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cài đặt private key cho CSR đã tạo
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/101108/install" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"certificate_cert\": \"iure\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/101108/install"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"certificate_cert": "iure"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/101108/install';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'certificate_cert' => 'iure',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/101108/install'
payload = {
"certificate_cert": "iure"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Kích hoạt chứng chỉ SSL
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/101108/active" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/101108/active"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/101108/active';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/101108/active'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ngừng kích hoạt chứng chỉ SSL
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/certificates/101108/inactive" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/101108/inactive"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/101108/inactive';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/101108/inactive'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy danh sách các chứng chỉ SSL đã cài đặt của trang web
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417/certificates" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa chứng chỉ SSL
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/sites/101417/certificates/101108" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/certificates/101108"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/certificates/101108';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/certificates/101108'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gỡ cài đặt quản lý file cho trang web
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/sites/101417/tiny-file-manager" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/tiny-file-manager"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/tiny-file-manager';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/tiny-file-manager'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Danh sách cấu hình web server
requires authentication
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417/configs" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"webserver\": \"dolores\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/configs"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"webserver": "dolores"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/configs';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'webserver' => 'dolores',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/configs'
payload = {
"webserver": "dolores"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm cấu hình web server
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/configs" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/configs"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/configs';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/configs'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật cấu hình web server
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/configs/1865" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/configs/1865"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/configs/1865';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/configs/1865'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Xóa cấu hình web server
requires authentication
Example request:
curl --request DELETE \
"https://flashpanel.io/api/sites/101417/configs/1865" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/configs/1865"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/configs/1865';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/configs/1865'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bật cân bằng tải
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/balancing/enable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/balancing/enable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/balancing/enable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/balancing/enable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tắt cân bằng tải
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/balancing/disable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/balancing/disable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/balancing/disable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/balancing/disable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Thêm máy chủ cân bằng tải
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/balancing" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"method\": \"ip_hash\",
\"servers\": [
{
\"ip\": \"37.74.227.161\",
\"port\": 12,
\"weight\": 49,
\"backup\": true,
\"down\": false
}
]
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/balancing"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"method": "ip_hash",
"servers": [
{
"ip": "37.74.227.161",
"port": 12,
"weight": 49,
"backup": true,
"down": false
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/balancing';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'method' => 'ip_hash',
'servers' => [
[
'ip' => '37.74.227.161',
'port' => 12,
'weight' => 49,
'backup' => true,
'down' => false,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/balancing'
payload = {
"method": "ip_hash",
"servers": [
{
"ip": "37.74.227.161",
"port": 12,
"weight": 49,
"backup": true,
"down": false
}
]
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tắt gửi thông báo cho trang web
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/notifications/telegram/disable" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/notifications/telegram/disable"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/notifications/telegram/disable';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/notifications/telegram/disable'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tối ưu hóa wordpress
requires authentication
Tối ưu hóa wordpress theo các điều kiện tối ưu mong muốn truyền vào
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/wordpress/optimization" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"optimizations\": [
\"fuga\"
]
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/wordpress/optimization"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"optimizations": [
"fuga"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/wordpress/optimization';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'optimizations' => [
'fuga',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/wordpress/optimization'
payload = {
"optimizations": [
"fuga"
]
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lấy nhật ký tối ưu hóa
requires authentication
Lấy nhật ký tối ưu hóa đã chạy
Example request:
curl --request GET \
--get "https://flashpanel.io/api/sites/101417/wordpress/optimization/log" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/wordpress/optimization/log"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/wordpress/optimization/log';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/wordpress/optimization/log'
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bật NGINX WordPress Rocket
requires authentication
Example request:
curl --request POST \
"https://flashpanel.io/api/sites/101417/wordpress/wprocket" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"enable\": false
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/wordpress/wprocket"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"enable": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/wordpress/wprocket';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'enable' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/wordpress/wprocket'
payload = {
"enable": false
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cập nhật người dùng WordPress
requires authentication
Example request:
curl --request PUT \
"https://flashpanel.io/api/sites/101417/wordpress/user" \
--header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Code: {YOUR_CODE_KEY}" \
--data "{
\"wp_user\": \"ab\",
\"wp_password\": \"ad\"
}"
const url = new URL(
"https://flashpanel.io/api/sites/101417/wordpress/user"
);
const headers = {
"Authorization": "Bearer {YOUR_TOKEN_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-Code": "{YOUR_CODE_KEY}",
};
let body = {
"wp_user": "ab",
"wp_password": "ad"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101417/wordpress/user';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Code' => '{YOUR_CODE_KEY}',
],
'json' => [
'wp_user' => 'ab',
'wp_password' => 'ad',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://flashpanel.io/api/sites/101417/wordpress/user'
payload = {
"wp_user": "ab",
"wp_password": "ad"
}
headers = {
'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Code': '{YOUR_CODE_KEY}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.