-
Notifications
You must be signed in to change notification settings - Fork 0
Create Activity
David Alejandro Molano Vásquez edited this page May 8, 2020
·
2 revisions
To create an activity, an authenticated user with rol "Teacher" a POST
request most be sent to this endpoint.
The body of the request must provide the following fields:
- Title: The title of the text corresponding to the activity.
- Text: The text corresponding to the activity. This must be provided as a one line string.
- Date Close: The date on which the activity will no longer receive answers from students.
The response contains the id of the created activity.
URL | /api/activity/create |
---|---|
Method | POST |
URL Params | None |
Data Params | { "text": [string], "title": [string], "dateClose": [string]} |
Success Response Code: 201 |
{"act_id":[id_of_activity]} |
Error Response Code: 400 |
{"Error": "Request is missing required fields"} |
Error Response Code: 400 |
{"Error": "Invalid field"} |
Error Response Code: 500 |
{"Error": "Something went wrong"} |
The dateClose
string must be in the format "YYYY-MM-DD HH:MM"
.