MENU navbar-image

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()

Request   

POST api/token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

email   string   

This must be a valid email address. Example: [email protected]

password   string   

Example: laborum

code   string  optional  

Mã 6 số được tạo bởi ứng dụng xác thực 2FA nếu tài khoản bạn bật 2FA Example: et

device_name   string  optional  

Hệ thống sẽ tạo token theo device_name nếu có, mặc định: "" Example: voluptatum

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()

Request   

GET api/servers/{server_id}/backups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the backup. Example: 100938

token   string   

Example: eos

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()

Request   

POST api/sites/{site_id}/certificates/renew

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

token   string   

Token Example: omnis

Body Parameters

id   integer   

ID của chứng chỉ Example: 13

token   string   

Example: itaque

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()

Request   

GET api/sites

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

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()

Request   

GET api/servers/applications

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

extension   string  optional  

Loại tiện ích mở rộng muốn lấy, giá trị là một trong "php-extension" | "ols-extension". Example: php-extension

binary_name   string  optional  

Trường bắt buộc nhập nếu extension có giá trị. Loại ứng dụng cần lấy tiện tích mở rộng, giá trị là một trong "openlitespeed" | "php{version}". Example: php8.3

os_version   integer  optional  

Optional. Trường này hiện đang không sử dụng Example: 18

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()

Request   

GET api/servers-transfer

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

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()

Request   

POST api/servers-transfer

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

to_id   string   

This must be a valid email address. The string must not be greater than 191 characters. Example: v

server_id   number   

Must be at least 1. Example: 51

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()

Request   

PUT api/servers-transfer/{id}

PATCH api/servers-transfer/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the servers transfer. Example: 8

Body Parameters

status   string|in:pending,approved,rejected,cancelled   

Trạng thái muốn cập nhật. Example: cancelled

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()

Request   

GET api/servers

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

search   string  optional  

string|int Lọc theo Tên hoặc ID của máy chủ Example: et

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()

Request   

POST api/servers

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

provider   string   

Nhà cung cấp máy chủ: custom, 123HOST, tinohost, vultr, digitalocean, linode, upcloud Example: porro

name   string   

Tên máy chủ Example: qui

custom_script   integer  optional  

ID của kịch bản tùy chỉnh Example: 6

customProvider   string  optional  

Đây không phải là thuộc tính. Các giá trị sau áp dụng cho loại máy chủ Custom Example: vel

ip   string|ip|unique  optional  

string Địa chỉ IP hợp V4 hoặc V6 hợp lệ Example: doloremque

ssh_port   int|min:1|max:65535   

Cổng truy cập SSH vào máy chủ Example: dolores

auth_password   boolean   

Sử dụng mật khẩu root hay SSH Private Key để hệ thống đăng nhập vào máy chủ Example: false

ssh_password   string   


Bắt buộc nhập nếu auth_password = true.
Mật khẩu root Example: cupiditate

ssh_private_key   file|max:512   


Bắt buộc nhập nếu auth_password = false.
Tập tin SSH Private Key dùng để đăng nhập vào máy chủ Example: veniam

ssh_passphrase   string  optional  

Mật khẩu tập tin SSH Private Key nếu có Example: velit

notCustomProvider   string  optional  

Đây không phải là thuộc tính. Các giá trị sau áp dụng cho loại máy chủ không phải là Custom Example: vel

plan   string|exist:plan   

ID của Gói máy chủ Example: iste

region   string|exist:region   

ID của Khu vực. Example: sint

credential   int|min:1|exist:id  optional  

Bắt buộc nhập nếu loại máy chủ không là tinohost hoặc 123HOST. ID của thông tin chứng thực loại máy chủ Example: voluptas

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()

Request   

GET api/servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the server. Example: 280

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()

Request   

DELETE api/servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/info

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Đá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()

Request   

