Users API

User represents the teacher and students in the system.

Creating an user

POST /v1/auth

Parameters

Name Description
name The name of the user
email The email of user
description The user description
password The password of user
password_confirmation The password confirmation of user
terms_of_service Checks if user agreed with terms of service
avatar The user avatar

Request

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Route

POST /v1/auth

Body

{"name":"Alessandra Rocha","email":"guie.lindgren@schimmel.co","description":"Cum minima autem odit facilis placeat temporibus debitis sapiente.","password":"12345678","password_confirmation":"12345678","terms_of_service":true,"avatar":""}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/auth" -d '{"name":"Alessandra Rocha","email":"guie.lindgren@schimmel.co","description":"Cum minima autem odit facilis placeat temporibus debitis sapiente.","password":"12345678","password_confirmation":"12345678","terms_of_service":true,"avatar":""}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
access-token: hpNgEKq3pLNjBH34X44wQg
token-type: Bearer
client: 9vT2jzsJcIBuC9HZvd8N6Q
expiry: 1553262541
uid: guie.lindgren@schimmel.co
Content-Type: application/json; charset=utf-8
Vary: Origin
ETag: W/"73d2e0669932356482a219068fe24bff"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 620dafa8-5d34-4b75-a404-f6cf1a4ef1b8
X-Runtime: 0.207747
Content-Length: 876

Status

200 OK

Body

{
  "status": "success",
  "data": {
    "id": 8884,
    "email": "guie.lindgren@schimmel.co",
    "provider": "email",
    "avatar_file_name": null,
    "avatar_content_type": null,
    "cover_file_name": null,
    "cover_content_type": null,
    "dspace_handle": null,
    "dspace_sets": [

    ],
    "dspace_url": null,
    "uid": "guie.lindgren@schimmel.co",
    "created_at": "2019-03-08T13:49:01.645Z",
    "updated_at": "2019-03-08T13:49:01.829Z",
    "name": "Alessandra Rocha",
    "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": "Cum minima autem odit facilis placeat temporibus debitis sapiente.",
    "likes_count": 0,
    "learning_objects_count": 0,
    "collections_count": 0,
    "nickname": null,
    "cover_file_size": null,
    "cover_updated_at": null,
    "education": null,
    "submitter_request": "default",
    "teacher_id": null,
    "birthday": null,
    "school_id": null,
    "terms_accepted_at": null,
    "cpf": null
  }
}