Delivery API tells you information about how to "serve a request". This API is the backbone of hosting a blog on a subdirectory.
API Endpoint: https://blogs.hyvor.com/api/delivery/v0/{subdomain}
Replace {subdomain}
with the subdomain of your blog.
GET
request to the API endpointapi_key
query parameter to a valid Delivery API key. You can create one at Settings → API Keys.path
query parameter to the path of the blog you want to get information about. For example, if you want to get information about https://myblog.com/hello-world
, set path
to /hello-world/
.A successful response will be one of the following JSON objects:
This object is returned when the path is a file.
{
"type": "file",
"at": 1661590503,
"cache": true,
"status": 200,
"file_type": "template",
"content": "SGVsbG8gV29ybGQ=",
"mime_type": "text/html",
"cache_control": "no-cache, private"
}
This object is returned when the path is a redirect.
{
"type": "redirect",
"at": 1661590503,
"cache": true,
"status": 301,
"to": "https://example.com"
}
Common properties:
type
string
file
or redirect
at
integer
cache
boolean
false
for post preview routes.status
integer
200
, 301
, 302
, or 404
.File properties:
file_type
string
template
, asset
, or media
content
string
mime_type
string
cache_control
string
Redirect properties:
to
string