Skip to content

Commit 15324ae

Browse files
committed
Add more to the API
1 parent b0eb26a commit 15324ae

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

source/index.html.md

+51-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ search: true
1616

1717
*Note: API is still a work in progress.*
1818

19-
Most of the API is restricted to faculty, however the [Gradeables](#gradeables) section can be used by students or faculty.
19+
Most of the API is restricted to faculty, however the [Students](#students) section can be used by students or faculty.
2020
API provides an alternative way of interacting with Submitty. It facilitates testing, helps system administrators to modify resources and enables users to create customized frontends.
2121

2222
Note that as we rely on the Authorization header information to authenticate users, please make sure that you have a correct Apache configuration file as specified in [Installation Version Notes: v19.06.02](https://submitty.org/sysadmin/version_notes/v19.06.02).
@@ -325,8 +325,57 @@ This endpoint helps system administrators set up cron jobs for automatic grade s
325325

326326
`POST /api/<semester>/<course>/reports/summaries`
327327

328-
329328
# Gradeables
329+
330+
## Download Gradeable JSON
331+
332+
```shell
333+
curl --request GET \
334+
--url <base_url>/api/<semester>/<course>/<gradeable_id>/download \
335+
--header 'Authorization: my_token'
336+
```
337+
338+
This endpoint downloads the JSON representation of the gradeable with the given gradeable_id, course, and semester.
339+
This JSON file can be uploaded to add createa a new gradeable.
340+
341+
### HTTP Request
342+
343+
`GET /api/<semester>/<course>/<gradeable_id>/download`
344+
345+
### Parameters
346+
347+
Parameter | Description
348+
--------- | -----------
349+
semester | Semester of the gradeable
350+
course | Course of the gradeable
351+
gradeable_id | ID of the gradeable
352+
353+
354+
## Upload Gradeable JSON
355+
356+
```shell
357+
curl --request POST \
358+
--url <base_url>/api/<semester>/<course>/<gradeable_id>/download \
359+
--header 'Authorization: my_token'
360+
```
361+
362+
This endpoint downloads the JSON representation of the gradeable with the given gradeable_id, course, and semester.
363+
This JSON file can be uploaded to add createa a new gradeable.
364+
365+
### HTTP Request
366+
367+
`GET /api/<semester>/<course>/<gradeable_id>/download`
368+
369+
### Parameters
370+
371+
Parameter | Description
372+
--------- | -----------
373+
semester | Semester of the gradeable
374+
course | Course of the gradeable
375+
gradeable_id | ID of the gradeable
376+
377+
378+
# Students
330379
## Get gradeable values
331380

332381
```shell

0 commit comments

Comments
 (0)