AssignmentSubmission
The AssignmentSubmission object
The AssignmentSubmission object looks like this in JSON:
{
"object": "assignment_submission",
"id": 6,
"assignment_id": 24668,
"student_id": 2921,
"comment": "comment #5",
"content": "blah blah",
"file_id": null,
"student_visibility": "visible",
"draft": false,
"student_submission": false,
"assignment_time_due": null,
"plagiarism_checks_visible_to_student": false,
"added_at": "2011-07-21T21:45:16+00:00",
"added_by_id": 2921,
"updated_at": null,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| assignment_id | Yes | int |
| student_id | Yes | int |
| comment | No | text |
| content | No | text |
| file_id | No | int |
| student_visibility | Yes | enum (visible, visible_after_grade_release, not_visible) |
| draft | Yes | bool |
| student_submission | Yes | bool |
| assignment_time_due | Yes | datetime |
| plagiarism_checks_visible_to_student | Yes | bool |
| added_at | Yes | datetime |
| added_by_id | No | int |
| updated_at | No | datetime |
| updated_by_id | No | int |
| deleted_at | No | datetime |
| deleted_by_id | No | int |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 0,
"results": 0,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [],
"sandbox": true
}
Retrieves all AssignmentSubmission objects tied to a specific Courseoffering.
HTTP Request
GET /courseofferings/(courseoffering)/assignments/(assignment)/submissions
Parameters
None
Permissions
One of the following roles is required to call this method:
- Academic Auditor
- Registrar
- Academic Admin
index (person)
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 0,
"results": 0,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [],
"sandbox": true
}
Retrieves all AssignmentSubmission objects tied to a specific Courseoffering.
HTTP Request
GET /courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)
Parameters
None
Expandable Properties
- file
- discussion
- faculty_grade
- peer_grades
Permissions
One of the following roles is required to call this method:
- Academic Auditor
- Registrar
- Academic Admin
comments
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 1,
"results": 1,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "assignment_submission",
"id": 8,
"assignment_id": 29656,
"student_id": 12,
"comment": "comment #55",
"content": "blah blah",
"file_id": null,
"student_visibility": "visible",
"draft": false,
"student_submission": false,
"assignment_time_due": null,
"plagiarism_checks_visible_to_student": false,
"added_at": "2011-07-21T21:45:16+00:00",
"added_by_id": 16,
"updated_at": null,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null
}
],
"sandbox": true
}
HTTP Request
GET /courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments
Parameters
None
Permissions
One of the following roles is required to call this method:
- Registrar
- Academic Admin
create_comment
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments/create" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X POST
-d '{
"comment": "I thought the introductory paragraph was too long."
}' \
require 'httparty'
response = HTTParty.post(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments/create',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:comment => 'I thought the introductory paragraph was too long.'
}.to_json
)
puts response.body
import requests
response = requests.post(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments/create',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'comment': 'I thought the introductory paragraph was too long.'
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments/create"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
comment = "I thought the introductory paragraph was too long."
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments/create');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'comment' => 'I thought the introductory paragraph was too long.'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
"Example response not available."
HTTP Request
POST /courseofferings/(courseoffering)/assignments/(assignment)/students/(person)/comments/create
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| comment | Yes | text | |
| internal | No | bool |
You can optionally include a file upload with this route. Use a form post parameter called "file". Read about request and response format to see how parameters need to be specified differently when there is a file upload.
Permissions
One of the following roles is required to call this method:
- Registrar
- Academic Admin
create
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X POST
-d '{
"comment": "The third paragraph needs a footnote."
}' \
require 'httparty'
response = HTTParty.post(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.post(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
"Example response not available."
Creates a new AssignmentSubmission object.
HTTP Request
POST /courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| content | No | text | |
| draft | No | bool | |
| comment | No | text |
You can optionally include a file upload with this route. Use a form post parameter called "file". Read about request and response format to see how parameters need to be specified differently when there is a file upload.
Permissions
One of the following roles is required to call this method:
- Registrar
- Academic Admin
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "assignment_submission",
"id": 9,
"assignment_id": 29656,
"student_id": 16,
"comment": "comment #57",
"content": "blah blah",
"file_id": null,
"student_visibility": "visible",
"draft": false,
"student_submission": false,
"assignment_time_due": null,
"plagiarism_checks_visible_to_student": false,
"added_at": "2011-07-21T21:45:16+00:00",
"added_by_id": 16,
"updated_at": null,
"updated_by_id": null,
"deleted_at": null,
"deleted_by_id": null,
"sandbox": true
}
Retrieves a specific AssignmentSubmission object.
HTTP Request
GET /courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Expandable Properties
- file
- discussion
- faculty_grade
- peer_grades
Permissions
One of the following roles is required to call this method:
- Academic Auditor
- Registrar
- Academic Admin
delete
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X DELETE
require 'httparty'
response = HTTParty.delete(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.delete(
'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)"), Method.Delete);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "assignment_submission",
"id": 9,
"deleted": true
}
Deletes an existing AssignmentSubmission object.
HTTP Request
DELETE /courseofferings/(courseoffering)/assignments/(assignment)/submissions/(person)/(assignmentsubmission)
Parameters
No additional parameters are needed beyond the ID of the object to delete that appears in the URL.
Permissions
One of the following roles is required to call this method:
- Registrar
- Academic Admin