-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapiary.apib
65 lines (51 loc) · 1.46 KB
/
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
59
60
61
62
63
64
65
FORMAT: 1A
HOST: http://polls.apiblueprint.org/
# usermanager
Usermanager is a simple API allowing consumers to create, edit and view user(s).
## Users Collection [/users]
### List All Users [GET]
+ Response 200 (application/vnd.api+json)
{
"data": [{
"type": "users",
"id": "1",
"attributes": {
"name": "john",
"email": "[email protected]",
"password": "ja8q\+Y!?FCD3\":P"
}
},
{
"type": "users",
"id": "2",
"attributes": {
"name": "bob",
"email": "[email protected]",
"password": "ja8q\+Y!?FCD3(:P"
}
}]
}
### Create a New User [POST]
You may create a new user using this action.
- name (string) - the name of the user
- email (string) - the email of the user
- password (string) - the password of the user
+ Request (application/vnd.api+json)
{
"name": "Bob",
"email": "[email protected]",
"password": "mypassword"
}
+ Response 201 (application/vnd.api+json)
+ Body
{
"data": {
"type": "users",
"id": "1",
"attributes": {
"name": "john",
"email": "[email protected]",
"password": "ja8q\+Y!?FCD3":P"
}
}
}