Media Album Comments

Fields

FieldNameDescriptionTypeRequired
content_id Content ID The ID of the content related to the comment integer yes
uid User ID The ID of the user who created the comment integer
comment Comment The comment text string
created Created timestamp The unix timestamp when the comment was created integer

Operations

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

Realm Path
Course Sections sections/{id}
Groups groups/{id}

create

Create a comment

Path

new endpoint as of 2/15/15:

POST https://api.schoology.com/v1/[realm]/albums/{id}/content/{content_id}/comments

supported but not maintained as of 2/15/15:

POST https://api.schoology.com/v1/album/{id}/content/{content_id}/comments
Content

An object containing comment fields

JSON
{
    "comment": "nice pic!"
}
XML
<body>
  <comment>nice pic!</comment>
</body>
Return

An object containing comment fields

JSON
{
    "id": 229,
    "content_id": 0,
    "uid": 45552,
    "comment": "This is a media album comment",
    "created": 0,
    "status": 0,
    "links": {
        "self": "http:\/\/...\/comments\/229"
    }
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <id>229</id>
    <content_id>0</content_id>
    <uid>45552</uid>
    <comment>This is a media album comment</comment>
    <created>0</created>
    <status>0</status>
    <links>
        <self>http://.../comments/229</self>
    </links>
</result>

list

View a list of comments (paged)

Path

new endpoint as of 2/15/15:

GET https://api.schoology.com/v1/[realm]/albums/{id}/content/{content_id}/comments

supported but not maintained as of 2/15/15:

GET https://api.schoology.com/v1/album/{id}/content/{content_id}/comments
Content

none

Return

A collection of comment objects, each one containing comment fields

JSON
{
    "comment": [
        {
            "id": 229,
            "content_id": 17861,
            "uid": 45552,
            "comment": "This is a media album comment",
            "created": 1388420575,
            "status": 1
        }
    ]
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <comment>
        <id>229</id>
        <content_id>17861</content_id>
        <uid>45552</uid>
        <comment>This is a media album comment</comment>
        <created>1388420575</created>
        <status>1</status>
    </comment>
</result>

view

View a specified comment

Path

new endpoint as of 2/15/15:

GET https://api.schoology.com/v1/[realm]/albums/{id}/content/{content_id}/comments/{comment_id}

supported but not maintained as of 2/15/15:

GET https://api.schoology.com/v1/album/{id}/content/{content_id}/comment/{comment_id}
Content

none

Return

An object containing comment fields

JSON
{
    "id": 229,
    "content_id": 17861,
    "uid": 45552,
    "comment": "This is a media album comment",
    "created": 1388420575,
    "status": 1
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
	<id>229</id>
	<content_id>17861</content_id>
	<uid>45552</uid>
	<comment>This is a media album comment</comment>
	<created>1388420575</created>
	<status>1</status>
</result>

delete

Delete a comment (cannot be undone)

Path

new endpoint as of 2/15/15:

DELETE https://api.schoology.com/v1/[realm]/albums/{id}/content/{content_id}/comments/{comment_id}

supported but not maintained as of 2/15/15:

DELETE https://api.schoology.com/v1/album/{id}/content/{content_id}/comment/{comment_id}
Content

none

Return

none