curl so you can run them directly from your terminal without any additional tooling.
Prerequisites
- Bearer token — You need a valid admin-scoped Bearer token before making any API call. See the Authentication guide for instructions on obtaining and refreshing your token.
- A homework submission to grade — Steps 3 and 4 reference specific resource IDs (
42for a homework,101for a submission). Replace these with real IDs from your account as you follow along.
1
Set up your request headers
Every vClasses API request requires two headers. Set them once in your HTTP client or export them as shell variables so you do not have to repeat them in every command.In With
curl, you pass headers with the -H flag. All examples in this guide use the following shell variable pattern so the headers stay readable:$TOKEN set in your shell, you can copy and run every subsequent example without modification beyond replacing resource IDs.2
List homework classes
Retrieve a paginated list of all homework assignments visible to your admin account. This is typically the first call you make when building a review queue or a reporting dashboard.Example response:The response wraps all records in a
data array and includes pagination metadata. Use the page query parameter — e.g., ?page=2 — to advance through additional pages. The submissions_count and graded_count fields give you an at-a-glance progress indicator for each assignment.3
Retrieve a single homework
Once you have a homework ID from the list, fetch its full detail record. This includes the complete assignment metadata and is useful for displaying assignment details in a student or instructor view.Example response:The
submissions array lists every student submission linked to this homework. A status of "pending_review" means the submission has not yet been graded. Note the submission id field — you will pass that value to the grading endpoint in the next step.4
Grade a submission
Record a numerical rating and written feedback for a specific student submission. You target the submission by its ID (here, A
101) in the endpoint path and pass the grade data as a JSON body.Example success response:
200 OK response with "status": "graded" confirms the grade was saved. The student can now see their score and feedback through the student-facing status endpoint. If you need to correct a grade, call the same endpoint again with updated values — the latest submission always overwrites the previous grade.
