Skip to content

API Reference

Exams (GroutCode)

File uploads and hidden-test key custody for coding exams. Guide: GroutCode Coding Exams.

post/exams/{id}/files

Upload an exam file (starter.zip, sample-tests.zip, hidden-tests.zip.enc)

Scope exams:write

Parameters

  • idpath · stringrequired

Multipart form with a single file field (≤ 50 MB).

cURL
curl -X POST "https://serverless.grout.app/v1/exams/$ID/files" \
  -H "Authorization: Bearer $GROUT_API_KEY"
  -F "file=@./starter.zip"
put/exams/{id}/code-secret

Store the hidden-tests AES key (write-only custody)

Scope exams:write

Parameters

  • idpath · stringrequired

Body

  • hidden_key_b64string
cURL
curl -X PUT "https://serverless.grout.app/v1/exams/$ID/code-secret" \
  -H "Authorization: Bearer $GROUT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hidden_key_b64":"<hidden_key_b64>"}'
get/exams/{id}/code-secret/status

Whether a key is stored and how many students received it

Scope exams:read

Parameters

  • idpath · stringrequired
cURL
curl -X GET "https://serverless.grout.app/v1/exams/$ID/code-secret/status" \
  -H "Authorization: Bearer $GROUT_API_KEY"
post/exams/{id}/code-secret/release

Read back the hidden-tests key (institution role)

Scope exams:write

Parameters

  • idpath · stringrequired
cURL
curl -X POST "https://serverless.grout.app/v1/exams/$ID/code-secret/release" \
  -H "Authorization: Bearer $GROUT_API_KEY"