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

Delete a Report PDF

DELETE
/reports/files/{filename}
request.sh
curl -X DELETE https://api.astroway.info/v1/reports/files/{filename} \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json"

Delete a PDF this account made before its retention runs out. filename is the last part of the report url. Any key of the same account may delete it; a file made by another account answers 404. Free, so an account with no credits left can still remove a client’s report.

filename required
string
/^[A-Za-z0-9._-]+\.pdf$/

Last part of the report url, ending in .pdf.

Example
9edded79-0880-4147-8eb7-a33efdbf6158-natal-keep30.pdf
fields
string

Comma-separated dotted paths, relative to data, to keep in the response. A path is applied to every element of an array, so planets.name means the name of each planet. Paths that match nothing come back in _fields_unmatched; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer.

Example
planets.name,planets.longitude
precision
integer
<= 15

Round every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute.

Example
4

Successful calculation

Media type application/json
object
ok
boolean
data
object
storage_key
string
nullable
deleted
boolean
nullable
Example
{
"ok": true,
"data": {
"storage_key": "reports/9edded79-0880-4147-8eb7-a33efdbf6158-natal-keep30.pdf",
"deleted": true
}
}

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"
}
}
Корисно?