Tag API - rw-moore/SciLO GitHub Wiki
GET /tags
-
Request
-
Headers
Authorization: Basic aGFvdGlhbnpodToxMjM0NTY=
-
-
Response 200 (application/json)
-
Headers
Allow: GET, POST, HEAD, OPTIONS X-Frame-Options: SAMEORIGIN Vary: Accept, Cookie
-
Body
{"tags":[{"name":"math102","id":2},{"name":"math103","id":3},{"name":"ez","id":4},{"name":"math","id":5},{"name":"math2","id":1}],"length":5,"status":"success"}
-
GET /tags/4/questions
-
Request
-
Headers
Authorization: Basic aGFvdGlhbnpodToxMjM0NTY=
-
-
Response 200 (application/json)
-
Headers
Allow: GET, HEAD, OPTIONS X-Frame-Options: SAMEORIGIN Vary: Accept, Cookie
-
Body
{"status":"success","length":1,"questions":[{"id":3,"tags":[{"name":"ez","id":4},{"name":"math","id":5}],"title":"ez2","background":"some sample math questions","weight":100,"create_date":"2019-05-19T02:04:47.330089Z","last_modify_date":"2019-05-19T02:04:47.330101Z","author":{"institute":"","last_login":null,"username":"","first_name":"","last_name":"","email":"","date_joined":null,"password":""},"quizzes":[],"responses":[]}]}
-
POST /tags
-
Request (application/json; charset=utf-8)
-
Headers
Authorization: Basic aGFvdGlhbnpodToxMjM0NTY=
-
Body
{ "name": "math103" }
-
-
Response 400 (application/json)
-
Headers
Allow: GET, POST, HEAD, OPTIONS X-Frame-Options: SAMEORIGIN Vary: Accept, Cookie
-
Body
{"status":"unsuccess","errors":"tag with this name already exists."}
-
PATCH /tags/1
-
Request (application/json; charset=utf-8)
-
Headers
Authorization: Basic aGFvdGlhbnpodToxMjM0NTY=
-
Body
{ "name": "math2" }
-
-
Response 200 (application/json)
-
Headers
Allow: GET, PATCH, DELETE, HEAD, OPTIONS X-Frame-Options: SAMEORIGIN Vary: Accept, Cookie
-
Body
{"status":"success"}
-