POST api/servers/{server_id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Đố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()

Request   

PUT api/servers/{server_id}/name

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

name   string  optional  

Tên hiển thị Example: et

Đổ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()

Request   

PUT api/servers/{server_id}/ip

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

ip   string   

This must be a valid IP address. Example: 215.99.199.255

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()

Request   

POST api/servers/{server_id}/hotfix

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/sync-backup-configuration

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/keys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

providers   number[]   

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()

Request   

POST api/servers/{server_id}/agent/install

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/agent/token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

GET api/servers/{server_id}/daemons/{daemon_id}/log

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

daemon_id   integer   

The ID of the daemon. Example: 5

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()

Request   

GET api/servers/{server_id}/daemons/{daemon_id}/status

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

daemon_id   integer   

The ID of the daemon. Example: 8

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()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/clear-log

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

daemon_id   integer   

The ID of the daemon. Example: 18

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()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/restart

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

daemon_id   integer   

The ID of the daemon. Example: 8

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()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/start

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

daemon_id   integer   

The ID of the daemon. Example: 20

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()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/stop

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

daemon_id   integer   

The ID of the daemon. Example: 7

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()

Request   

POST api/servers/{server_id}/daemons

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

description   string  optional  

Example: Debitis eum placeat ut aut.

command   string   

Example: nisi

directory   string  optional  

Example: ut

user   string   

Example: voluptatem

processes   number   

Example: 1.6

start_secs   number   

Example: 47.75

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()

Request   

DELETE api/servers/{server_id}/daemons/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the daemon. Example: 18

Đồ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()

Request   

GET api/servers/{server_id}/rules/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

GET api/servers/{server_id}/rules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/rules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

name   string  optional  

The string must not be greater than 255 characters. Example: l

port   string   

Example: aut

type   string   

Example: et

ip_address   string  optional  

This must be a valid IP address. Example: 182.141.88.189

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()

Request   

DELETE api/servers/{server_id}/rules/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the rule. Example: 504

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()

Request   

GET api/servers/{server_id}/schedules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/schedules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

command   string   

Example: id

user   string   

Example: sit

cron   string   

Example: veniam

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()

Request   

PUT api/servers/{server_id}/schedules/{id}

PATCH api/servers/{server_id}/schedules/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the schedule. Example: 100732

Body Parameters

command   string   

Example: accusantium

user   string   

Example: perspiciatis

cron   string   

Example: necessitatibus

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()

Request   

DELETE api/servers/{server_id}/schedules/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the schedule. Example: 100732

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()

Request   

POST api/servers/{server_id}/settings/php/opcache

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

DELETE api/servers/{server_id}/settings/php/opcache

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

PUT api/servers/{server_id}/settings/php/max-upload-size

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

max_file_upload_size   number   

Must be at least 1. Example: 58

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()

Request   

PUT api/servers/{server_id}/settings/php/max-execution-time

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

max_execution_time   number   

Must be at least 1. Example: 32

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()

Request   

PUT api/servers/{server_id}/php/cli

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

version   string   

Example: voluptatem

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()

Request   

POST api/servers/{server_id}/backups/{backup_id}/clone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

backup_id   integer   

The ID of the backup. Example: 100938

Body Parameters

servers   integer[]   
all_sites   boolean   

Example: false

all_databases   boolean   

Example: false

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()

Request   

GET api/servers/{server_id}/backups

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/backups

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

code   string   

AccessToken code lấy từ việc cấp quyền truy cập vào drive đang chọn Sao lưu dữ liệu Example: temporibus

drive   string   

Drive muốn sao lưu, giá trị là một trong drive, onedrive, dropbox. Example: drive

memo   string   

Tên cấu hình gợi nhớ Example: eum

expression   string   

Biểu thức lịch trình sao lưu. Example: 0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)

cycle   integer   

Chu kỳ sao lưu, xóa các tệp cũ giữ lại các tệp trong khoảng thời gian {cycle} ngày. Example: 1

all_sites   boolean   

