Function headless_lms_server::controllers::study_registry::completion_registered_to_study_registry::post_completions
source · async fn post_completions(
req: HttpRequest,
payload: Json<Vec<RegisteredCompletion>>,
pool: Data<PgPool>
) -> ControllerResult<HttpResponse>
Expand description
POST /api/v0/completion-registered-to-study-registry
- Post an array of registered completions to be marked as registered to the study registry.
This endpoint is only available to authorized study registries, and requires a valid authorization token to access.
The endpoint takes an array of RegisteredCompletion structs.
Example request:
POST /api/v0/completion-registered-to-study-registry HTTP/1.1
Authorization: Basic documentationOnlyExampleSecretKey-12345
Content-Type: application/json
[
{
"completion_id": "d8e0e1b3-af5f-412d-86e4-0ec51966ecdd",
"student_number": "012345678",
"registration_date": "2022-06-21T00:00:00Z"
}
]