Users API

User represents the teacher and students in the system.

Signing in

POST /v1/auth/sign_in

Parameters

Name Description
email The email of user
password The password of user

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: j8Ji8bhHxobfQC400SawMQ
Client: ijpC0TXu-9ejCfgg7mqC3A
Uid: brennan.daniel@buckridgequigley.org
Host: example.org
Cookie: 

Route

POST /v1/auth/sign_in

Body

{"email":"brennan.daniel@buckridgequigley.org","password":"12345678"}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/auth/sign_in" -d '{"email":"brennan.daniel@buckridgequigley.org","password":"12345678"}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: j8Ji8bhHxobfQC400SawMQ" \
	-H "Client: ijpC0TXu-9ejCfgg7mqC3A" \
	-H "Uid: brennan.daniel@buckridgequigley.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
access-token: R9ksfHXIBs_oodnst_ldrg
token-type: Bearer
client: rkLMWY0qwXTPFwU6zE9PKQ
expiry: 1553262543
uid: brennan.daniel@buckridgequigley.org
Set-Cookie: _session_id=OWR0T0F0d0wycytld1lSVHE2YzhrakZ4OEpCanNHL0dtdzlybFVIajFndzZIaFphSHBsVTVZUHBoaEtaZFJQR2RnOVFRRlpGTCtkd0xnU1p0NHNkd1ZrZ2ErUGdnM3l4ZWRqQzJZYUdzZVQ0VW51ZGxEV2kvVDhLTHdpZG9DUWY1S3U5MFlpWEdlYmU4a245TU9GVEtieWZyS3BFaWE1MnUwSUlDQnVzbk82ZzVHZm9CaTZRQlNzanErc1phclZLLS1WMzdVVXdyK1lQZE40OGphTlJ6aCtBPT0%3D--69f1a959cbbbe50c5dd170c6e604efe789ec6933; path=/; HttpOnly
Vary: Origin
ETag: W/"203775008d12a7f06fe6e6841351eeda"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 203ac841-2415-475f-a5c0-1ef46f29eacf
X-Runtime: 0.355102
Content-Length: 805

Status

200 OK

Body

{
  "data": {
    "id": 8910,
    "email": "brennan.daniel@buckridgequigley.org",
    "teacher_id": null,
    "birthday": null,
    "provider": "email",
    "avatar_file_name": "",
    "avatar_content_type": null,
    "uid": "brennan.daniel@buckridgequigley.org",
    "name": "Esther Ramos",
    "submitter_request": "default",
    "avatar_file_size": null,
    "avatar_updated_at": null,
    "bookmarks_count": 0,
    "user_category_id": null,
    "score": 0.0,
    "follows_count": 0,
    "deleted_at": null,
    "description": "Eveniet qui omnis et temporibus ullam.",
    "likes_count": 0,
    "learning_objects_count": 0,
    "collections_count": 0,
    "cover_file_name": "",
    "cover_content_type": null,
    "cover_file_size": null,
    "cover_updated_at": null,
    "roles": [
      {
        "id": 1,
        "name": "teacher",
        "description": "This role represents a Teacher in Portal MEC."
      },
      {
        "id": 1,
        "name": "teacher",
        "description": "This role represents a Teacher in Portal MEC."
      }
    ]
  }
}