Có hay không sao lưu toàn bộ trang web Example: false

excludes   string[]  optional  

Danh sách các thư mục sẽ bỏ qua khi sao lưu áp dụng cho tất cả trang web nếu all_sites = true

sites   object[]  optional  

Danh sách các trang web sẽ sao lưu

id   integer  optional  

ID của trang web Example: 13

excludes   string[]  optional  

Danh sách các thư mục của trang web sẽ bỏ qua khi sao lưu. Nếu all_sites = true thì danh sách này sẽ được lấy từ tham số chung excludes Nếu all_sites = false thì mỗi trang web sẽ được cấu hình độc lập các thư mục sẽ bỏ qua khi sao lưu

all_databases   boolean   

Có hay không sao chép toàn bộ cơ sở dữ liệu Example: false

databases   integer[]  optional  

Danh sách id các cơ sở dữ liệu sẽ được sao lưu. Nếu all_databases = true thì sẽ lấy toàn bộ CSDL của máy chủ. Ngược lại all_databases = false thì sẽ chọn các CSDL muốn sao lưu.

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()

Request   

PUT api/servers/{server_id}/backups/{id}

PATCH api/servers/{server_id}/backups/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the backup. Example: 100938

Body Parameters

is_active   boolean   

Có kích hoạt cấu hình sao lưu hay không Example: false

memo   string   

Tên cấu hình gợi nhớ Example: illum

expression   string   

Biểu thức lịch trình sao lưu. Example: 0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)

cycle   integer   

Chu kỳ sao lưu, xóa các tệp cũ giữ lại các tệp trong khoảng thời gian {cycle} ngày. Example: 10

all_sites   boolean   

Có hay không sao lưu toàn bộ trang web Example: true

excludes   string[]  optional  

Danh sách các thư mục sẽ bỏ qua khi sao lưu áp dụng cho tất cả trang web nếu all_sites = true

sites   object[]  optional  

Danh sách các trang web sẽ sao lưu

id   integer  optional  

ID của trang web Example: 14

excludes   string[]  optional  

Danh sách các thư mục của trang web sẽ bỏ qua khi sao lưu. Nếu all_sites = true thì danh sách này sẽ được lấy từ tham số chung excludes Nếu all_sites = false thì mỗi trang web sẽ được cấu hình độc lập các thư mục sẽ bỏ qua khi sao lưu

all_databases   boolean   

Có hay không sao chép toàn bộ cơ sở dữ liệu Example: true

databases   integer[]  optional  

Danh sách id các cơ sở dữ liệu sẽ được sao lưu. Nếu all_databases = true thì sẽ lấy toàn bộ CSDL của máy chủ. Ngược lại all_databases = false thì sẽ chọn các CSDL muốn sao lưu.

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()

Request   

DELETE api/servers/{server_id}/backups/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the backup. Example: 100938

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()

Request   

GET api/servers/{server_id}/backup-histories

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/applications/{application_id}/start

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

application_id   integer   

The ID of the application. Example: 1

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()

Request   

POST api/servers/{server_id}/applications/{application_id}/stop

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

application_id   integer   

The ID of the application. Example: 1

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()

Request   

POST api/servers/{server_id}/applications/{application_id}/restart

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

application_id   integer   

The ID of the application. Example: 1

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()

Request   

GET api/servers/{server_id}/applications

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

extension   string  optional  

Loại tiện ích mở rộng muốn lấy, giá trị là một trong "php-extension" | "ols-extension". Example: php-extension

binary_name   string  optional  

Trường bắt buộc nhập nếu extension có giá trị. Loại ứng dụng cần lấy tiện tích mở rộng, giá trị là một trong "openlitespeed" | "php{version}". Example: php8.3

os_version   integer  optional  

Optional. Trường này hiện đang không sử dụng Example: 17

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()

Request   

POST api/servers/{server_id}/applications

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

app_id   int|min:1   

