All queries available with ThunderClient extension for VSCode by importing from file https://github.com/rat1borik/flask-api-users/blob/master/thunder-collection_flask-api-example.json
POST 127.0.0.1:3005/api/users
{
"username":"y.rybnikov1934",
"password":"shizofaziya332",
"birthdate":"1934-12-31",
"status":"online",
"email":"shiza@aye.com"
}
Status: 200 OK Size: 24 Bytes Time: 21 ms
[
{
"id": 2
}
]
- User Adding exception
PUT 127.0.0.1:3005/api/users/2
{
"status":"busy"
}
Status: 200 OK Size: 10 Bytes Time: 9 ms
successful
- User Modifying exception
DELETE 127.0.0.1:3005/api/users/1
Status: 200 OK Size: 10 Bytes Time: 7 ms
successful
- User Deleting exception
GET 127.0.0.1:3005/api/users
Status: 200 OK Size: 226 Bytes Time: 11 ms
[
{
"birthdate": "1934-12-31",
"dt": "2022-12-02 11:02:47",
"email": "shiza@aye.com",
"id": 2,
"password": "93cf9e2a0644bb4a79c2c9e8cf04289d",
"status": "busy",
"username": "y.rybnikov1934"
}
]
GET 127.0.0.1:3005/api/users
{
"id":2
}
Status: 200 OK Size: 226 Bytes Time: 5 ms
[
{
"birthdate": "1934-12-31",
"dt": "2022-12-02 11:02:47",
"email": "shiza@aye.com",
"id": 2,
"password": "93cf9e2a0644bb4a79c2c9e8cf04289d",
"status": "busy",
"username": "y.rybnikov1934"
}
]
POST 127.0.0.1:3005/api/users/auth
{
"username":"y.rybnikov1934",
"password":"shizofaziya332"
}
Status: 200 OK Size: 10 Bytes Time: 9 ms
successful
- User Authentification exception
POST 127.0.0.1:3005/api/music
{
"title":"Tp na ame",
"artist":"SEREGA PIRAT OFFICIAL",
"releaseDate":"2019-12-05",
"album":"SomethingSheet"
}
Status: 200 OK Size: 24 Bytes Time: 8 ms
[
{
"id": 4
}
]
PUT 127.0.0.1:3005/api/music/4
{
"album":"World`s Classical Masterpieces"
}
Status: 200 OK Size: 10 Bytes Time: 13 ms
successful
GET 127.0.0.1:3005/api/music
Status: 200 OK Size: 227 Bytes Time: 10 ms
[
{
"album": "World`s Classical Masterpieces",
"artist": "SEREGA PIRAT OFFICIAL",
"dt": "2022-12-02 11:08:22",
"id": 4,
"listen_amount": 0,
"release_date": "2019-12-05",
"title": "Tp na ame"
}
]
GET 127.0.0.1:3005/api/music
{
"id":4
}
Status: 200 OK Size: 227 Bytes Time: 5 ms
[
{
"album": "World`s Classical Masterpieces",
"artist": "SEREGA PIRAT OFFICIAL",
"dt": "2022-12-02 11:08:22",
"id": 4,
"listen_amount": 0,
"release_date": "2019-12-05",
"title": "Tp na ame"
}
]
DELETE 127.0.0.1:3005/api/music/4
Status: 200 OK Size: 10 Bytes Time: 13 ms
successful
POST 127.0.0.1:3005/api/music/listen
{
"data":"tp%SEREGA"
}
Status: 200 OK Size: 18 Bytes Time: 13 ms
Mmm... Sounds nice
I am Teapot
GET 127.0.0.1:3005/api/iamteapot
Status: 418 I'M A TEAPOT Size: 14 Bytes Time: 4 ms
Enjoy your tea