Retrieve qiyaov Platform Proxy Invocation Records

Query the usage records of the current account under Proxy-type services. For regular API invocations, use API Invocation Records. If you are unsure of the service type, you can first check the type in Service Details.

Preparation

  1. Log in to the qiyaov Platform.
  2. Create an account token in the Account Token Console, and immediately save it to a password manager or Secret Manager.
  3. Open the Profile Page, copy the current account UUID, and save it as USER_ID. The user_id in the account token creation response can also be used.
  4. Obtain the application_id of the Proxy-type service from the Service Application List. When filtering by Proxy endpoint is needed, obtain the proxy_id from the Proxy List Under a Service.

For complete token instructions, see Manage Account Tokens. This API uses an Account Token, not the Credential used to invoke business APIs.

export PLATFORM_TOKEN='your account token'
export USER_ID='your account UUID'
export APPLICATION_ID='your Proxy Application ID'

API Overview

Item Content
Method GET
URL https://api17.platform.acedata.cloud/api/v1/usage/proxies/
Auth Authorization: Bearer ${PLATFORM_TOKEN}
Scope usage:read
Pagination count + items, 10 items per page by default

When an Application owner queries by application_id, the server first synchronizes the available records for that Application before returning the list, so the response time may be longer than that of the regular API usage list. Authorized users can read existing visible records, but will not trigger owner-side synchronization.

Query Parameters

Parameter Type Required for Regular Users Default Description
user_id UUID Yes — Current account UUID; passing another account returns 403
application_id UUID Recommended — Filter by Proxy Application; repeated parameters supported
proxy_id UUID No — Filter by Proxy endpoint; repeated parameters supported
limit integer No 10 Number of items per page, maximum 100
offset integer No 0 Pagination offset
ordering string No -created_at Descending order by creation time

The current API does not support direct filtering by model, HTTP status code, Credential, or time range, and does not support the perspective parameter of the API usage API. Do not add these unsupported parameters to requests and assume that they have taken effect.

Request Example

curl --get 'https://api17.platform.acedata.cloud/api/v1/usage/proxies/' \
  --data-urlencode "user_id=${USER_ID}" \
  --data-urlencode "application_id=${APPLICATION_ID}" \
  --data-urlencode 'limit=100' \
  --data-urlencode 'ordering=-created_at' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}"

Python pagination example:

import os
import requests

response = requests.get(
    "https://api17.platform.acedata.cloud/api/v1/usage/proxies/",
    headers={"Authorization": f"Bearer {os.environ['PLATFORM_TOKEN']}"},
    params={
        "user_id": os.environ["USER_ID"],
        "application_id": os.environ["APPLICATION_ID"],
        "limit": 100,
    },
    timeout=60,
)
response.raise_for_status()
data = response.json()

for usage in data["items"]:
    print(usage["created_at"], usage["deducted_amount"], usage["remaining_amount"])

Response Example

{
  "count": 1,
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "user_id": "00000000-0000-4000-8000-000000000002",
      "actor_user_id": null,
      "application_id": "00000000-0000-4000-8000-000000000003",
      "proxy_id": "00000000-0000-4000-8000-000000000004",
      "credential_id": null,
      "used_amount": null,
      "deducted_amount": 1.25,
      "remaining_amount": 98.75,
      "metadata": null,
      "created_at": "2026-09-01T08:00:00Z",
      "updated_at": "2026-09-01T08:00:00Z",
      "service": {
        "id": "00000000-0000-4000-8000-000000000005",
        "title": "Example Proxy Service"
      },
      "credential": null
    }
  ]
}

Key Fields

Field Description
user_id Account responsible for this charge
actor_user_id Actual caller; may be empty for old records
application_id Proxy Application that generated this record
proxy_id Corresponding Proxy endpoint
credential_id Associated Credential ID; may be empty for old records
used_amount Usage in the original record; may be empty
deducted_amount Final amount actually deducted
remaining_amount Remaining Application quota after deduction
metadata Public metadata; may be empty
service / credential Associated object summary for display; may be empty when the associated object does not exist

The quota unit is determined by the service.unit of the corresponding Application.

Error Handling

HTTP Meaning Handling Method
401 Account token is missing or invalid Check the Account Token; do not mistakenly use a business Credential
403 No permission to view the requested records Use an Application belonging to the current account, and remove unauthorized user_id
5xx Synchronization or query temporarily failed Keep the filter conditions and retry with backoff; if failures persist, provide the Application ID and time to support personnel

Next Steps