project/list
POST/extapi/v3/project/listGọi qua 360: POST https://partner.quantri360.com/v1/base_wework/extapi/v3/project/list
Sắp mở. API này đã chạy thật qua 360 và đang được chốt giá — bạn có thể đọc tài liệu và chuẩn bị tích hợp trước.
Mô tả API
Danh sách DỰ ÁN token xem được: tên, phòng ban, người quản lý / theo dõi, trạng thái tiến độ, đếm việc (tổng / xong / đang làm / quá hạn), các nhóm việc. Bước đầu để lấy mã dự án cho task/project, project/get.full.
limitkhông có tác dụng ở API này.- Mỗi dự án ~8 KB vì kèm cấu hình quyền — tách lấy trường cần dùng.
Request
Địa chỉ
POST https://partner.quantri360.com/v1/base_wework/extapi/v3/project/list
Xác thực & gian hàng
| Tên | Vị trí | Kiểu | Mẫu | Mô tả |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | heradg | Tên kết nối Base Wework (GET /v1/platforms). Có thể bỏ khi chỉ nối một token. |
| username | body | string | @nguyenvana | API ghi chạy DƯỚI TÊN người dùng Base này (kèm @). |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| page | body | int | Không | 0 | Trang, bắt đầu từ 0. |
Phân trang
100 dự án / trang; còn trang sau khi is_remain = true.
Ví dụ request
curl -s -X POST "https://partner.quantri360.com/v1/base_wework/extapi/v3/project/list" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"page":0}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/base_wework/extapi/v3/project/list",
params={},
json={
"page": 0
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/base_wework/extapi/v3/project/list');
for (const [k, v] of Object.entries({})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'POST',
headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"page":0}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/base_wework/extapi/v3/project/list' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"page":0}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;Response
Tham số phản hồi (nguyên của Base Wework)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| code | int | 1 | 1 = thành công · 0 = lỗi. |
| page | int | 0 | |
| items_per_page | int | 100 | |
| is_remain | bool | false | Còn trang sau. |
| total | int | 5 | Tổng dự án. |
| projects | object[] | ||
| id | string | 229079 | Mã dự án. |
| name | string | Đồng phục | Tên. |
| dept_id | string | 6950 | Phòng ban. |
| owners / followers | object[] | Quản lý / thành viên theo dõi: username, gavatar. | |
| stage | string | ontrack | Tình trạng tiến độ (`status_obj` chi tiết). |
| status | string | 0 | |
| stats | object | total, complete, active, overdue — số việc. | |
| cached_tasklists | object[] | Nhóm việc: id, name (id 0 = "Uncategorized"). | |
| since / last_update | string | 1788427729 | Tạo / sửa (Unix giây). |
| options | object | Cấu hình quyền & hiển thị dự án. | |
| … | Còn: hid, path, privacy, tags, form, acl, opt_acl, opt_task_acl, workload, incoming_webhook… |
Mẫu phản hồi
{
"code": 1,
"message": "",
"data": null,
"page": 0,
"items_per_page": 100,
"is_remain": false,
"total": 5,
"projects": [
{
"id": "229079",
"name": "Đồng phục",
"path": "dong-phuc-229079",
"metatype": "project",
"privacy": "0",
"dept_id": "6950",
"owners": [
{
"username": "nguyenvana"
}
],
"followers": [
{
"username": "nguyenvana"
},
{
"username": "hoangvane"
}
],
"since": "1788427729",
"last_update": "1788428345",
"status": "0",
"stage": "ontrack",
"status_obj": {
"stage": "ontrack",
"status": "0",
"color": "1",
"note": null
},
"stats": {
"total": 2,
"complete": 2,
"active": 0,
"overdue": 0
},
"cached_tasklists": [
{
"id": 0,
"name": "Uncategorized",
"task_duration": ""
},
{
"id": "473508",
"name": "Báo cáo",
"task_duration": 0
}
]
}
]
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Dự án & nhóm ở trang nền tảng
- Tạo API key (tick kênh Base Wework)
- Gọi theo ví dụ ở trên