Skip to main content

Report by Date

Runs a specific report for a given date range and returns the resulting data rows.

Endpoint

POST /v2/reports/bydate

Request Body

FieldTypeRequiredConstraintsDescription
reportIdintYesMust be a valid report ID from the report listThe ID of the report to run
startDatedatetimeYesISO 8601 UTC formatStart of the date range (inclusive)
endDatedatetimeYesISO 8601 UTC format; must be after startDateEnd of the date range (inclusive)
{
"reportId": 1,
"startDate": "2026-04-01T00:00:00Z",
"endDate": "2026-04-30T23:59:59Z"
}

Response

Returns the report dataset for the specified period. The structure of the data array varies by report type.

{
"success": true,
"data": [
{
"date": "2026-04-01",
"sent": 120,
"received": 95,
"totalBytes": 524288
},
{
"date": "2026-04-02",
"sent": 134,
"received": 110,
"totalBytes": 614400
}
]
}

Response Fields

FieldTypeDescription
datestringThe date this row covers
sentintNumber of items sent on this date
receivedintNumber of items received on this date
totalByteslongByte volume for this date

Code Examples

curl -X POST "https://rest.ecgrid.io/v2/reports/bydate" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reportId": 1, "startDate": "2026-04-01T00:00:00Z", "endDate": "2026-04-30T23:59:59Z" }'

See Also