Get AceDataCloud Platform API Call Records
Returns the business interface call records initiated by the current account on https://api.acedata.cloud/** — including request time, HTTP status code, consumption amount, which API credential was used, source IP, request duration, etc.
Applicable scenarios:
- Self-service billing, verifying deduction details.
- Investigating "why this request deducted X Credit".
- Creating detailed reports for the BI system.
ℹ️ This interface belongs to the AceDataCloud Platform Management API, with a unified prefix of
https://platform.acedata.cloud/api/v1/.
¶ Interface Overview
| Item | Content |
|---|---|
| Method | GET |
| URL | https://platform.acedata.cloud/api/v1/usages/ |
| Authentication | ✅ Requires account token |
¶ Authentication Instructions (How to Obtain Account Token)
Request Header:
Authorization: Bearer platform-v1-92eb****629c
How to obtain: Log in to the AceDataCloud Platform → Account Token Console → Click the "Create" button. For details, see Manage AceDataCloud Platform Account Tokens.
¶ Required Query Parameters
⚠️ Must include
?user_id=<your_user_id>. The list interface verifies permissions for each object.
Get user_id: Open https://auth.acedata.cloud/user/profile.
¶ Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
user_id |
UUID | ✅ | — | Current account user ID |
application_id |
UUID | No | — | Filter by Application |
service_id |
UUID | No | — | Filter by service |
credential_id |
UUID | No | — | Filter by credential (view all calls of a specific Token) |
api_id |
UUID | No | — | Filter by API endpoint |
status_code |
integer | No | — | Filter by HTTP status code (e.g., ?status_code=200, ?status_code=500) |
start_at |
datetime | No | — | Lower time bound (ISO8601 string, e.g., 2026-04-01T00:00:00Z) |
end_at |
datetime | No | — | Upper time bound |
limit |
integer | No | 10 | Number of items per page, maximum 100 |
offset |
integer | No | 0 | Offset |
ordering |
string | No | — | Sorting field, prefix - for descending order. Commonly used -created_at |
¶ Request Examples
¶ cURL
USER_ID=89518d07-5560-4b05-92c1-667f3ddf6a4b
# Recent 100 calls
curl "https://platform.acedata.cloud/api/v1/usages/?user_id=${USER_ID}&limit=100&ordering=-created_at" \
-H 'authorization: Bearer platform-v1-92eb****629c'
# View failed requests for a specific day
curl "https://platform.acedata.cloud/api/v1/usages/?user_id=${USER_ID}&status_code=500&start_at=2026-04-25T00:00:00Z&end_at=2026-04-26T00:00:00Z" \
-H 'authorization: Bearer platform-v1-92eb****629c'
¶ Python
import requests
PLATFORM_TOKEN = "platform-v1-92eb****629c"
USER_ID = "89518d07-5560-4b05-92c1-667f3ddf6a4b"
resp = requests.get(
"https://platform.acedata.cloud/api/v1/usages/",
headers={"authorization": f"Bearer {PLATFORM_TOKEN}"},
params={
"user_id": USER_ID,
"limit": 100,
"ordering": "-created_at",
},
timeout=10,
)
data = resp.json()
print(f"Recent {len(data['items'])} calls, total {data['count']} records")
for u in data["items"]:
print(f" {u['created_at']} HTTP {u['status_code']:>3} Deducted {u['consumption']:>8.4f} {u['path']}")
¶ Node.js
const USER_ID = '89518d07-5560-4b05-92c1-667f3ddf6a4b'
const url = new URL('https://platform.acedata.cloud/api/v1/usages/')
url.searchParams.set('user_id', USER_ID)
url.searchParams.set('limit', '100')
const r = await fetch(url, {
headers: { authorization: 'Bearer platform-v1-92eb****629c' },
})
console.log(await r.json())
¶ Response Example (HTTP 200)
{
"count": 12345,
"items": [
{
"id": "abc12345-...",
"user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
"application_id": "82f57141-2323-4453-8730-60f7d833a2da",
"service_id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452",
"credential_id": "df3e1b1b-9e72-4c4f-9a83-1e23f7c8b4d6",
"api_id": "afc7917f-d89f-4dc9-95c2-863936b02cad",
"method": "POST",
"path": "/v1/chat/completions",
"status_code": 200,
"consumption": 0.0125,
"client_ip": "203.0.113.7",
"duration_ms": 1842,
"request_id": "req-9f8e7d6c5b4a3210",
"trace_id": "trc-1234567890abcdef",
"metadata": null,
"created_at": "2026-04-26T08:30:00Z"
}
]
}
¶ Response Field Descriptions
| Field | Type | Description |
|---|---|---|
id |
UUID | Call record ID |
user_id |
UUID | Caller user |
application_id |
UUID | The Application charged for this call |
service_id |
UUID | Service ID |
credential_id |
UUID | API credential used |
api_id |
UUID | null |
method |
string | HTTP method (POST/GET/...) |
path |
string | Business interface path |
status_code |
integer | Returned HTTP status code |
consumption |
number | Actual charge for this call (unit as per Application's service.unit) |
client_ip |
string | Caller IP |
duration_ms |
integer | Request duration (milliseconds) |
request_id |
string | Request ID for this call |
trace_id |
string | Full link trace ID (to be provided to customer service when issues arise) |
metadata |
object | null |
created_at |
string | Time of the call |
¶ Error Handling
| HTTP | Code | Meaning |
|---|---|---|
| 401 | not_authenticated |
Missing account token |
| 403 | permission_denied |
?user_id= not provided or provided with someone else's user_id |
| 400 | invalid |
start_at / end_at format error |
¶ Practical Tips
- Paginate when data volume is large: A single account's call records may have hundreds of thousands of entries. It is recommended to slice the window by
start_at/end_at(e.g., by day), with 100 entries per page. - Use dedicated interfaces for aggregate statistics: To view daily/monthly call volumes, use Get AceDataCloud Platform API Call Volume Aggregate Statistics, rather than summing entries with this interface—it's slow and costly.
- Bulk export: For more than 10,000 entries, it is recommended to use Get AceDataCloud Platform API Call Volume Export to asynchronously generate CSV.
consumption=0is valid: Failed requests (4xx/5xx) generally do not incur charges.- Failed requests: Records with
status_code >= 400haveconsumption=0, but will still be recorded in the database.
¶ Related Interfaces
- Get AceDataCloud Platform API Call Volume Aggregate Statistics
- Get AceDataCloud Platform API Call Volume Export — Asynchronously export CSV
- Get AceDataCloud Platform Proxy Call Records — For Proxy type services
- Get AceDataCloud Platform API Credential List
