This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.http
77 lines (60 loc) · 2.16 KB
/
test.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
GET http://localhost:8000/vehicles/vehicle/
Accept: application/json
### вивід списку машин
### вивід списку машин
POST http://localhost:8000/vehicles/vehicle/
Accept: application/json
{
"driver_id": 9,
"make": "IVECO",
"model": "100500",
"plate_number": "УО 1234 ФФ"
}
###
GET http://localhost:8000/vehicles/vehicle/10/
Accept: application/json
### отримання інформації по певній машині
PUT http://localhost:8000/vehicles/vehicle/10/
Accept: application/json
### редагування машини
DELETE http://localhost:8000/vehicles/vehicle/10/
Accept: application/json
### видалення машини
GET http://localhost:8000/vehicles/vehicle/?with_drivers=yes
Accept: application/json
### вивід списку машин з водіями
GET http://localhost:8000/vehicles/vehicle/?with_drivers=no
Accept: application/json
### вивід списку машин без водіїв
GET http://127.0.0.1:8000/drivers/driver/
Accept: application/json
### вивід списку водіїв
### створення нового водія
POST http://127.0.0.1:8000/drivers/driver/
Accept: application/json
{
"first_name": "Петр",
"last_name": "Петров",
}
###
GET http://127.0.0.1:8000/drivers/driver/10/
Accept: application/json
### отримання інформації по певному водію
PUT http://127.0.0.1:8000/drivers/driver/10/
Accept: application/json
### редагування водія
DELETE http://127.0.0.1:8000/drivers/driver/10/
Accept: application/json
### видалення водія
GET http://127.0.0.1:8000/drivers/driver/?created_at__gte=10-11-2020
Accept: application/json
### вивід списку водіїв, які створені після 10-11-2021
GET http://127.0.0.1:8000/drivers/driver/?created_at__lte=10-11-2020
Accept: application/json
### вивід списку водіїв, котрі створені до 16-11-2021
### садимо водія в машину / висаджуємо водія з машини
PUT http://127.0.0.1:8000/vehicles/set_driver/10/
Content-Type: application/json
{
"driver_id": 10
}