Chuyển tới nội dung chính

🔌 Interactive API Explorer

· 2 phút để đọc

Khám phá UIP API một cách tương tác! Bài viết này sử dụng MDX để tạo các ví dụ API live.

Pro Tip

Bạn có thể copy các code snippets và chạy trực tiếp với curl hoặc trong Postman!

🚀 Base URL

https://api.uip.vn/v1
# hoặc local: http://localhost:8000/api/v1

📡 Available Endpoints

Get All Cameras

curl -X GET "http://localhost:8000/api/v1/cameras" \
-H "Accept: application/json"

Response:

{
"total": 1247,
"items": [
{
"id": "CAM001",
"name": "Nguyễn Văn Linh - Cầu Kênh Tẻ",
"location": {
"lat": 10.7352,
"lng": 106.6869
},
"status": "active",
"lastUpdate": "2025-11-29T08:30:00Z"
}
]
}

🔐 Authentication

API sử dụng Bearer Token authentication:

curl -X GET "http://localhost:8000/api/v1/protected-endpoint" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Bảo mật

Không bao giờ commit API key vào source code! Sử dụng environment variables.

📊 Response Codes

CodeMeaning
200✅ Success
201✅ Created
400❌ Bad Request
401🔐 Unauthorized
404🔍 Not Found
429⏱️ Rate Limited
500💥 Server Error

🛠️ Try It Yourself


Xem full API docs tại: API Reference

Nguyễn Đình Anh Tuấn - Backend Developer @ UIP Team