Related endpoints:
GET /admin/api/pages
Example response:
Status: 200 OK
[
{
"id": 1,
"title": "Home Page",
"menu_title" null,
"slug": null,
"path": "",
"content_type": "page",
"keywords": null,
"description": null,
"data": {},
"root": true,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": "site",
"title_separator": null,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2013-12-13T09:19:04.000Z",
"published_at": "2013-12-13T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/1",
"public_url": "http://helloworld.voog.co/",
"contents_url": "http://helloworld.voog.co/admin/api/pages/1/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages?parent_id=1",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:53:00.000Z",
"updated_at": "2013-04-11T10:08:54.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 1,
"title": "Front page",
"layout_name": "page_front",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/1",
"created_at": "2013-04-05T13:53:00.000Z",
"updated_at": "2013-04-11T10:08:54.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 1,
"parent_id": null,
"title": "Home Page",
"position": 1,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2013-12-13T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/1",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=1",
"parent_url": null
},
"seo": {
"full_title": "My new site",
"title_format": "<site_title>",
"score": 87,
"metrics": [
{
"key": "title_length",
"score": 75,
"result": "warning"
},
{
"key": "description_length",
"score": 100,
"result": "pass"
}
]
}
}, {
"id": 2,
"title": "Products",
"menu_title" null,
"slug": "products",
"path": "products",
"content_type": "page",
"keywords": null,
"description": null,
"data": {
"my_key_1": "Value 1",
"my_key_2": 2
},
"root": false,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": null,
"title_separator": null,
"permanent_redirect_url": "http://helloworld.voog.co/our-products",
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2014-01-03T12:14:34.000Z",
"published_at": "2013-12-13T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/2",
"public_url": "http://helloworld.voog.co/products",
"contents_url": "http://helloworld.voog.co/admin/api/pages/2/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages?parent_id=2",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 2,
"title": "Common page",
"layout_name": "page_default",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/2",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 2,
"parent_id": 1,
"title": "Products",
"position": 2,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2014-01-03T12:14:34.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/2",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=2",
"parent_url": "http://helloworld.voog.co/admin/api/nodes/1"
},
"seo": {
"full_title": "Products – My new site",
"title_format": "<page_title> <separator> <site_title>",
"score": 87,
"metrics": [
{
"key": "title_length",
"score": 75,
"result": "warning"
},
{
"key": "description_length",
"score": 100,
"result": "pass"
}
]
}
}
]
content_type
- page type (e.g. ?content_type=blog
). Accepted values are page
, blog
, elements
and link
.include_seo
- includes SEO-related output.language_code
- language code (e.g. ?language_code=en
). Returns only pages with requested language code.language_id
- language id (e.g. ?language_id=1
). Returns only pages for requested language.node_id
- page node id (e.g. ?node_id=1
). Returns only pages for requested node.page
- requested page (default: 1
).parent_id
- parent page id (e.g. ?parent_id=1
). Returns only children pages for requested parent page.path
- path (e.g. ?path=products/books
). Returns only page with requested path.path_prefix
- path prefix (e.g. ?path_prefix=products/
). Returns only those pages whose path begins with the given prefix.per_page
- elements per response (default: 50
; maximum: 250
).search
- a generic search string matching if either title
, menu_title
, description
or
path
contains the passed value.Read more about filters.
page
attributes: id
, language_id
, node_id
, layout_id
,
title
, menu_title
, path
, content_type
, keywords
,
description
, hidden
, publishing
, privacy
, isprivate
, created_at
,
updated_at
, published_at
.language
attributes: id
, code
, title
, position
,
default_language
, created_at
, updated_at
.node
attributes: id
, parent_id
, title
, position
,
created_at
, updated_at
.POST /admin/api/pages
Example data:
{
"title": "Contacts",
"slug": "contacts",
"layout_id": 2,
"parent_id": 1
}
Example response:
Status: 201 Created
{
"id": 3,
"title": "Contacts",
"menu_title" null,
"slug": "contacts",
"path": "contacts",
"content_type": "page",
"keywords": null,
"description": null,
"data": {},
"root": false,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": null,
"title_separator": null,
"created_at": "2014-01-10T09:19:04.000Z",
"updated_at": "2014-01-10T09:19:04.000Z",
"published_at": "2014-01-10T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/3",
"public_url": "http://helloworld.voog.co/contacts",
"contents_url": "http://helloworld.voog.co/admin/api/pages/3/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages/3?parent_id=3",
"robots_header": "noindex",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 2,
"title": "Common page",
"layout_name": "page_default",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/2",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 3,
"parent_id": 1,
"title": "Contacts",
"position": 3,
"created_at": "2014-01-10T09:19:04.000Z",
"updated_at": "2014-01-10T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/3",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=3",
"parent_url": "http://helloworld.voog.co/admin/api/nodes/1"
},
"seo": {
"full_title": "Contacts – My new site",
"title_format": "<page_title> <separator> <site_title>",
"score": 87,
"metrics": [
{
"key": "title_length",
"score": 75,
"result": "warning"
},
{
"key": "description_length",
"score": 100,
"result": "pass"
}
]
}
}
title
- page title in the <title>
tag.menu_title
- page title in menu, defaults to title
.layout_id
- page layout id.slug
- page url part in current folder. Value ''
means the root page. Slug is unique in given subfolder. If not set then title
value is used to generate it.parent_id
- parent page id.node_id
- related node id.language_id
- language id. Creates new page undercontent_type
- page's content type (used only when creating a link)path
- URL the link points to (used only when creating a link)description
- page meta description.image_id
- id of the page descriptive image (commonly used for OG tags) - should be id of asset with image type (default: null
).hidden
- hidden in site menu. (Default: false
).publishing
- publish changes automatically. If turned on then every page (or page content) update is published automatically. (Default: true
).privacy
(alias isprivate
) - enable or disable password protection for page and it's sub pages (default: false
).data
- key/value based custom hash store. (NB! Keys with prefixes internal_
are protected and read only.)permanent_redirect_url
- fully qualified url. If set then current page returns 301 redirect response to it (default: null
). Example: http://www.mysite.com/some_subpage
.robots_header
- HTTP X-Robots-Tag
header value (read more).
When set then HTTP header X-Robots-Tag
is added to current page response. Example values: noindex
or noindex, nofollow
(default: null
).title_format
- default title format for the page title tag. Defaults to site title_format
value. Supported values and their corresponding patterns:
page_site
- <page_title> <separator> <site_title>
site_page
- <site_title> <separator> <page_title>
page
- <page_title>
site
- <site_title>
title_separator
- default title format separator for the page title tag. Defaults to site title_separator
value.include_seo
- includes SEO-related output.keywords
[deprecated] - page meta keywords.New subpage:
parent_id
- creates a new page under the given parent page. Creates a new node and uses parent page's language.
Translation of existing page:
parent_id
and node_id
- creates a new page under the given parent page, bound to an existing node. Uses the parent page's language.
or
language_id
and node_id
- creates a new page for the given language, bound to the given node. (NB! parent page should already be created for the given language.)
title
- page title in menulayout_id
- page layout idtitle
- link title in menucontent_type
- specifies the page as a link. Only valid value is link
.path
- URL the link points toFor full URLs, the protocol is mandatory. Allowed protocols are "http" and "https". HTTP query parameters are also supported.
Examples:
http://example.com/page?parameter=value&also=another
https://www.google.com/search?q=test
/products
(initial slash is mandatory for relative paths)//subpage
(double slash uses site's current protocol)GET /admin/api/pages/1
Example request:
GET http://helloworld.voog.co/admin/api/pages/2
Example response:
Status: 200 OK
{
"id": 2,
"title": "Products",
"menu_title" null,
"slug": "products",
"path": "products",
"content_type": "page",
"keywords": null,
"description": null,
"data": {
"my_key_1": "Value 1",
"my_key_2": 2
},
"root": false,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": null,
"title_separator": null,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2014-01-03T12:14:34.000Z",
"published_at": "2013-12-13T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/2",
"public_url": "http://helloworld.voog.co/products",
"contents_url": "http://helloworld.voog.co/admin/api/pages/2/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages?parent_id=2",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 2,
"title": "Common page",
"layout_name": "page_default",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/2",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 2,
"parent_id": 1,
"title": "Products",
"position": 2,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2014-01-03T12:14:34.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/2",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=2",
"parent_url": "http://helloworld.voog.co/admin/api/nodes/1"
},
"seo": {
"full_title": "Products – My new site",
"title_format": "<page_title> <separator> <site_title>",
"score": 87,
"metrics": [
{
"key": "title_length",
"score": 75,
"result": "warning"
},
{
"key": "description_length",
"score": 100,
"result": "pass"
}
]
},
"image": {
"id": 1,
"content_type": "image/jpeg",
"width": 1024,
"height": 768,
"url": "http://helloworld.voog.co/admin/api/assets/1",
"public_url": "http://media.voog.com/0000/0000/0001/photos/Chrysanthemum.jpg",
"sizes": [
{
"content_type": "image/jpeg",
"width": 600,
"height": 450,
"url": "http://media.voog.com/0000/0000/0001/photos/Chrysanthemum_block.jpg"
},
{
"content_type": "image/jpeg",
"width": 1024,
"height": 768,
"url": "http://media.voog.com/0000/0000/0001/photos/Chrysanthemum.jpg"
}
]
},
"contents": [
{
"id": 4,
"name": "body",
"position": 1,
"content_type": "text",
"url": "http://helloworld.voog.co/admin/api/pages/2/contents/4",
"created_at": "2013-12-13T09:19:05.000Z",
"updated_at": "2013-12-13T09:19:05.000Z"
},
{
"id": 5,
"name": "slogan",
"position": 1,
"content_type": "text",
"url": "http://helloworld.voog.co/admin/api/pages/2/contents/5",
"created_at": "2013-12-13T09:19:05.000Z",
"updated_at": "2013-12-13T09:19:05.000Z"
}
]
}
The output may depend on page content_type
.
For "content_type="blog"" there are additional attributes:
{
"...": "...",
"articles_url": "http://helloworld.voog.co/admin/api/articles?page_id=4
"...": "..."
}
For "content_type="elements"" there are additional attributes:
{
"...": "...",
"elements_url": "http://helloworld.voog.co/admin/api/elements?page_id=4
"...": "..."
}
include_children
- includes list of subpages to response. (Eg ?include_children=true
)include_seo
- includes SEO-related output.PUT /admin/api/pages/1
This request updates the page with provided attributes. It replaces data
attribute with new key set if data
attribute is present in request.
PATCH /admin/api/pages/1
This request updates the page with provided attributes. It merges provided keys to data
attribute if data
attribute is present in request.
Example request:
PUT http://helloworld.voog.co/admin/api/pages/3
Example data:
{
"title": "About",
"slug": "about",
"title_format": "site_page",
"description": "We are a small crew of designers and developers passionate about usability.",
"data": {
"key_1": "value_1",
"key_2": "value_2"
}
}
Example response:
Status: 200 OK
{
"id": 3,
"title": "About",
"menu_title" null,
"slug": "about",
"path": "about",
"content_type": "page",
"keywords": null,
"description": "We are a small crew of designers and developers passionate about usability.",
"data" : {
"key_1": "value_1",
"key_2": "value_2"
},
"root": false,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": "site_page",
"title_separator": null,
"created_at": "2014-01-10T09:19:04.000Z",
"updated_at": "2014-01-10T10:10:10.000Z",
"published_at": "2014-01-10T10:10:10.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/3",
"public_url": "http://helloworld.voog.co/contacts",
"contents_url": "http://helloworld.voog.co/admin/api/pages/3/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages?parent_id=3",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 2,
"title": "Common page",
"layout_name": "page_default",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/2",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 3,
"parent_id": 1,
"title": "About",
"position": 3,
"created_at": "2014-01-10T09:19:04.000Z",
"updated_at": "2014-01-10T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/3",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=3",
"parent_url": "http://helloworld.voog.co/admin/api/nodes/1"
},
"seo": {
"full_title": "My new site – About",
"title_format": "<site_title> <separator> <page_title>",
"score": 87,
"metrics": [
{
"key": "title_length",
"score": 75,
"result": "warning"
},
{
"key": "description_length",
"score": 100,
"result": "pass"
}
]
}
}
Optional parameters:
title
- page title in the <title>
tag.menu_title
- page title in menu, defaults to title
.slug
- page url part in current folder.layout_id
- page layout id.description
- page meta description.image_id
- id of the page descriptive image (commonly used for OG tags) - should be id of asset with image type (default: null
).hidden
- hidden in site menu.publishing
- publish changes automatically.privacy
(alias isprivate
) - enable or disable password protection for page and it's sub pages.data
- key/value based custom hash store. If attribute data
is present in request then new value replaces existing data value. (NB! Keys with prefixes internal_
are protected and read only.)permanent_redirect_url
- fully qualified url. If set then current page returns 301 redirect response to it (default: null
). Example: http://www.mysite.com/some_subpage
.robots_header
- HTTP X-Robots-Tag
header value (read more).
When set then HTTP header X-Robots-Tag
is added to current page response. Example values: noindex
or noindex, nofollow
(default: null
).title_format
- default title format for the page title tag. Defaults to site title_format
value. Supported values and their corresponding patterns:
page_site
- <page_title> <separator> <site_title>
site_page
- <site_title> <separator> <page_title>
page
- <page_title>
site
- <site_title>
title_separator
- default title format separator for the page title tag. Defaults to site title_separator
value.include_seo
- includes SEO-related output.keywords
[deprecated] - page meta keywords.POST /admin/api/pages/1/duplicate
This request creates new duplicate page from the source page with related content (including blog articles and element) to same page level. It also accepts same optional parameters as the page update method.
Example request:
POST http://helloworld.voog.co/admin/api/pages/3/duplicate
{
"id": 4,
"title": "About",
"menu_title" null,
"slug": "about-1",
"path": "about-1",
"content_type": "page",
"keywords": null,
"description": "We are a small crew of designers and developers passionate about usability.",
"data" : {
"key_1": "value_1",
"key_2": "value_2"
},
"root": false,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": "site_page",
"title_separator": null,
"created_at": "2019-08-14T09:19:00.000Z",
"updated_at": "2019-08-14T10:19:00.000Z",
"published_at": "2019-08-14T10:19:00.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/4",
"public_url": "http://helloworld.voog.co/contacts",
"contents_url": "http://helloworld.voog.co/admin/api/pages/4/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages?parent_id=4",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 2,
"title": "Common page",
"layout_name": "page_default",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/2",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 4,
"parent_id": 1,
"title": "About",
"position": 4,
"created_at": "2019-08-14T09:19:00.000Z",
"updated_at": "2019-08-14T09:19:00.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/4",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=4",
"parent_url": "http://helloworld.voog.co/admin/api/nodes/1"
},
"seo": {
"full_title": "My new site – About",
"title_format": "<site_title> <separator> <page_title>",
"score": 87,
"metrics": [
{
"key": "title_length",
"score": 75,
"result": "warning"
},
{
"key": "description_length",
"score": 100,
"result": "pass"
}
]
}
}
DELETE /admin/api/pages/3
This request deletes the page from the database.
Example request:
DELETE http://helloworld.voog.co/admin/api/pages/3
Example response:
Status: 204 No Content
Limits:
PUT /admin/api/pages/1/data/key
Updates or adds a new key to page data
keyset.
Example request:
PUT http://helloworld.voog.co/admin/api/pages/2/data/my_key_1
Example data:
{
"value": "new value"
}
Example response:
Status: 200 OK
{
"id": 2,
"title": "Products",
"menu_title" null,
"slug": "products",
"path": "products",
"content_type": "page",
"keywords": null,
"description": null,
"data": {
"my_key_1": "new value",
"my_key_2": "value_2"
},
"root": false,
"hidden": false,
"publishing": true,
"isprivate": false,
"title_format": null,
"title_separator": null,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2014-01-10T12:14:34.000Z",
"published_at": "2014-01-10T09:19:04.000Z",
"url": "http://helloworld.voog.co/admin/api/pages/2",
"public_url": "http://helloworld.voog.co/products",
"contents_url": "http://helloworld.voog.co/admin/api/pages/2/contents",
"children_url": "http://helloworld.voog.co/admin/api/pages?parent_id=2",
"language": {
"id": 1,
"code": "en",
"title": "ENG",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"url": "http://helloworld.voog.co/admin/api/languages/1"
},
"layout": {
"id": 2,
"title": "Common page",
"layout_name": "page_default",
"content_type": "page",
"url": "http://helloworld.voog.co/admin/api/layouts/2",
"created_at": "2013-04-05T13:54:32.000Z",
"updated_at": "2013-04-11T10:09:51.000Z",
"mime_type": "application/vnd.voog.design.custom+liquid"
},
"node": {
"id": 2,
"parent_id": 1,
"title": "Products",
"position": 2,
"created_at": "2013-12-13T09:19:04.000Z",
"updated_at": "2014-01-03T12:14:34.000Z",
"url": "http://helloworld.voog.co/admin/api/nodes/2",
"children_url": "http://helloworld.voog.co/admin/api/nodes?parent_id=2",
"parent_url": "http://helloworld.voog.co/admin/api/nodes/1"
}
}
DELETE /admin/api/pages/1/data/key
Example request:
DELETE http://helloworld.voog.co/admin/api/pages/2/data/my_key_1
Example response:
Status: 204 No Content