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

Timeline (SVG)

POST
/render/timeline

Gantt-style horizontal timeline of transit/aspect events over a date window. Caller supplies events array.

curl -X POST https://api.astroway.info/v1/render/timeline \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "rangeStart": "2026-01-01", "rangeEnd": "2026-12-31", "events": [ { "label": "Saturn ☐ Sun", "start": "2026-03-15", "end": "2026-04-20", "exact": "2026-04-02", "category": "Square" } ], "options": { "theme": "light", "width": 1000 } }'
object
rangeStart
required
string
/^\d{4}-\d{2}-\d{2}$/
rangeEnd
required
string
/^\d{4}-\d{2}-\d{2}$/
events
required
Array<object>
>= 1 items <= 200 items
object
label
required
string
>= 1 characters <= 120 characters
start
required
string
/^\d{4}-\d{2}-\d{2}$/
end
required
string
/^\d{4}-\d{2}-\d{2}$/
exact
string
/^\d{4}-\d{2}-\d{2}$/
category
string
<= 40 characters
color
string
<= 20 characters
options
object
size
integer
>= 200 <= 2000
theme
string
Allowed values: light dark console
showAspects
boolean
showRetrograde
boolean
title
string
<= 120 characters
format
string
default: json
Allowed values: svg json
width
integer
>= 400 <= 3000
rowHeight
integer
>= 16 <= 60
Example
{
"rangeStart": "2026-01-01",
"rangeEnd": "2026-12-31",
"events": [
{
"label": "Saturn ☐ Sun",
"start": "2026-03-15",
"end": "2026-04-20",
"exact": "2026-04-02",
"category": "Square"
}
],
"options": {
"theme": "light",
"width": 1000
}
}

Successful calculation

object
ok
boolean
Example
true
data
object
svg
string
format
string
byteLength
number
Example
{
"ok": true,
"data": {
"svg": "<svg ...>",
"format": "svg",
"byteLength": 4000
}
}

Validation error

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

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