Retrieve daily task usage summary
Use this API to retrieve a summary of task usage for each day in the specified time range. The response includes total tasks executed, successful tasks, and failed tasks for each report date.
HTTP method and endpoint
POST /statistics-reporting/{tenantId}/API/getDailyTaskUsage
Replace {tenantId} with the ID of the target tenant.
Request headers
The following request headers must be included.
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Authorization | Bearer {access_token} | Yes |
Request body
The following table describes the request body parameters, including accepted values and defaults.
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
from (1) | Long | Yes | Start time in epoch milliseconds | — |
to (1) | Long | Yes | End time in epoch milliseconds | — |
env | String | Yes | Target environment |
Example: Default: none |
Note:
| ||||
Example request
curl -X POST https://{baseUrl}/statistics-reporting/{tenantId}/API/getDailyTaskUsage \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": 1721012400000,
"to": 1721108800000,
"env": "prod"
}'
Response fields
The following table describes the fields returned in the response body.
| Field | Type | Description |
|---|---|---|
reportDate | String | Date in YYYY-MM-DD format for which the task usage data was collected |
total | Integer | Total number of tasks (successful + failed) for the specified date |
success | Integer | Number of successfully completed tasks for the specified date |
failed | Integer | Number of failed tasks for the specified date |
Example response
[
{
"reportDate": "2023-10-24",
"total": 245,
"success": 232,
"failed": 13
},
{
"reportDate": "2023-10-25",
"total": 207,
"success": 201,
"failed": 6
}
]