Start Assignment Endpoint

The POST /assignments/instance endpoint starts a specific assignment for a specific student.

Request

This endpoint takes the following JSON object as the request body:

Field NameJSON Data TypeRequiredDescription

assignment_id

string

The Unique ID of the assignment, retrieved from the Load Assignment Endpoint.

student_name

string

The name of the student.

student_email

string

The student's email address.

Response

For successful requests, the response code will be 201 Created and the response body will be a JSON object containing the following fields:

Field NameJSON Data TypeDescription

instance_id

string

The Unique ID of this assignment instance.

instance_url

string

The URL of this assignment instance.

Example

An example request to this endpoint is:

curl -X POST https://app.assignment-os.com/api/assignments/instance \
  -H 'Authorization: apiKey 5a355e5a-8e1b-4dab-a17c-4ab49fc267c3' \
  -H 'Content-Type: application/json' \
  -d '{
    "assignment_id": "6vb0aa8d-0d2a-4e0d-8a63-a738ab62fa0b",
    "student_name": "John Smith",
    "student_email": "john.smith@example.edu"
}'

The body of the response to this request would be:

{
    "instance_id": "67961167-20c6-4183-9b6b-6033ba61ba76",
    "instance_url": "https://app.assignment-os.com/student/assignment/67961167-20c6-4183-9b6b-6033ba61ba76"
}

Last updated