Users API

User represents the teacher and students in the system.

Add an user teacher

POST /v1/users/:id/add_teacher

Parameters

Name Description
id The id of the user who asked to be a teacher
approves If the user can be a teacher or not

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: _2rNxMQClXu5za_eCVVwLg
Client: --fs0_nuNQAIMFBDVQ7iYg
Uid: velda_ankunding@bode.net
Host: example.org
Cookie: 

Route

POST /v1/users/9256/add_teacher

Body

{"approves":true}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/users/9256/add_teacher" -d '{"approves":true}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: _2rNxMQClXu5za_eCVVwLg" \
	-H "Client: --fs0_nuNQAIMFBDVQ7iYg" \
	-H "Uid: velda_ankunding@bode.net"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/plain; charset=utf-8
Set-Cookie: _session_id=MVBUdndndDRPbk5mY2docnR6Yk9qUTRwY2VhZXBNU2cxeUt5WUFMNEwxTENJOGRDR0xsc2pESFF1ZTRNczBlaExVcG1ZOGZSclJpRDlPRWFHYTVVa1U0eXByTEg1ZEJWY2luY1VOOVpMam9yc3JUUnFrRnhCVUpoRXdxNXRaNEY5MVJad0ZBMDYxdHBEUXdORjlMMjV6WEtsS1g3UWY2dTNHK3VBMnZ0Tm0xRW9wRWorTG1GRGFTSDZhUHVVMFZlLS1yRUR4UjM4RWtGSEdwZUhwelVlbkNRPT0%3D--54f72ab267a3523cc49944131572dd5a105536a4; path=/; HttpOnly
Vary: Origin
ETag: W/"36a9e7f1c95b82ffb99743e0c5c4ce95"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 1586dcef-a5eb-4976-b0bf-1e4c0a63927d
X-Runtime: 0.165131
Content-Length: 1

Status

200 OK

Body