-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
58 lines (40 loc) · 981 Bytes
/
apiary.apib
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
FORMAT: X-1A
# Machines API
The Example API for Dredd API Blueprint testing tool
# Group Machines
# Machines collection [/machines]
## Create a Machine [POST]
+ Request (application/json)
{
"type": "bulldozer",
"name": "willy"
}
+ Response 202 (application/json)
{
"message": "Accepted"
}
## Retreive all Machines [GET]
+ Response 200 (application/json)
[{
"_id": "52341870ed55224b15ff07ef",
"type": "bulldozer",
"name": "willy"
},
{
"_id": "12345",
"type": "car",
"name": "tommy"
}
]
# Machine [/machines/{name}]
+ Parameters
+ name (required,`willy`)
## Retrieve a Machine [GET]
+ Response 200 (application/json)
{
"type": "bulldozer",
"name": "willy",
"_id": "5229c6e8e4b0bd7dbb07e29c"
}
## Delete Message [DELETE]
+ Response 204