Institutions API

Institutions can be schools, universities, or any other institution.

Creating an institution

POST /v1/institutions

Parameters

Name Description
name The name of the institution
description The description of the institution
address The address of the institution
city The city of the institution
country The country of the institution

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: -WLX1xNvl_7et4_sN2-82w
Client: _37PWLWGLPASCaS8UBcBJw
Uid: luis@howell.org
Host: example.org
Cookie: 

Route

POST /v1/institutions

Body

{"name":"Srta. Bruna Franco","description":"Culpa qui est quo magnam officiis aspernatur voluptatem. Placeat eveniet beatae cumque libero. Saepe eum voluptas maiores et praesentium quidem. Sed dolorum et quae consequuntur pariatur voluptatem aut.","address":"73018 Alameda Gúbio","city":"Grande Ígor do Norte","country":"Mali"}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/institutions" -d '{"name":"Srta. Bruna Franco","description":"Culpa qui est quo magnam officiis aspernatur voluptatem. Placeat eveniet beatae cumque libero. Saepe eum voluptas maiores et praesentium quidem. Sed dolorum et quae consequuntur pariatur voluptatem aut.","address":"73018 Alameda Gúbio","city":"Grande Ígor do Norte","country":"Mali"}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: -WLX1xNvl_7et4_sN2-82w" \
	-H "Client: _37PWLWGLPASCaS8UBcBJw" \
	-H "Uid: luis@howell.org"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Set-Cookie: _session_id=Z0FDOEdyMFpmYi90dlRZSE03MDYveWlEZ28rOC9LR1V0ZnZ0OGlaeXhyUnFsOHVTVHFidlhoU3dqN3ZBbUVKcDhHcHpXc0gwK05IYnR0TU9ZZHliNnNQRTc2SW9yUWNBT25PbDR5V1pvZExSM1kxcW80RWNhQ3VwcDE1TXNXRmUrY3huS0hGWU5JZGtISkJPZmgwcGIyRkUrVkY4eE1ZUnNxcmxZTk43VWhiVnVIZDBRbEVSOHlZdnAxV25LTE11LS1YeUNhdnZmcTdXeWwrbDRQVUkvZEJnPT0%3D--27fd490cc630f3b716062b87c13ebeb7e1436380; path=/; HttpOnly
Vary: Origin
ETag: W/"ffb6763fa5fb4632ff6a2e90249aa21a"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 96953b96-0bed-4584-8097-2e9d9f4552cc
X-Runtime: 0.099257
Content-Length: 429

Status

201 Created

Body

{
  "id": 43,
  "name": "Srta. Bruna Franco",
  "description": "Culpa qui est quo magnam officiis aspernatur voluptatem. Placeat eveniet beatae cumque libero. Saepe eum voluptas maiores et praesentium quidem. Sed dolorum et quae consequuntur pariatur voluptatem aut.",
  "address": "73018 Alameda Gúbio",
  "city": "Grande Ígor do Norte",
  "country": "Mali",
  "avatar": "",
  "created_at": "2019-10-31T13:36:15.698Z",
  "updated_at": "2019-10-31T13:36:15.698Z"
}