Blog posts can be created for all realms.
Table of Contents
Blog posts can be made for any realm.
Fields
Field | Name | Description | Type | Required |
title | Title | The post title | string | yes |
body | Post body | The post body | string (rendered as HTML - line breaks need a <br />) | |
Operations
The operations below are available for the following realms (replace [realm]
with the appropriate realm and ID):
create
Create a blog post
Path | POST https://api.schoology.com/v1/[realm]/posts |
Content | An object containing blog post fields JSON {
"title": "My first blog",
"body": "<strong>my blog content<\/strong>"
} XML <body>
<title>My first blog</title>
<body><strong>my blog content</strong></body>
</body>
|
Return | An object containing blog post fields JSON {
"id": "5615045",
"title": "REST API meetup",
"body": "Let's meet and chat about REST API",
"created": 1386886221,
"links": {
"self": "http:\/\/...\/posts\/5615045"
}
} XML <?xml version="1.0" encoding="utf-8" ?>
<result>
<id>5615045</id>
<title>REST API meetup</title>
<body>Let's meet and chat about REST API</body>
<created>1386886221</created>
<links>
<self>http://.../5615045</self>
</links>
</result>
|
list
View a list of posts (paged)
Path | GET https://api.schoology.com/v1/[realm]/posts |
Content | none |
Return | A collection of blog post objects, each one containing blog post fields JSON {
"post": [
{
"id": "5615055",
"title": "PHP meetup",
"body": "Let's meet and chat about PHP",
"created": 1386886391,
"links": {
"self": "http:\/\/...\/posts\/5615055"
}
},
{
"id": "5615045",
"title": "REST API meetup",
"body": "Let's meet and chat about REST API",
"created": 1386886221,
"links": {
"self": "http:\/\/...\/posts\/5615045"
}
}
]
} XML <?xml version="1.0" encoding="utf-8" ?>
<result>
<post>
<id>5615055</id>
<title>PHP meetup</title>
<body>Let's meet and chat about PHP</body>
<created>1386886391</created>
<links>
<self>http://.../5615055</self>
</links>
</post>
<post>
<id>5615045</id>
<title>REST API meetup</title>
<body>Let's meet and chat about REST API</body>
<created>1386886221</created>
<links>
<self>http://.../5615045</self>
</links>
</post>
</result>
|
view
View a specified blog post
Path | GET https://api.schoology.com/v1/[realm]/posts/{id} |
Content | none |
Return | An object containing blog post fields JSON {
"id": "5615045",
"title": "REST API meetup",
"body": "Let's meet and chat about REST API",
"created": 1386886221
} XML <?xml version="1.0" encoding="utf-8" ?>
<result>
<id>5615045</id>
<title>REST API meetup</title>
<body>Let's meet and chat about REST API</body>
<created>1386886221</created>
</result>
|
update
Modify a blog post
Path | PUT https://api.schoology.com/v1/[realm]/posts/{id} |
Content | An object containing blog post fields JSON {
"title": "My new blog title"
} XML <body>
<title>My new blog title</title>
</body>
|
Return | none |
delete
Delete a blog post (cannot be undone)
Path | DELETE https://api.schoology.com/v1/[realm]/posts/{id} |
Content | none |
Return | none |