ID của ứng dụng. Example: ID ứng dụng PHP 8.3 là app_id=4432

version   string   

Phiên bản của ứng dụng. Example: 8.3

passowrd   string|min:6   

(Cấu hình dịch vụ MeiliSearch | TypenseServer).
-MeiliSearch: Master Key dùng để bảo mật ứng dụng meilisearch
-TypesenseServer: Cấu hình api-key khi khởi động cho phép mọi hoạt động. Example: esse

port   int|min:1|max:65535   

(Cấu hình dịch vụ MeiliSearch | TypenseServer).
-MeiliSearch: Cổng mà dịch vụ meilisearch lắng nghe. Mặc định: 7700. Example: 7700
-TypesenseServer: Cổng mà dịch vụ API Typesense lắng nghe. Mặc định: 8108. Example: 8108

manager_password   string|min:6   

(Cấu hình dịch vụ ApacheTomcat) Mật khẩu cho user manager, role manager-gui Example: similique

admin_password   string|min:6   

(Cấu hình dịch vụ ApacheTomcat|OpenLiteSpeed).
-ApacheTomcat: Mật khẩu cho user admin, role admin-gui
-OpenLiteSpeed: Mật khẩu cho user admin Example: reiciendis

admin_username   string|min:1   

(Cấu hình dịch vụ OpenLiteSpeed) Mật khẩu người dùng admin. Example: suscipit

ui_port   required|int|min:1|max:65535|not_in:80,443,2022,22   

(Cấu hình dịch vụ MinIO) Địa chỉ IP và cổng mà bảng điều khiển MinIO sẽ lắng nghe Example: et

api_port   required|int|min:1|max:65535|not_in:80,443,2022,22   

(Cấu hình dịch vụ MinIO) Cổng mà dịch vụ MinIO sẽ lắng nghe Example: nisi

user   required|string|min:1   

(Cấu hình dịch vụ MinIO) Tên người dùng cho tài khoản quản trị viên của MinIO Example: dicta

password   required|string|min:6   

(Cấu hình dịch vụ MinIO | PostgreSQL)
-MinIO: Mật khẩu người dùng cho tài khoản quản trị viên của MinIO
-PostgreSQL: Mật khẩu người dùng PostgreSQL Example: z'#kSI]39x/cy7

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()

Request   

DELETE api/servers/{server_id}/applications/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the application. Example: 1

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()

Request   

GET api/servers/{server_id}/users/usage

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Đồ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()

Request   

GET api/servers/{server_id}/users/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

GET api/servers/{server_id}/users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 32 characters. Example: uvyjwidtsnhnczgajz

password   string   

Example: W^Ui_2

can_ssh   boolean   

Example: true

can_ftp   boolean   

Example: true

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()

Request   

PUT api/servers/{server_id}/users/{id}

PATCH api/servers/{server_id}/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the user. Example: 100771

Body Parameters

can_ssh   boolean   

Example: false

can_ftp   boolean   

Example: false

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()

Request   

DELETE api/servers/{server_id}/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the user. Example: 100771

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()

Request   

POST api/servers/{server_id}/clean

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

GET api/servers/{server_id}/timezone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/timezone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

timezone   string   

Example: modi

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()

Request   

PUT api/servers/{server_id}/sshd_config

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

port   number   

Must not be one of 80, 443, or 2022 Must be at least 1. Must not be greater than 65535. Example: 9

password   boolean   

Example: false

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()

Request   

GET api/servers/{server_id}/ssh-keys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/ssh-keys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

name   string   

Example: laborum

user   string   

Example: et

public_key   string   

Example: nesciunt

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()

Request   

DELETE api/servers/{server_id}/ssh-keys/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   string   

The ID of the ssh key. Example: et

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()

Request   

POST api/servers/{server_id}/databases/{database_id}/backup

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

database_id   integer   

The ID of the database. Example: 365

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()

Request   

POST api/servers/{server_id}/databases/{database_id}/import

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

