git clone https://github.com/mfarias/python_api.git
docker-compose up --build
Access localhost:5000
-
URL: /healthcheck
-
Method:
GET
-
Success Response:
- Code: 200
- Content:
Users API is running.
- Code: 200
-
URL: /users/:id
-
Method:
GET
-
URL Params:
id=[integer]
required -
Success Response:
- Code: 200
- Content:
{ "id": 1, "name": "user 1", "login": "user1", "email": "user1@example.com" }
- Code: 200
-
URL: / or /users
-
Method:
GET
-
Query Params:
page=[integer]
: page number. If not informed, the default value is 1.per_page=[integer]
: number of items per page. If not informed, the default value is 5.name=[string]
: filter by namelogin=[string]
: filter by loginemail=[string]
: filter by email
-
Success Response:
- Code: 200
- Content:
[ { "id": 1, "name": "User 1", "login": "user1", "email": "user1@example.com" }, { "id": 2, "name": "User 2", "login": "user2", "email": "user2@example.com" } ]
- Code: 200