properties.dataStreams.list
GET/admin/v1beta/properties/{property_id}/dataStreamsGọi qua 360: GET https://partner.quantri360.com/v1/ga4/admin/v1beta/properties/{property_id}/dataStreams
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
Luồng dữ liệu của property (web / app): mã đo lường G-XXXX, tên miền, gói ứng dụng.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/ga4/admin/v1beta/properties/{property_id}/dataStreams
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 | 123456789 | Property ID GA4 (số) admin brand đã ủy quyền bằng nick Google — lấy ở GET /v1/platforms; phải trùng properties/{property_id} trong đường dẫn. Có thể bỏ (mỗi brand một property). |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| property_id | path | string | Có | 123456789 | Id property GA4. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/ga4/admin/v1beta/properties/123456789/dataStreams" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/ga4/admin/v1beta/properties/123456789/dataStreams",
params={},
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/ga4/admin/v1beta/properties/123456789/dataStreams');
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: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/ga4/admin/v1beta/properties/123456789/dataStreams' . '?' . http_build_query([]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $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 Google Analytics 4)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| dataStreams | object[] | Luồng. | |
| name | string | properties/<id>/dataStreams/<id>. | |
| type | string | WEB_DATA_STREAM | |
| displayName | string | ||
| webStreamData | object | {measurementId (G-XXXX), defaultUri}. |
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Cấu hình property (Admin API) ở trang nền tảng
- Tạo API key (tick kênh Google Analytics 4)
- Gọi theo ví dụ ở trên