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

Cyclic Index

POST
/cyclic-index
request.sh
curl -X POST https://api.astroway.info/v1/cyclic-index \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "startYear": 2020, "endYear": 2030 }'

Calculate the André Barbault Cyclic Index — sum of all outer planet separations — for a date range to indicate global crisis periods.

Media type application/json
object
startYear required
number
nullable
endYear required
number
nullable
pairs
nullable
Example
{
"startYear": 2020,
"endYear": 2030
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
data
Array<object>
object
date
string
index
number
minimum
object
date
string
value
number
Example
{
"ok": 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"
}
}
Корисно?