Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

yotta / pictogram

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 60
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Restapivalidloginsupervisor

Restapivalidloginsupervisor

Last edited by Arturo Montejo Ráez Dec 24, 2015
Page history

<< Supervisor

Login supervisor

Operación

POST /sup/login

Petición

Se pasa un objeto JSON con el email y password del supervisor.

  • email (string): Email del supervisor
  • password (string): Contraseña del supervisor

Ejemplo de petición:

POST /sup/login

{
    "email": "belen.perez@autismojaen.es",
    "password": "hnuT8j"
}

Respuesta

Se devuelve un objeto con el supervisor, su token y el tiempo en milisegundos del servidor (para sincronización) desde 1 Enero 1970 00:00:00. Dicho tiempo es el que puede pasarse directamente al constructor Date(milisenconds) para generar un objeto tiempo con el tiempo del servidor (OJO: hay tener en cuenta el tiempo transcurrido desde que se genera el tiempo en el servidor y se procesa por el cliente).

Ejemplo de respuesta:

{
    "user": {
       "office": {
         "id": 383,
         "name": "Comunicación Aumentativa JAén (CAJA)",
         "address": "Paraje Las Lagunillas, Ed A3, primera plata, 23071. Jaén",
         "email": "dofer@ujaen.es",
         "phone1": "+34 953 21 28 88",
         "phone2": null,
         "lang": "es-es",
         "country": "ES",
         "admin": 23,
         "contactPerson": "Fernando Martínez Santiago",
         "maxStudents": 2,
         "currentStudents": 0
        },
        "id": 43,
        "name": "Belén",
        "surname": "Pérez Vílchez",
        "gender": "F",
        "pic": null,
        "address": null,
        "country": null,
        "email": "belen.perez@autismojaen.es",
        "phone": null,
        "lang": "es",
        "ttsEngine": "IVONA Text-to-Speech HQ"
    },
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvZmZpY2UiOm51bGwsImlkIjo0MywibmFtZSI6IkJlbMOpbiIsInN1cm5hbWUiOiJQw6lyZXogVsOtbGNoZXoiLCJnZW5kZXIiOiJGIiwicGljIjpudWxsLCJhZGRyZXNzIjpudWxsLCJjb3VudHJ5IjpudWxsLCJlbWFpbCI6ImJlbGVuLnBlcmV6QGF1dGlzbW9qYWVuLmVzMiIsInBob25lIjpudWxsLCJsYW5nIjoiZXMiLCJ0dHNFbmdpbmUiOiJJVk9OQSBUZXh0LXRvLVNwZWVjaCBIUSIsImlhdCI6MTQyNzg3NTAyNiwiZXhwIjoxNDI3ODgyMjI2fQ.nZyBS8iIQRS9iGdzyXpbGEstFLXQjhkQZt9QNF31JBY",
   "server_time": 1450980322069
}
  Clone repository
  • 20170328_isabellemonfort
  • 20170328_luisballesteros
  • 20170328_luisperez
  • Apiaction
  • Apiadminvalid
  • Apiattribute
  • Apidevicevalid
  • Apienrolment
  • Apiinstructionresource
  • Apiinstructionvalid
  • Apilearningunitresource
  • Apimetamethodvalid
  • Apimethod
  • Apimethodresource
  • Apimethodvalid
More Pages
×

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.