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

Planetary Cycles

POST
/planetary-cycles
request.sh
curl -X POST https://api.astroway.info/v1/planetary-cycles \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "planet1Id": 5, "planet2Id": 6, "startDate": "2000-01-01", "endDate": "2040-12-31" }'

Find all conjunctions between two planets within a date range, defining the start of a new synodic cycle.

Media type application/json
object
planet1Id required
number
nullable
planet2Id required
number
nullable
startDate required
string
/^\d{4}-\d{2}-\d{2}$/
endDate required
string
/^\d{4}-\d{2}-\d{2}$/
Example
{
"planet1Id": 5,
"planet2Id": 6,
"startDate": "2000-01-01",
"endDate": "2040-12-31"
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
conjunctions
Array<object>
nullable
object
jd
number
nullable
date
string
nullable
planet1Id
number
nullable
planet2Id
number
nullable
longitude
number
nullable
signIndex
number
nullable
Example
{
"ok": true,
"data": {
"conjunctions": [
{
"jd": 2451693.169326782,
"date": "2000-05-28T16:03:50.000Z",
"planet1Id": 5,
"planet2Id": 6,
"longitude": 52.721360573887324,
"signIndex": 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"
}
}
Корисно?