Pages

Pages can be used to display any sort of content. HTML can be used to format the content of the page to anything you like.

Table of Contents

Fields

Field Name Description Type Required
Title title

The page title

string yes
Body body

The content of the page. Can be in HTML format.

string no
Published published

Whether or not the page is published

{0,1}
Inline inline

Set to 1 in order to set this page as an inline page

{0,1}
Created timestamp created

The timestamp of when the page was created

integer
assignees Individually Assigned enrollments

This field shows which enrollees are assigned a particular page. This field can be used in a POST or PUT operation. If an empty array is sent in, all assignees will be removed from the page

array of enrollment ids
grading_group_ids Grading Group Ids

This field shows what grading groups are assigned a particular page. This field can be used in a POST or PUT operation. If an empty array is sent in, all grading groups will be removed from the page

array of grading group ids

Operations - [realm]/pages

The operations below are available for the following realms (replace [realm] with the appropriate realm and ID):

RealmPath
Course Sectionssections/{id}

create

Create a page

Path

POST https://api.schoology.com/v1/[realm]/pagesJSON{

Content

An object containing page fields

Return

An object containing page fields

JSON
{
    "id": 5825357,
    "title": "The page title",
    "body": "",
    "parent": 0,
    "published": 1,
    "inline": 0,
    "created": 1389657814,
    "children": [

    ],
    "available": 1,
    "completed": 0,
    "links": {
        "self": "http:\/\/..."
    },
    "assignees":[ 12345, 4567],
    "grading_group_ids": [534]
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <id>5825357</id>
    <title>The page title</title>
    <body>&lt;base href=&quot;http:\/\/...&quot;/&gt;</body>
    <parent>0</parent>
    <published>1</published>
    <inline>0</inline>
    <created>1389657814</created>
    <children />
    <available>1</available>
    <completed>0</completed>
    <assignees>12345</assignees>
    <assignees>12345</assignees>
  <grading_group_ids>534</grading_group_ids>
    <links>
        <self>http:\/\/...</self>
    </links>
</result>

list

View a list of pages for the given realm. The following query strings can (optionally) be appended:

  • withcontent=1: include the contents of the page in the response
  • with_tags: retrieve tags of this piece of content.
Path

GET https://api.schoology.com/v1/[realm]/pages

Content

none

Return

A collection of page objects, each one containing page fields

JSON
{
    "page": [
        {
            "id": 5825351,
            "title": "The page title",
            "body": "",
            "parent": 0,
            "published": 1,
            "inline": 0,
            "created": 0,
            "children": [

            ],
            "available": 1,
            "completed": 0,
            "num_assignees": 4,
            "assignees": [
                 12345,
                 4567,
                 888,
                 999
           ],
          "grading_group_ids": [
                534
           ],
            "completion_status": "",
            "links": {
                "self": "http:\/\/..."
            }
        }
    ],
    "total": 1,
    "links": {
        "self": "http:\/\/...?start=0&limit=20"
    }
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
	<page>
		<id>5825351</id>
		<title>The page title</title>
		<body>&lt;base href=&quot;http:\/\/...&quot;/&gt;</body>
		<parent>0</parent>
		<published>1</published>
		<inline>0</inline>
		<created>0</created>
		<children />
		<available>1</available>
		<completed>0</completed>
		<completion_status />
                <num_assignees>4</num_assignees>
                <assignees>12345</assignees>
                <assignees>4567</assignees>
                <assignees>888</assignees>
                <assignees>999</assignees>
                <grading_group_ids>534</grading_group_ids>
		<links>
			<self>http:\/\/...</self>
		</links>
	</page>
	<total>1</total>
	<links>
		<self>http:\/\/...?start=0&amp;limit=20</self>
	</links>
</result>

Operations - page/{id}

view

View a specified page. The following query string can (optionally) be appended:

  • with_tags: retrieve tags of this piece of content.
Path

GET https://api.schoology.com/v1/[realm]/page/{id}

Content

none

Return

An object containing page fields

JSON
{
    "id": 5825351,
    "title": "The page title",
    "body": "",
    "parent": 0,
    "published": 1,
    "inline": 0,
    "created": 1389657748,
    "children": [

    ],
    "num_assignees": 0,
    "assignees": [

    ],
    "available": 1,
    "completed": 0,
    "completion_status": ""
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
	<id>5825351</id>
	<title>The page title</title>
	<body>&lt;base href=&quot;http:\/\/...&quot;/&gt;</body>
	<parent>0</parent>
	<published>1</published>
	<inline>0</inline>
	<created>1389657748</created>
	<children />
	<available>1</available>
	<completed>0</completed>
	<completion_status />
	<num_assignees>0</num_assignees>
	<assignees />
</result>

update

Update a specified page

Path

PUT https://api.schoology.com/v1/[realm]/pages/{id}

Content

An object containing page fields

JSON
{
    "title": "New page title",
    "published": "0"
}
XML
<body>
  <title>New page title</title>
  <published>0</published>
</body>
Return

none

delete

Delete a page (cannot be undone)

Path

DELETE https://api.schoology.com/v1/[realm]/pages/{id}

Content

none

Return

none