All you can find in our API Rest is information about users, loans, fines (penalties), resources, types, copies and genres. All you need to do is simply; you have to follow the API rules. If you try to do following a different way, it's probably what you will recieve an error.
- Download Postman.
- You only can send GET, POST, PUT and DELETE requests.
The resource API has GET, POST, PUT and DELETE methods. http: // localhost: 8080 followed by the containt request URL.
All API queries have been preceded by /api
Allows a user to log in.
-
< /login >
-
GET
-
{ "id": 1, "name": "User", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "2018-03-17/11:44:21", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }
-
Code: 401 UNAUTHORIZED
Allows a user to log out.
-
< /logout >
-
GET
-
true
-
Code: 404 NOT FOUND
-
The following queries will be preceded by /Admin.
Resource to show all users with their data.
-
< /UserData >
-
GET
-
- page=[int]
- size=[int]
-
-
URL
/api/Admin/UserData/?page=1&size=10
-
-
{ "totalElements": 44, "totalPages": 5, "number": 1, "size": 10, "first": false, "last": false, "content": [ { "id": 11, "name": "user 7", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 12, "name": "user 8", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 13, "name": "user 9", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 14, "name": "user 10", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 15, "name": "user 11", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 16, "name": "user 12", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 17, "name": "user 13", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 18, "name": "user 14", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 19, "name": "user 15", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 }, { "id": 20, "name": "user 16", "email": "[email protected]", "level": 1, "points": 0, "streak": 0, "fluency": 0, "dailyGoal": 0, "lastConnection": "-", "lastUnit": 0, "lastLesson": 0, "progress": null, "remainingGoals": 0, "exp": 0 } ] }
-
Code: 401 UNAUTHORIZED
Resource to obtain an excel with the data of the users.
-
< /UserData/Excel >
-
GET
-
file: user_list.xls
-
Code: 403 FORBIDDEN
The following queries will be preceded by /User.
-
< />
-
GET
-
{ "id": 1, "name": "user", "email": "[email protected]", "level": 2, "points": 12, "streak": 1, "fluency": 16, "dailyGoal": 1, "lastConnection": "2018-03-17/18:36:07", "lastUnit": 1, "lastLesson": 1, "progress": [ 0, 1, 0, 0, 0, 0, 0 ], "remainingGoals": 0, "exp": 0 }
-
Code: 401 UNAUTHORIZED
-
< /Name>
-
PUT
-
{ "newName": "Contafin" }
-
{ "id": 1, "name": "Contafin", "email": "[email protected]", "level": 2, "points": 12, "streak": 1, "fluency": 16, "dailyGoal": 1, "lastConnection": "2018-03-17/18:36:07", "lastUnit": 1, "lastLesson": 1, "progress": [ 0, 1, 0, 0, 0, 0, 0 ], "remainingGoals": 0, "exp": 0 }
-
Code: 401 UNAUTHORIZED or 400 BAD REQUEST
-
< /Email>
-
PUT
-
{ "newEmail": "[email protected]" }
-
{ "id": 1, "name": "Contafin", "email": "[email protected]", "level": 2, "points": 12, "streak": 1, "fluency": 16, "dailyGoal": 1, "lastConnection": "2018-03-17/18:39:23", "lastUnit": 1, "lastLesson": 1, "progress": [ 0, 1, 0, 0, 0, 0, 0 ], "remainingGoals": 0, "exp": 0 }
-
Code: 401 UNAUTHORIZED or 400 BAD REQUEST
-
< /Password>
-
PUT
-
{ "newPass": "******" "oldPass": "******" }
-
{ "id": 1, "name": "Contafin", "email": "[email protected]", "level": 2, "points": 12, "streak": 1, "fluency": 16, "dailyGoal": 1, "lastConnection": "2018-03-17/18:40:02", "lastUnit": 1, "lastLesson": 1, "progress": [ 0, 1, 0, 0, 0, 0, 0 ], "remainingGoals": 0, "exp": 0 }
-
Code: 401 UNAUTHORIZED or 400 BAD REQUEST
-
< /Goal>
-
PUT
-
{ "goal": "1" }
-
{ "id": 1, "name": "Contafin", "email": "[email protected]", "level": 2, "points": 12, "streak": 1, "fluency": 16, "dailyGoal": 3, "lastConnection": "2018-03-17/18:45:36", "lastUnit": 1, "lastLesson": 1, "progress": [ 0, 1, 0, 0, 0, 0, 0 ], "remainingGoals": 3, "exp": 0 }
-
Code: 401 UNAUTHORIZED or 400 BAD REQUEST
-
< /Photo>
-
POST
-
file: image file format (*.jpg, *.jpeg, *.png)
-
Code: 401 UNAUTHORIZED or 400 BAD REQUEST or 500 INTERNAL SERVER ERROR
-
< />
-
DELETE
-
- Code: 404 NOT FOUND or 401 UNAUTHORIZED
The following queries will be preceded by /Unit.
-
< / >
-
GET
-
Empty
-
-
URL
/api/Unit/
-
-
{ "totalElements": 2, "totalPages": 1, "number": 0, "size": 20, "first": true, "last": true, "content": [ { "id": 1, "name": "Unidad 1" }, { "id": 2, "name": "Unidad 2" } ] }
-
< /{id} >
-
GET
-
id=[long]
-
-
URL
/api/Unit/1
-
-
{ "id": 1, "name": "Unidad 1" }
-
Code: 404 NOT FOUND
-
< / >
-
POST
-
Empty
-
-
URL
/api/Unit/
-
-
{ "name": "Unidad 3", "lessons": [ { "id": 7, "name": "Lección 1 Unidad 3", "exercises": [ { "kind": 1, "statement": "Enunciado 1", "texts": [ "Opcion 1", "Opcion 2","Opcion 3" ], "answer": { "result": "dos" } }, { "kind": 2, "statement": "Enunciado 2", "answer": { "result": "Este texto es de prueba" } }, { "kind": 5, "statement": "Enunciado 3", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "uno" } }, { "kind": 7, "statement": "Enunciado 4", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "tres" } } ] }, { "id": 8, "name": "Lección 2 Unidad 3", "exercises": [ { "kind": 1, "statement": "Enunciado 1", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "dos" } }, { "kind": 2, "statement": "Enunciado 2", "answer": { "result": "Este texto es de prueba" } }, { "kind": 5, "statement": "Enunciado 3", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "uno" } }, { "kind": 7, "statement": "Enunciado 4", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "tres" } } ] }, { "id": 9, "name": "Lección 3 Unidad 3", "exercises": [ { "kind": 1, "statement": "Enunciado 1", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "dos" } }, { "kind": 2, "statement": "Enunciado 2", "answer": { "result": "Este texto es de prueba" } }, { "kind": 5, "statement": "Enunciado 3", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "uno" } }, { "kind": 7, "statement": "Enunciado 4", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ], "answer": { "result": "tres" } } ] } ] }
-
{ "id": 3, "name": "Unidad 3", "lessons": [ { "id": 7, "name": "Lección 1 Unidad 3", "exercises": [ { "id": 25, "kind": 1, "statement": "Enunciado 1", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] }, { "id": 26, "kind": 2, "statement": "Enunciado 2", "texts": null }, { "id": 27, "kind": 5, "statement": "Enunciado 3", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] }, { "id": 28, "kind": 7, "statement": "Enunciado 4", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] } ] }, { "id": 8, "name": "Lección 2 Unidad 3", "exercises": [ { "id": 29, "kind": 1, "statement": "Enunciado 1", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] }, { "id": 30, "kind": 2, "statement": "Enunciado 2", "texts": null }, { "id": 31, "kind": 5, "statement": "Enunciado 3", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] }, { "id": 32, "kind": 7, "statement": "Enunciado 4", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] } ] }, { "id": 9, "name": "Lección 3 Unidad 3", "exercises": [ { "id": 33, "kind": 1, "statement": "Enunciado 1", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] }, { "id": 34, "kind": 2, "statement": "Enunciado 2", "texts": null }, { "id": 35, "kind": 5, "statement": "Enunciado 3", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] }, { "id": 36, "kind": 7, "statement": "Enunciado 4", "texts": [ "Opcion 1", "Opcion 2", "Opcion 3" ] } ] } ] }
-
true
-
Code: 404 NOT FOUND
-
< / {id}/Images>
-
POST
-
id=[long]
-
Empty
-
-
URL
/api/Unit/1/Images
-
-
images[]: image file format (*.jpg, *.jpeg, *.png) (length = 9)
-
Code: 500 INTERNAL SERVER ERROR or 400 BAD REQUEST
-
< /{id} >
-
PUT
-
id=[long]
-
-
URL
/api/Unit/1
-
-
{ "name": "Unidad Prueba" }
-
{ "id": 1, "name": "Unidad Prueba" }
-
Code: 404 NOT FOUND
-
< /{id} >
-
DELETE
-
id=[long]
-
-
URL
/api/Unit/1
-
-
{ "name": "Unidad Prueba" }
-
{ "id": 1, "name": "Unidad Prueba" }
-
Code: 404 NOT FOUND
The following queries will be preceded by /Unit.
-
< /Lessons/ >
-
GET
-
Empty
-
-
URL
/api/Unit/Lessons/
-
-
{ "totalElements": 6, "totalPages": 1, "number": 0, "size": 20, "first": true, "last": true, "content": [ { "id": 4, "name": "Lección 1 Unidad 2" }, { "id": 5, "name": "Lección 2 Unidad 2" }, { "id": 6, "name": "Lección 3 Unidad 2" }, { "id": 7, "name": "Lección 1 Unidad 3" }, { "id": 8, "name": "Lección 2 Unidad 3" }, { "id": 9, "name": "Lección 3 Unidad 3" } ] }
-
< /{idunit}/Lesson/ >
-
GET
-
idunit=[long]
-
-
URL
/api/Unit/1/Lesson/
-
-
{ "id": 1, "name": "Unidad 1", "lessons": [ { "id": 1, "name": "Lección 1 Unidad 1", "exercises": null }, { "id": 2, "name": "Lección 2 Unidad 1", "exercises": null }, { "id": 3, "name": "Lección 3 Unidad 1", "exercises": null } ] }
-
Code: 404 NOT FOUND
-
< /{idunit}/Lesson/{id} >
-
GET
-
idunit=[long] id=[long]
-
-
URL
/api/Unit/1/Lesson/1
-
-
{ "id": 1, "name": "Lección 1 Unidad 1" }
-
Code: 404 NOT FOUND
-
< /{idunit}/Lesson/{id} >
-
PUT
-
idunit=[long] id=[long]
-
-
URL
/api/Unit/1/Lesson/1
-
-
{ "name": "Leccion Prueba" }
-
{ "id": 1, "name": "Leccion Prueba" }
-
Code: 404 NOT FOUND
-
< /{idunit}/Lesson/{idlesson}/Completed >
-
GET
-
idunit=[long] idlesson=[long]
-
-
URL
/api/Unit/1/Lesson/1/Completed
-
-
true
-
Code: 404 NOT FOUND
The following queries must be preceded by /Unit.
-
< /Lesson/Exercises/ >
-
GET
-
Empty
-
-
URL
api/Unit/Lesson/Exercises/
-
-
{ "totalElements": 24, "totalPages": 2, "number": 0, "size": 10, "first": true, "last": false, "content": [ { "id": 1, "kind": 1, "statement": "1.1.1 Seleccione el asiento", "texts": [ "213.Maquinaria", "210.Terrenos y bienes naturales", "218. Elementos de transporte" ] }, { "id": 2, "kind": 2, "statement": "1.1.2 Escribe la denominación de la cuenta que recoge: maquinarias para el proceso productivo de la empresa", "texts": [] }, { "id": 3, "kind": 5, "statement": "1.1.5 Escoge la respuesta correcta para la cuenta: 210. Terrenos y bienes naturales", "texts": [ "Activo", "Pasivo", "Patrimonio neto" ] }, { "id": 4, "kind": 7, "statement": "1.1.7 Escoge el enunciado correcto para el asiento: \"10 211. Construcciones a 174. Provedores de inmovilizado a l/p 10\"", "texts": [ " La empresa compra un local por 10, dejándolo a deber a su provedor, al que pagará integramente dentro de 10 años a través de la letra de cambio.", "La empresa compra un local por 10, dejándolo a deber a su provedor, al que pagará integramente dentro de 10 años.", " La empresa compra un local por 10, dejándolo a deber a su provedor, al que pagará en un plazo no superior a un año." ] }, { "id": 5, "kind": 1, "statement": "1.1.1 Seleccione el asiento", "texts": [ "213.Maquinaria", "210.Terrenos y bienes naturales", "218. Elementos de transporte" ] }, { "id": 6, "kind": 2, "statement": "1.2.2 Escribe la denominación de la cuenta que recoge: maquinarias para el proceso productivo de la empresa", "texts": [] }, { "id": 7, "kind": 5, "statement": "1.2.5 Escoge la respuesta correcta para la cuenta: 210. Terrenos y bienes naturales", "texts": [ "Activo", "Pasivo", "Patrimonio neto" ] }, { "id": 8, "kind": 7, "statement": "1.2.7 Escoge el enunciado correcto para el asiento: \"10 211. Construcciones a 174. Provedores de inmovilizado a l/p 10\"", "texts": [ " La empresa compra un local por 10, dejándolo a deber a su provedor, al que pagará integramente dentro de 10 años a través de la letra de cambio.", "La empresa compra un local por 10, dejándolo a deber a su provedor, al que pagará integramente dentro de 10 años.", " La empresa compra un local por 10, dejándolo a deber a su provedor, al que pagará en un plazo no superior a un año." ] }, { "id": 9, "kind": 1, "statement": "1.3.1 Seleccione el asiento", "texts": [ "213.Maquinaria", "210.Terrenos y bienes naturales", "218. Elementos de transporte" ] }, { "id": 10, "kind": 2, "statement": "1.3.2 Escribe la denominación de la cuenta que recoge: maquinarias para el proceso productivo de la empresa", "texts": [] } ] }
-
Code: 404 NOT FOUND
-
< {idunit}/Lesson/{idlesson}/Exercise/{id} >
-
GET
-
idunit=[long]
idlesson=[long]
id=[long]
-
-
URL
api/Unit/1/Lesson/1/Exercise/1
-
-
{ "id": 1, "kind": 1, "statement": "1.1.1 Seleccione el asiento", "texts": [ "213.Maquinaria", "210.Terrenos y bienes naturales", "218. Elementos de transporte" ] }
-
Code: 404 NOT FOUND
-
< {idunit}/Lesson/{idlesson}/Exercise/{id} >
-
PUT
-
idunit=[long]
idlesson=[long]
id=[long]
-
-
URL
api/Unit/1/Lesson/1/Exercise/1
-
-
{ "kind": 1, "statement": "1.1.1 Seleccione el asiento", "texts": [ "213.Maquinaria", "210.Terrenos y bienes naturales", "218. Elementos de transporte" ] }
-
{ "id": 2, "kind": 1, "statement": "1.1.1 Seleccione el asiento", "texts": [ "213.Maquinaria", "210.Terrenos y bienes naturales", "218. Elementos de transporte" ] }
-
Code: 404 NOT FOUND
-
< {idunit}/Lesson/{idlesson}/Exercise/{id}/Answer >
-
GET
-
idunit=[long]
idlesson=[long]
id=[long]
-
-
URL
api/Unit/1/Lesson/1/Exercise/1/Answer
-
-
{ "id": 1, "result": "uno" }
-
Code: 404 NOT FOUND
-
< {idunit}/Lesson/{idlesson}/Exercise/{id}/Answer >
-
PUT
-
idunit=[long]
idlesson=[long]
id=[long]
-
-
URL
api/Unit/1/Lesson/1/Exercise/1/Answer
-
-
{ "result": "dos" }
-
{ "id": 1, "result": "dos" }
-
Code: 404 NOT FOUND
-
< {idunit}/Lesson/{idlesson}/Exercise/{id}/Solution >
-
PUT
-
idunit=[long]
idlesson=[long]
id=[long]
-
-
URL
api/Unit/1/Lesson/1/Exercise/1/Solution
-
-
{ "result": "dos" }
-
true
-
Code: 404 NOT FOUND