Set Environment Level Redirects.
interface Request {
"redirects": []Redirect
}
interface Response {
"redirects": []Redirect
}
# Example
curl -X POST \
-H 'Authorization: <api_key>' \
-H 'Content-Type: application/javascript' \
'https://api.stormkit.io/v1/redirects` \
-d '{ "redirects": [{ "from": "/path", "to": "/new-path" }] }'
Get Environment Level Redirects.
interface Response {
"redirects": []Redirect
}
# Example
curl -X GET \
-H 'Authorization: <api_key>' \
-H 'Content-Type: application/javascript' \
'https://api.stormkit.io/v1/redirects'
{
"redirects": [{ "from": "*", "to": "index.html" }]
}
interface Redirect {
from: string
to: string
status?: 200 | 301 | 302
assets?: boolean
hosts?: string[]
}