Blog Post Comment

Comments can be made for any blog post.

Fields

FieldNameDescriptionTypeRequired
comment Comment The comment body string yes
uid User ID The user ID of the user who posted the comment string

Operations

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

Realm Path
Districts districts/{id}
Schools schools/{id}
Users users/{id}
Course Sections sections/{id}
Groups groups/{id}

create

Create a blog post comment

Path

POST https://api.schoology.com/v1/[realm]/posts/{post_id}/comments

JSON
{
    "comment": "See my comment?",
    "uid": "4656546"
}
XML
<body>
  <comment>See my comment?</comment>
  <uid>4656546</uid>
</body>
Content

An object containing blog post fields

Return

An object containing blog post fields

JSON
{
    "id": 3570311,
    "uid": 45552,
    "comment": "Noooooo JS",
    "created": 0,
    "status": 0,
    "links": {
        "self": "http:\/\/...\/comments\/3570311"
    }
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <id>3570311</id>
    <uid>45552</uid>
    <comment>Noooooo JS</comment>
    <created>0</created>
    <status>0</status>
    <links>
        <self>http://.../comments/3570311</self>
    </links>
</result>

list

View a list of post comments (paged)

Path

GET https://api.schoology.com/v1/[realm]/posts/{post_id}/comments

Content

none

Return

A collection of blog post objects, each one containing blog post fields

JSON
{
    "comment": [
        {
            "id": 3570311,
            "uid": 45552,
            "comment": "No JS",
            "created": 1388167926,
            "status": 1,
            "links": {
                "self": "http:\/\/...\/comments\/3570311"
            }
        },
        {
            "id": 3570313,
            "uid": 45552,
            "comment": "Yes JS",
            "created": 1388168007,
            "status": 1,
            "links": {
                "self": "http:\/\/...\/comments\/3570313"
            }
        }
    ]
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <comment>
        <id>3570311</id>
        <uid>45552</uid>
        <comment>No JS</comment>
        <created>1388167926</created>
        <status>1</status>
        <links>
            <self>http://.../comments/3570311</self>
        </links>
    </comment>
    <comment>
        <id>3570313</id>
        <uid>45552</uid>
        <comment>Yes JS</comment>
        <created>1388168007</created>
        <status>1</status>
        <links>
            <self>http://.../comments/3570313</self>
        </links>
    </comment>
</result>

view

View a specified blog post comment

Path

GET https://api.schoology.com/v1/[realm]/posts/{post_id}/comments/{comment_id}

Content

none

Return

An object containing blog post fields

JSON
{
    "id": 3570311,
    "uid": 45552,
    "comment": "Noooooo JS",
    "created": 1388167926,
    "status": 1
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
	<id>3570311</id>
	<uid>45552</uid>
	<comment>Noooooo JS</comment>
	<created>1388167926</created>
	<status>1</status>
</result>

delete

Delete a blog post comment (cannot be undone)

Path

DELETE https://api.schoology.com/v1/[realm/posts/{post_id}/comments/{comment_id}

Content

none

Return

none