-
Notifications
You must be signed in to change notification settings - Fork 5
Home
This document is under construction.
- Method: POST
- Parameters: new_password=XXXX&re_new_password=XXXX¤t_password=ZZZZ (need token)
- Expected result: User password changed
- Example:
curl -X POST http://localhost:8000/api/auth/password/ --data 'new_password=foo&re_new_password=foo¤t_password=bar' -H 'Authorization: Token bd7a47429f4008d72a50ef419b8b600cfb973f35'
- Expected result: Swagger API Documentation (web browser)
- Method: POST
- Parameters: username=usuario&password=clave
- Expected result: Authentication flow, return token and user_id
- Example:
curl -X POST -d "username=usuario&password=clave" http://localhost:8000/api/employee/authenticate/
- Method: POST
- Parameters: email=[email protected]
- Expected result: User created.
- Example:
curl -X POST http://localhost:8000/api/employee/create/ -d "[email protected]"
- Method: GET
- Expected result: Employee complete list
- Example:
curl -X GET http://localhost:8000/api/employee/list/
- Method: GET
- Expected result: Employee complete role list
- Example:
curl -X GET http://localhost:8000/api/employee/role/list/
- Method: GET
- Expected result: Employee complete location list
- Example:
curl -X GET http://localhost:8000/api/employee/location/list/
- Method: GET
- Header: Authorization(Token <token_number>)
- Parameters: {kind}(level, top), {quantity}(number of results)
- Expected result: Employee top level or top score list
- Example:
curl -X GET http://localhost:8000/api/employee/top/level/1/ -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'
- Method: GET
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Employee detail
- Example:
curl -X GET http://localhost:8000/api/employee/1/
- Method: PATCH
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Employee is_active set to True
- Example:
curl -X PATCH http://localhost:8000/api/employee/1/activate/
- Method: GET
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Employee avatar
- Example:
curl -X GET http://localhost:8000/api/employee/1/avatar/
- Method: GET
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Categories allowed to give stars from employees.
- Example:
curl -X GET http://localhost:8000/api/employee/1/category/list/
- Method: PATCH
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Employee is_active set to False
- Example:
curl -X PATCH http://localhost:8000/api/employee/1/deactivate/
- Method: GET
- Parameters: {search_term}
- Expected result: Employee list using search term.
- Example:
curl -X GET http://localhost:8000/api/employee/search/luis/
- Method: GET
- Parameters: {category_id}(category primary key or id)
- Expected result: Subcategory list of Categories.
- Example:
curl -X GET http://localhost:8000/api/category/1/subcategory/list/
- Method: GET
- Expected result: Category list
- Example:
curl -X GET http://localhost:8000/api/category/list/
- Method: GET
- Expected result: Subcategory details, including list of categories.
- Example:
curl -X GET http://localhost:8000/api/category/subcategory/1/
- Method: GET
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Employee stars list.
- Example:
curl -X GET http://localhost:8000/api/stars/1/list/
- Method: POST
- Parameters: {employee_id}(employee primary key or id), comment=comentario&subcategory_id=1
- Expected result: Employee give star to Employee by Id and save comments and subcategory.
- Example:
curl -X POST -d "comment=comentario&subcategory=1" http://localhost:8000/api/stars/1/give/star/to/2/
- Method: GET
- Parameters: {employee_id}(employee primary key or id)
- Expected result: Employee stars list grouped by subcategories.
- Example:
curl -X GET http://localhost:8000/api/stars/2/subcategory/list/
- Method: GET
- Parameters: {employee_id}(employee primary key or id), {subcategory_id}(subcategory primary key or id)
- Expected result: Employee stars detailed list by subcategory.
- Example:
curl -X GET http://localhost:8000/api/stars/2/subcategory/3/list/
- Method: GET
- Parameters: {star_id}(star primary key or id)
- Expected result: star detail
- Example:
curl -X GET http://localhost:8000/api/stars/5/
- Method: GET
- Parameters: {top_number}(quantity of results), {kind}(category or subcategory), {id}(category or subcategory id)
- Expected result: Top list of employee stars (quantity) by category or subcategory
- Example of top 5 in category 1:
curl -X GET http://localhost:8000/api/stars/top/5/category/1/
Belatrix Open Source Project (c) 2016