database_id   integer   

The ID of the database. Example: 365

Body Parameters

path   string   

Must end with one of .sql or .sql.gz. Example: exrl.sql

remove   boolean  optional  

Example: true

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()

Request   

POST api/servers/{server_id}/databases/{database_id}/download

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

database_id   integer   

The ID of the database. Example: 365

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()

Request   

GET api/servers/{server_id}/databases

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/databases

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

type   string   

Example: animi

name   string   

Must contain only letters, numbers, dashes and underscores. Example: emq-sej_b

users   integer[]  optional  

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()

Request   

PUT api/servers/{server_id}/databases/{id}

PATCH api/servers/{server_id}/databases/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the database. Example: 365

Body Parameters

type   string   

Example: sed

users   object  optional  

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()

Request   

DELETE api/servers/{server_id}/databases/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the database. Example: 365

Đồ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()

Request   

GET api/servers/{server_id}/database-users/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

type   string   

Example: postgresql

Must be one of:
  • mysql
  • postgresql

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()

Request   

GET api/servers/{server_id}/database-users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/database-users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

type   string   

Example: postgresql

Must be one of:
  • mysql
  • postgresql
name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 32 characters. Example: ckxxkrosn

password   string   

Example: ^kdiU@1(>$TY

databases   integer[]  optional  
access_anywhere   boolean  optional  

Example: false

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()

Request   

PUT api/servers/{server_id}/database-users/{id}

PATCH api/servers/{server_id}/database-users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the database user. Example: 255

Body Parameters

type   string   

Example: postgresql

Must be one of:
  • mysql
  • postgresql
password   string  optional  

Example: /(MVeFoFBt

databases   integer[]  optional  
access_anywhere   boolean  optional  

Example: true

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()

Request   

DELETE api/servers/{server_id}/database-users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the database user. Example: 255

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()

Request   

POST api/servers/{server_id}/ssh

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

GET api/servers/{server_id}/default-page

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/default-page

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

default_page   string   

Example: et

Chia sẻ máy chủ giữa các nhóm

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/280/share" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"teams\": [
        3
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/280/share"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "teams": [
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/280/share';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'teams' => [
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/280/share'
payload = {
    "teams": [
        3
    ]
}
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()

Request   

POST api/servers/{server_id}/share

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

teams   integer[]  optional  

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()

Request   

POST api/servers/{server_id}/grant-root

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

private_key   string   

Example: quisquam

password   string   

Example: {JfU1p'$F

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()

Request   

POST api/servers/{server_id}/restart/normal

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/restart/hard

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/reinstall

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

PUT api/servers/{server_id}/root-password

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

user   string   

The string must not be greater than 256 characters. Example: dxrmdqoetklflpknodfllpt

root_password   string   

The string must not be greater than 256 characters. Example: pmgvmqxoe

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()

Request   

POST api/servers/{server_id}/ioncube/enable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/ioncube/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

GET api/servers/{server_id}/sites/usage

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/services/{service_id}/start

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

service_id   integer   

The ID of the service. Example: 2

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()

Request   

POST api/servers/{server_id}/services/{service_id}/stop

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

service_id   integer   

The ID of the service. Example: 2

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()

Request   

POST api/servers/{server_id}/services/{service_id}/restart

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

service_id   integer   

The ID of the service. Example: 2

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()

Request   

POST api/servers/{server_id}/services/{service_id}/enable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

service_id   integer   

The ID of the service. Example: 2

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()

Request   

POST api/servers/{server_id}/services/{service_id}/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

service_id   integer   

The ID of the service. Example: 2

Đồ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()

Request   

POST api/servers/{server_id}/services/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

Body Parameters

name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 32 characters. Example: duobqvjkfi

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()

Request   

GET api/servers/{server_id}/services

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

POST api/servers/{server_id}/services

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

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()

Request   

PUT api/servers/{server_id}/services/{id}

PATCH api/servers/{server_id}/services/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the service. Example: 2

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()

Request   

DELETE api/servers/{server_id}/services/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 280

id   integer   

The ID of the service. Example: 2

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()

Request   

POST api/sites

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

name   string   

Tên miền trang web Example: quae

project_type   string   

Example: sit

directory   string  optional  

Example: voluptates

username   string  optional  

Tên người dùng cách ly trang web Example: id

password   string  optional  

Mật khẩu người dùng cách ly trang web Example: N'aG!^Het`

database_name   string  optional  

Tên cơ sở dữ liệu, được tạo và gán cho máy chủ Example: dolore

proxy_port   integer  optional  

Example: 15

site_id   integer  optional  

ID của trang web nếu điền tức là tạo site alias cho trang web chính Example: 14

server_id   integer   

Example: 5

php_version   string  optional  

Phiên bản php cài cùng trang web. Example: php8.3

widecards   boolean  optional  

Bật wildcard tên miền con cho phép bạn có thể đặt điểm đến cho tất cả tên miền con không tồn tại về website hiện tại. Example: false

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()

Request   

GET api/sites/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the site. Example: 101417

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()

Request   

DELETE api/sites/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the site. Example: 101417

Body Parameters

database   boolean  optional  

Giá trị true/false xác định có xóa cơ sở dữ liệu được gán cho trang web hay không Example: false

database_user   boolean  optional  

Giá trị true/false xác định có xóa người dùng cơ sở dữ liệu được gán cho trang web hay không Example: false

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()

Request   

POST api/sites/{site_id}/agent/token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/ip-remote-check

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

PUT api/sites/{site_id}/name

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

name   string   

Example: nisi

wildcards   boolean  optional  

Bật widecards tên miền con Example: true

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()

Request   

POST api/sites/{site_id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/clone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

server_id   string   

Example: qui

sites   string[]  optional  

Các dịa chỉ trang web mới được clone từ trang web hiện tại ra phân tách bởi dấu phẩy

database   boolean  optional  

Sao chép cơ sở dữ liệu hay không Example: false

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()

Request   

DELETE api/sites/{site_id}/uninstall

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

reset   boolean  optional  

Thiết lập mã nguồn trang web về trang web mặc định Example: false

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()

Request   

POST api/sites/{site_id}/chmod

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

permission   string   

The string must not be greater than 3 characters. Example: gqw

type   string   

Example: file

Must be one of:
  • file
  • folder

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()

Request   

POST api/sites/{site_id}/chown

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/www

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/toggle

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

enabled   boolean   

Example: true

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()

Request   

PUT api/sites/{site_id}/directory

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

directory   string  optional  

Đường dẫn thư mục mới Example: beatae

sync   boolean  optional  

abandon Không dùng nữa Example: false

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()

Request   

PUT api/sites/{site_id}/repository

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

provider   string   

Example: aut

repository   string   

Must end with one of .git. Example: vtsr.git

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()

Request   

PUT api/sites/{site_id}/branch

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

branch   string   

Example: repudiandae

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()

Request   

PUT api/sites/{site_id}/php_version

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

php_version   string   

Must start with one of php. Example: phpirxi

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()

Request   

PUT api/sites/{site_id}/type

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

project_type   string   

Example: aut

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()

Request   

POST api/sites/{site_id}/custom

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/phpmyadmin

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

PUT api/sites/{site_id}/phpmyadmin

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/wordpress

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

user   string  optional  

Tên người dùng cơ cở dữ liệu sẵn có trên máy chủ, nếu không điền thì hệ thống sẽ tự động tạo Example: dolor

database   string  optional  

Tên cơ sở dữ liệu sẵn có trên hệ thống, nếu không điền thì hệ thống sẽ tự động tạo Example: sit

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()

Request   

POST api/sites/{site_id}/github

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

orgName   string  optional  

Tên của tổ chức. Example: Sample Organize

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh github. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: false

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()

Request   

POST api/sites/{site_id}/gitlab

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh gitlab. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: false

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()

Request   

POST api/sites/{site_id}/bitbucket

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh bitbucket. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: true

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()

Request   

POST api/sites/{site_id}/git

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh github. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: true

Đồ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()

Request   

POST api/sites/{site_id}/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

GET api/sites/{site_id}/deploys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

GET api/sites/{site_id}/deploys/variables

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

PUT api/sites/{site_id}/deploys/script

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

script   string  optional  

Example: vero

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()

Request   

POST api/sites/{site_id}/deploys/now

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

PUT api/sites/{site_id}/deploys/refresh-token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

PUT api/sites/{site_id}/deploys/auto

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/deploys/key

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

DELETE api/sites/{site_id}/deploys/key

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

GET api/sites/{site_id}/commands

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/commands

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

script   string   

Example: omnis

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()

Request   

POST api/sites/{site_id}/certificates/free

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

client   string   

Example: voluptas

auto_active   boolean  optional  

Example: false

account   string  optional  

Example: accusamus

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()

Request   

POST api/sites/{site_id}/certificates/csr

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

city   string   

Example: perferendis

country   string   

The string must not be greater than 2 characters. Example: r

department   string   

Example: voluptate

domain   string   

Example: ut

organization   string   

Example: maxime

state   string   

Example: beatae

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()

Request   

POST api/sites/{site_id}/certificates/import

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

certificate_key   string   

Example: earum

certificate_cert   string   

Example: voluptatem

auto_active   boolean   

Example: true

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()

Request   

POST api/sites/{site_id}/certificates/{certificate}/clone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

certificate   string   

The certificate. Example: impedit

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()

Request   

POST api/sites/{site_id}/certificates/{certificate_id}/install

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

certificate_id   integer   

The ID of the certificate. Example: 101108

Body Parameters

certificate_cert   string   

Example: iure

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()

Request   

POST api/sites/{site_id}/certificates/{certificate_id}/active

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

certificate_id   integer   

The ID of the certificate. Example: 101108

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()

Request   

POST api/sites/{site_id}/certificates/{certificate_id}/inactive

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

certificate_id   integer   

The ID of the certificate. Example: 101108

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()

Request   

GET api/sites/{site_id}/certificates

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

DELETE api/sites/{site_id}/certificates/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

id   integer   

The ID of the certificate. Example: 101108

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()

Request   

DELETE api/sites/{site_id}/tiny-file-manager

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

GET api/sites/{site_id}/configs

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

webserver   string   

Example: dolores

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()

Request   

POST api/sites/{site_id}/configs

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

PUT api/sites/{site_id}/configs/{id}

PATCH api/sites/{site_id}/configs/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

id   integer   

The ID of the config. Example: 1865

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()

Request   

DELETE api/sites/{site_id}/configs/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

id   integer   

The ID of the config. Example: 1865

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()

Request   

POST api/sites/{site_id}/balancing/enable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/balancing/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/balancing

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

method   string   

Example: ip_hash

Must be one of:
  • round_robin
  • ip_hash
  • least_conn
servers   object[]  optional  
ip   string   

This must be a valid IP address. Example: 37.74.227.161

port   number   

Must be at least 1. Must not be greater than 65535. Example: 12

weight   number  optional  

Must be at least 1. Example: 49

backup   boolean  optional  

Example: true

down   boolean  optional  

Example: false

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()

Request   

POST api/sites/{site_id}/notifications/telegram/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/wordpress/optimization

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

optimizations   string[]   

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()

Request   

GET api/sites/{site_id}/wordpress/optimization/log

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

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()

Request   

POST api/sites/{site_id}/wordpress/wprocket

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

enable   boolean   

Example: false

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()

Request   

PUT api/sites/{site_id}/wordpress/user

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101417

Body Parameters

wp_user   string   

Example: ab

wp_password   string   

Example: ad