Languages API

Languages are a set of languages which the learning objects can belong to, like portuguese, english and etc.

Creating a language

POST /v1/languages

Parameters

Name Description
language[name] The name of the language
language[code] The code of the language

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: EPM9YRoRngdIT6Lv80Yh2A
Client: 6qbyQMGoL6nHyLno6OAJ1w
Uid: elwyn@bernhard.info
Host: example.org
Cookie: 

Route

POST /v1/languages

Body

{"language":{"name":"qui","code":"IT"}}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/languages" -d '{"language":{"name":"qui","code":"IT"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: EPM9YRoRngdIT6Lv80Yh2A" \
	-H "Client: 6qbyQMGoL6nHyLno6OAJ1w" \
	-H "Uid: elwyn@bernhard.info"

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=clcwN0pNTDFHaCswamhjVk1SV0QvVHN3SGJINk5ZMW9VdDRKbGNMMGQzVUxiWUk1OWl4MVYwZDBRUkhSZ3ZiU0Vva2J0TlB6aGxjZ3R3a08yYWhHMFFyOSs5dEVEcTVSOUVrSWZKN25WMkpBNXJibElGVUJsSjBGQnpGNDM3SUdyWmdLc2IzWlJGd2J4MjFQZFZkNXgrT054YzNFelRzNUp5UFByUTNpcDJhN0pJMitGTnpjY1ZJVTBHYkdBZzFWLS1kZlZOTFRUZHVnbERkcFlUcWkxc3p3PT0%3D--cad4ffa64b21230c69eedb827a3dca73c5c8126f; path=/; HttpOnly
Vary: Origin
ETag: W/"1ce211bf4c4e2b7da8e636d11167ea48"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: ee42b6a8-1440-4a47-8656-8bc5d932f9b6
X-Runtime: 0.101684
Content-Length: 34

Status

201 Created

Body

{
  "id": 11,
  "name": "qui",
  "code": "IT"
}