Discussion Thread

Discussion threads can be made for any realm except users.


Fields

FieldNameDescriptionTypeRequired
title Title The thread title string yes
body Thread Body The thread body string
graded Graded Whether or not the discussion is graded integer {0,1}
due Due Date When the assignment is due datetime
(YYYY-MM-DD HH:MM:SS)
grade_item_id Grade Item ID The Id of the grade item associated with this discussion. Mostly used for grades. integer
grading_scale Grading Scale The ID of the grading scale for this assignment. For no grading scale, use "0". Course grading scales can be found on the course Grade Setup page. integer default: 0
grading_period Grading Period The grading period ID to which this assignment belongs. For "Other", use "0". integer default: 0
grading_category Grading Category The grading category ID to which this assignment belongs integer default: 0
max_points Maximum Points The maximum number of points for this assignment (excl. extra credit) float default: 100
factor Factor The relative weight of this assignment float default: 1.0
is_final Is a Final Mark this assignment as a midterm or final {0,1} default: 0
published Published Whether or not the discussion is published. Only applies to section discussions NOT associated with topics. {0,1} default: 1
require_initial_post Requires Initial Post Flag indicating whether a member needs to participate before seeing other member posts {0,1} default: 0

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}
Course Sections sections/{id}
Groups groups/{id}

create

Create a discussion thread

Path

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

Content

An object containing discussion thread fields

JSON
{
    "title": "Example topic",
    "body": "Let's talk about APIs",
    "graded": "0"
}
XML
<body>
  <title>Example topic</title>
  <body>Let's talk about APIs</body>
  <graded>0</graded>
</body>
Return

An object containing discussion thread fields

JSON
{
    "id": 5692161,
    "uid": 45552,
    "title": "Example topic",
    "body": "Let's talk about APIs",
    "weight": 20,
    "graded": 0,
    "published": 1,
    "available": 0,
    "completed": 0,
    "comments_closed": 0,
    "links": {
        "self": "http:\/\/...\/discussions\/5692161"
    }
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <id>5692161</id>
    <uid>45552</uid>
    <title>Example topic</title>
    <body>Let's talk about APIs</body>
    <weight>20</weight>
    <graded>0</graded>
    <published>1</published>
    <available>0</available>
    <completed>0</completed>
    <comments_closed>0</comments_closed>
    <links>
        <self>http://.../discussions/5692161</self>
    </links>
</result>

list

View a list discussion threads (paged). The following query strings can (optionally) be appended:

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

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

Content

none

Return

A collection of discussion objects, each one containing discussion thread fields

JSON
{
    "discussion": [
        {
            "id": 5692161,
            "uid": 45552,
            "title": "Example topic",
            "body": "Let's talk about APIs",
            "weight": 20,
            "graded": 0,
            "published": 1,
            "available": 1,
            "completed": 0,
            "comments_closed": 0,
            "completion_status": "",
            "links": {
                "self": "http:\/\/...\/discussions\/5692161"
            }
        },
        {
            "id": 5692163,
            "uid": 45552,
            "title": "Example topic 2",
            "body": "Let's talk about APIs",
            "weight": 30,
            "graded": 0,
            "published": 1,
            "available": 1,
            "completed": 0,
            "comments_closed": 0,
            "completion_status": "",
            "links": {
                "self": "http:\/\/...\/discussions\/5692163"
            }
        }
    ],
    "total": 2,
    "links": {
        "self": "http:\/\/...\/discussions?start=0&limit=20"
    }
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <discussion>
        <id>5692161</id>
        <uid>45552</uid>
        <title>Example topic</title>
        <body>Let's talk about APIs</body>
        <weight>20</weight>
        <graded>0</graded>
        <published>1</published>
        <available>1</available>
        <completed>0</completed>
        <comments_closed>0</comments_closed>
        <completion_status />
        <links>
            <self>http://.../discussions/5692161</self>
        </links>
    </discussion>
    <discussion>
        <id>5692163</id>
        <uid>45552</uid>
        <title>Example topic 2</title>
        <body>Let's talk about APIs</body>
        <weight>30</weight>
        <graded>0</graded>
        <published>1</published>
        <available>1</available>
        <completed>0</completed>
        <comments_closed>0</comments_closed>
        <completion_status />
        <links>
            <self>http://.../discussions/5692163</self>
        </links>
    </discussion>
    <total>2</total>
    <links>
        <self>http://.../discussions?start=0&amp;limit=20</self>
    </links>
</result>

view

View a specified discussion thread. The following query strings can (optionally) be appended:

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

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

Content

none

Return

An object containing discussion thread fields

JSON
{
    "id": 5692161,
    "uid": 45552,
    "title": "Example topic",
    "body": "Let's talk about APIs",
    "weight": 20,
    "graded": 0,
    "published": 1,
    "available": 1,
    "completed": 0,
    "comments_closed": 0,
    "completion_status": ""
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
	<id>5692161</id>
	<uid>45552</uid>
	<title>Example topic</title>
	<body>Let's talk about APIs</body>
	<weight>20</weight>
	<graded>0</graded>
	<published>1</published>
	<available>1</available>
	<completed>0</completed>
	<comments_closed>0</comments_closed>
	<completion_status />
</result>

update

Modify a discussion thread

Path

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

Content

An object containing discussion thread fields

JSON
{
    "body": "Let's talk about APIs and REST clients"
}
XML
<body>
  <body>Let's talk about APIs and REST clients</body>
</body>
Return

none

delete

Delete a discussion thread (cannot be undone)

Path

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

Content

none

Return

none