-
Khu vực
- thành công
-
Lịch cúp điện
- ngày
-
Chất lượng dữ liệu
- % coverage
-
Hiệu suất
Cập nhật tiếp theo
API Documentation
Base URL
https://api.wptheme.store
API Endpoints
GET /api/organizations.json
Danh sách tất cả khu vực quản lý điện
GET /api/outages/all.json
Tất cả lịch cúp điện (67 ngày: 7 ngày trước → 60 ngày tới)
GET /api/outages/{code}.json
Lịch cúp điện theo khu vực cụ thể
GET /api/health.json
Trạng thái hệ thống và thông tin health check
GET /api/statistics.json
Thống kê chi tiết theo khu vực, loại, trạng thái
Response Headers
Content-Type: application/json; charset=utf-8
Access-Control-Allow-Origin: *
Cache-Control: public, max-age=900
X-API-Version: 2.0
Data Explorer
Preview Data
System Status
Usage Examples
JavaScript (Fetch API)
// Lấy danh sách khu vực
fetch('https://api.wptheme.store/api/organizations.json')
.then(res => res.json())
.then(data => {
console.log(`Có ${data.length} khu vực`);
data.forEach(org => {
console.log(org.organizationName);
});
});
// Lấy lịch cúp điện Hải Châu
fetch('https://api.wptheme.store/api/outages/PP0100.json')
.then(res => res.json())
.then(data => {
console.log(`Tổng: ${data.totalCount} lịch cúp điện`);
data.items.forEach(item => {
console.log(`${item.fromDateStr} - ${item.reason}`);
});
});
PHP (cURL)
// Lấy tất cả lịch cúp điện
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'https://api.wptheme.store/api/outages/all.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Tổng: " . $data['totalCount'] . " lịch cúp điện\n";
foreach($data['items'] as $item) {
echo $item['stationName'] . ": " .
$item['fromDateStr'] . " - " .
$item['toDateStr'] . "\n";
}
Region Codes
Đang tải danh sách khu vực...