-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequests.http
75 lines (50 loc) · 1.23 KB
/
requests.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
### Add new location
POST http://localhost:3000/api/locations
Content-Type: application/json
{
"name": "Praha",
"code": 11111,
"ip_code": 101,
"active": true
}
### Add new make
POST http://localhost:3000/api/makes
Content-Type: application/json
{
"name": "Brother",
"active": true
}
### Add new model
POST http://localhost:3000/api/models
Content-Type: application/json
{
"name": "MFC-L2712DW",
"driver": "BrotherMFC-L2712DW.ppd",
"make_id": 2,
"active": true
}
### Add new printer
POST http://localhost:3000/api/printers
Content-Type: application/json
{
"name": "PR-100-001",
"ip": "192.168.100.51",
"port": 9100,
"model_id": 2,
"location_id": 1,
"active": true
}
### Get printers for location with printers
GET http://localhost:3000/api/locations/1/printers
### Get printers for location without printers
GET http://localhost:3000/api/locations/101/printers
### Get printers for non-existing location
GET http://localhost:3000/api/locations/999/printers
### Get makes
GET http://localhost:3000/api/makes
### Get models
GET http://localhost:3000/api/models
### Get locations
GET http://localhost:3000/api/locations
### Get printers
GET http://localhost:3000/api/printers