Pages API

for owner, author, student, and affiliate

GET /api/v1/pages/:id

Parameters

Name Description
id id
friendly_url text, url for page
show_footer show page footer, boolean
show_header show header, boolean
is_published show to public?
title page title
content page content(HTML)
template template
course_id course_id

Request

Headers

Accept: application/json
X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA
X-Api-Email: user-107@example.com

Route

GET /api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E

Query Parameters

friendly_url: page_slug
show_footer: false
show_header: true
title: a page title
content: <div>pagecontent</div>

cURL

curl "http://localhost:3000/api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA" \
	-H "X-Api-Email: user-107@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 638

Status

200 OK

Body

{
  "created_at": "2019-10-31T22:02:18Z",
  "draft": null,
  "friendly_url": "739f2709dcdafb603aec93de1d74f062",
  "title": "Page Title",
  "meta_description": null,
  "feature": "school_pages",
  "content": "Page Content",
  "show_header": false,
  "show_footer": false,
  "show_nav_background_color": null,
  "is_published": true,
  "blank_page_template": false,
  "published_at": null,
  "template": "rich_text",
  "course_id": null,
  "id": 1186,
  "skip_block_loop_wrapper": null,
  "custom_head_code": null,
  "css_properties": {
  },
  "draft_of_id": null,
  "updated_at": "2019-10-31T22:02:18Z",
  "compatibles": {
  },
  "meta": {
    "class": "page",
    "url": null,
    "name": "1186",
    "description": "Page Title",
    "image_url": null
  },
  "blocks": [

  ]
}

Request

Headers

Accept: application/json
X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA
X-Api-Email: user-107@example.com

Route

GET /api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E

Query Parameters

friendly_url: page_slug
show_footer: false
show_header: true
title: a page title
content: <div>pagecontent</div>

cURL

curl "http://localhost:3000/api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA" \
	-H "X-Api-Email: user-107@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 638

Status

200 OK

Body

{
  "created_at": "2019-10-31T22:02:18Z",
  "draft": null,
  "friendly_url": "739f2709dcdafb603aec93de1d74f062",
  "title": "Page Title",
  "meta_description": null,
  "feature": "school_pages",
  "content": "Page Content",
  "show_header": false,
  "show_footer": false,
  "show_nav_background_color": null,
  "is_published": true,
  "blank_page_template": false,
  "published_at": null,
  "template": "rich_text",
  "course_id": null,
  "id": 1186,
  "skip_block_loop_wrapper": null,
  "custom_head_code": null,
  "css_properties": {
  },
  "draft_of_id": null,
  "updated_at": "2019-10-31T22:02:18Z",
  "compatibles": {
  },
  "meta": {
    "class": "page",
    "url": null,
    "name": "1186",
    "description": "Page Title",
    "image_url": null
  },
  "blocks": [

  ]
}

Request

Headers

Accept: application/json
X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA
X-Api-Email: user-107@example.com

Route

GET /api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E

Query Parameters

friendly_url: page_slug
show_footer: false
show_header: true
title: a page title
content: <div>pagecontent</div>

cURL

curl "http://localhost:3000/api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA" \
	-H "X-Api-Email: user-107@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 638

Status

200 OK

Body

{
  "created_at": "2019-10-31T22:02:18Z",
  "draft": null,
  "friendly_url": "739f2709dcdafb603aec93de1d74f062",
  "title": "Page Title",
  "meta_description": null,
  "feature": "school_pages",
  "content": "Page Content",
  "show_header": false,
  "show_footer": false,
  "show_nav_background_color": null,
  "is_published": true,
  "blank_page_template": false,
  "published_at": null,
  "template": "rich_text",
  "course_id": null,
  "id": 1186,
  "skip_block_loop_wrapper": null,
  "custom_head_code": null,
  "css_properties": {
  },
  "draft_of_id": null,
  "updated_at": "2019-10-31T22:02:18Z",
  "compatibles": {
  },
  "meta": {
    "class": "page",
    "url": null,
    "name": "1186",
    "description": "Page Title",
    "image_url": null
  },
  "blocks": [

  ]
}

Request

Headers

Accept: application/json
X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA
X-Api-Email: user-107@example.com

Route

GET /api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E

Query Parameters

friendly_url: page_slug
show_footer: false
show_header: true
title: a page title
content: <div>pagecontent</div>

cURL

curl "http://localhost:3000/api/v1/pages/1186?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: wa6nz3MkQYz-XPyy1fUp3z1h7v7sKXaYvA" \
	-H "X-Api-Email: user-107@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 638

Status

200 OK

Body

{
  "created_at": "2019-10-31T22:02:18Z",
  "draft": null,
  "friendly_url": "739f2709dcdafb603aec93de1d74f062",
  "title": "Page Title",
  "meta_description": null,
  "feature": "school_pages",
  "content": "Page Content",
  "show_header": false,
  "show_footer": false,
  "show_nav_background_color": null,
  "is_published": true,
  "blank_page_template": false,
  "published_at": null,
  "template": "rich_text",
  "course_id": null,
  "id": 1186,
  "skip_block_loop_wrapper": null,
  "custom_head_code": null,
  "css_properties": {
  },
  "draft_of_id": null,
  "updated_at": "2019-10-31T22:02:18Z",
  "compatibles": {
  },
  "meta": {
    "class": "page",
    "url": null,
    "name": "1186",
    "description": "Page Title",
    "image_url": null
  },
  "blocks": [

  ]
}