Assignment Comments

Comments can be made for any assignment.

Table of Contents

Fields

Field Name Description Type Required
uid User Id

The Schoology user id of the user who created the comment

integer yes
comment Comment

The comment text

string yes
created Created timestamp

The Unix timestamp when the comment was created

integer no
parent_id Parent ID

The ID of the comment being replied to.

integer no
status Comment status

Whether the comment is deleted (0) , available (1) or pending moderation approval (3)

{0,1,3} no

Operations

create

Create a comment

Path

POST https://api.schoology.com/v1/sections/{section_id}/assignments/{assignment_id}/comments

Content

An object containing comment fields

JSON
{
    "uid": "2345467",
    "comment": "The comment text"
}
XML
<body>
  <uid>2345467</uid>
  <comment>The comment text</comment>
</body>
Return

An object containing comment fields

JSON
{
    "id": 3570325,
    "uid": 45552,
    "comment": "this is a test comment",
    "created": 1388422820,
    "parent_id": 0,
    "status": 1,
    "likes": 0,
    "user_like_action": false,
    "links": {
        "self": "http:\/\/...\/comments\/"
    }
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <id>3570325</id>
    <uid>45552</uid>
    <comment>this is a test comment</comment>
    <created>1388422820</created>
    <parent_id>0</parent_id>
    <status>1</status>
    <likes>0</likes>
    <user_like_action></user_like_action>
    <links>
        <self>http://.../comments/</self>
    </links>
</result>

list

View a list of comments (paged)

Path

GET https://api.schoology.com/v1/sections/{section_id}/assignments/{assignment_id}/comments

Content

none

Return

A collection of comment objects, each one containing comment fields

JSON
{
    "comment": [
        {
            "id": 3570325,
            "uid": 45552,
            "comment": "this is a test comment",
            "created": 1388422820,
            "parent_id": 0,
            "status": 1,
            "likes": 0,
            "user_like_action": false,
            "links": {
                "self": "http:\/\/...\/comments\/3570325"
            }
        }
    ]
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <comment>
        <id>3570325</id>
        <uid>45552</uid>
        <comment>this is a test comment</comment>
        <created>1388422820</created>
        <parent_id>0</parent_id>
        <status>1</status>
        <likes>0</likes>
        <user_like_action></user_like_action>
        <links>
            <self>http://.../comments/3570325</self>
        </links>
    </comment>
</result>

view

View a specified comment

Path

GET https://api.schoology.com/v1/sections/{section_id}/assignments/{assignment_id}/comments/{id}

Content

none

Return

An object containing comment fields

JSON
{
    "id": 3570325,
    "uid": 45552,
    "comment": "this is a test comment",
    "created": 1388422820,
    "parent_id": 0,
    "status": 1,
    "likes": 0,
    "user_like_action": false
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <id>3570325</id>
    <uid>45552</uid>
    <comment>this is a test comment</comment>
    <created>1388422820</created>
    <parent_id>0</parent_id>
    <status>1</status>
    <likes>0</likes>
    <user_like_action></user_like_action>
</result>

delete

Delete a comment (cannot be undone)

Path

DELETE https://api.schoology.com/v1/sections/{section_id}/assignments/{assignment_id}/comments/{id}

Content

none

Return

none