FR from Taico, who previously scraped assignment/submissions pages to get the required data.
Needed for CPL in Q3

Idea is to add API support for reading submission data, in json format, with the following endpoints:

  • submissions which returns the set of submissions for a given assignment id with:
    • student id
    • grade
    • lastSaved timestamp
  • submission which returns the following submission data for a given assignment id and student id (netid/username/studnr)
    • solution text
    • code with [solution, test] fields
    • grade
    • lastSaved timestamp
  • assignment which returns the following assignment data for a given assignment id
    • question text
    • code with [solution, library, solution template, user test template, spec test] fields

API access:

  • should be configurable at any level, allowing accessing data for that assignment and all sub-assignments recursively.
  • will be done using an API key
  • may only be visible to the person who configured the key, and access to this key can be mapped to the person’s account (so managers who are not manager at a sub-level, because of overridden set of managers, cannot access the data using the API key)
  • The API will return json data
Submitted by Elmer van Chastelet on 24 August 2021 at 13:09

On 20 December 2021 at 11:29 Elmer van Chastelet removed tag 1.11.0

On 20 December 2021 at 11:29 Elmer van Chastelet tagged 1.13.0

On 4 February 2022 at 11:01 Elmer van Chastelet commented:

In this first version, only administrators can enable the API, after which course staff can access the configuration section (in edit assignment). The API requires parameters to be passed as query string, which are to be sighed with a HMAC (SHA256) signature based on a generate secret key (available from the configuration section), to be appended to the query string.

The API uses the following scheme:

/api/V0/GET/TYPE?apikey=APIKEY&assignment=ASSIGNMENTID&student=STUDENTID&timestamp=TIMESTAMP&signature=HMAC_SHA256_SIGNATURE

with TYPEs SUBMISSIONS ASSIGNMENT and SUBMISSION where the parameter student is only needed when type is SUBMISSION.

The data returned is depending on the type of assignment, but is currently limited to return question-specific fields for Programming Questions only (needed for this year’s CPL).


On 4 February 2022 at 11:01 Elmer van Chastelet closed this issue.

Log in to post comments