> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidoc.dreamclass.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidoc.dreamclass.io/_mcp/server.

# GetAssignments

GET https://dreamclassapi/v1/assignments/list

Get the list of assignments.

Provide either classCourseId (assignments of a single class course) or semesterId (all class course assignments in a school period). If both are provided, classCourseId takes precedence.

classCourseId: Check the GetPeriodClassCourses call

semesterId: Check the GetSchoolPeriods call

Reference: https://apidoc.dreamclass.io/dream-class-api/assignments/get-assignments

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/assignments/list:
    get:
      operationId: get-assignments
      summary: GetAssignments
      description: >-
        Get the list of assignments.


        Provide either classCourseId (assignments of a single class course) or
        semesterId (all class course assignments in a school period). If both
        are provided, classCourseId takes precedence.


        classCourseId: Check the GetPeriodClassCourses call


        semesterId: Check the GetSchoolPeriods call
      tags:
        - assignments
      parameters:
        - name: classCourseId
          in: query
          description: Class course id (optional). Check the GetPeriodClassCourses call
          required: false
          schema:
            type: string
        - name: semesterId
          in: query
          description: School period id (optional). Check the GetSchoolPeriods call
          required: false
          schema:
            type: string
        - name: tenant
          in: header
          required: false
          schema:
            type: string
        - name: schoolCode
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1AssignmentsListGetResponsesContentApplicationJsonSchemaItems
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1AssignmentsListGetResponsesContentApplicationJsonSchemaItems:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        instructions:
          type: string
        status:
          type: integer
        startDate:
          type: string
          format: date
        dueDate:
          type: string
          format: date
        dueTime:
          type: string
        guid:
          type: string
        electronicSubmission:
          type: boolean
        allowLateSubmission:
          type: boolean
        classCourseId:
          type: integer
        professorSemesterInfoId:
          type: integer
        simpleGradeId:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - title
        - instructions
        - status
        - startDate
        - dueDate
        - dueTime
        - guid
        - electronicSubmission
        - allowLateSubmission
        - classCourseId
        - professorSemesterInfoId
        - simpleGradeId
        - createdAt
        - updatedAt
      title: >-
        DreamclassapiV1AssignmentsListGetResponsesContentApplicationJsonSchemaItems

```

## Examples



**Response**

```json
[
  {
    "id": 678,
    "title": "Algebra homework 1",
    "instructions": "<p>Complete exercises 1-10.</p>",
    "status": 2,
    "startDate": "2026-06-01",
    "dueDate": "2026-06-08",
    "dueTime": "23:59:00",
    "guid": "a1b2c3",
    "electronicSubmission": true,
    "allowLateSubmission": false,
    "classCourseId": 45,
    "professorSemesterInfoId": 87,
    "simpleGradeId": 564,
    "createdAt": "2026-05-30T12:00:00.000+00:00",
    "updatedAt": "2026-05-31T09:00:00.000+00:00"
  }
]
```

**SDK Code**

```python Assignments_GetAssignments_example
import requests

url = "https://https/dreamclassapi/v1/assignments/list"

querystring = {"classCourseId":"{{classCourseId}}","semesterId":"{{schoolPeriodId}}"}

headers = {
    "tenant": "{{tenant}}",
    "schoolCode": "{{schoolCode}}"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Assignments_GetAssignments_example
const url = 'https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D';
const options = {method: 'GET', headers: {tenant: '{{tenant}}', schoolCode: '{{schoolCode}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Assignments_GetAssignments_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("tenant", "{{tenant}}")
	req.Header.Add("schoolCode", "{{schoolCode}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Assignments_GetAssignments_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["tenant"] = '{{tenant}}'
request["schoolCode"] = '{{schoolCode}}'

response = http.request(request)
puts response.read_body
```

```java Assignments_GetAssignments_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D")
  .header("tenant", "{{tenant}}")
  .header("schoolCode", "{{schoolCode}}")
  .asString();
```

```php Assignments_GetAssignments_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D', [
  'headers' => [
    'schoolCode' => '{{schoolCode}}',
    'tenant' => '{{tenant}}',
  ],
]);

echo $response->getBody();
```

```csharp Assignments_GetAssignments_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D");
var request = new RestRequest(Method.GET);
request.AddHeader("tenant", "{{tenant}}");
request.AddHeader("schoolCode", "{{schoolCode}}");
IRestResponse response = client.Execute(request);
```

```swift Assignments_GetAssignments_example
import Foundation

let headers = [
  "tenant": "{{tenant}}",
  "schoolCode": "{{schoolCode}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/assignments/list?classCourseId=%7B%7BclassCourseId%7D%7D&semesterId=%7B%7BschoolPeriodId%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```