Перейти до вмісту
AstroWay/api v2.95.1 · docs
усі системи в нормі

List Recent Report Exports

GET
/reports/history
request.sh
curl -X GET https://api.astroway.info/v1/reports/history \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json"

List the calling key’s most recently generated PDF reports — type, byte size, page count, language, created/expiry timestamps and a url. Re-fetch a report link within its 24h validity window, or surface recent exports in a dashboard. PDFs are purged after 24h, so older items return expired: true with a now-dead URL. Free to call. Query ?limit= (1–50, default 10).

Successful calculation

Media type application/json
object
ok
boolean
data
object
items
Array<object>
nullable
object
id
number
nullable
report_type
string
nullable
storage_key
string
nullable
url
string
nullable
byte_length
number
nullable
page_count
number
nullable
language
string
nullable
created_at
string
nullable
expires_at
string
nullable
expired
boolean
nullable
count
number
nullable
Example
{
"ok": true,
"data": {
"items": [
{
"id": 42,
"report_type": "natal",
"storage_key": "reports/abc-natal.pdf",
"url": "https://api.astroway.info/reports/abc-natal.pdf",
"byte_length": 124350,
"page_count": 1,
"language": "uk",
"created_at": "2026-06-10T16:00:00Z",
"expires_at": "2026-06-11T16:00:00Z",
"expired": false
}
],
"count": 1
}
}

Validation error

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?