forked from martyf6/FriendlyWager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
70 lines (65 loc) · 1.49 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
66
67
68
69
70
HOST: http://api.nutraspace.com/v1/
--- User Domain Services ---
---
Welcome to the our sample API documentation. All comments can be written in (support [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax)
---
--
User
Operations related to managing users and profiles
--
Get user by user name
GET /user/{username}
< 200
< Content-Type: application/json
{
username: "mmarshall",
emails: ["[email protected]", "[email protected]"],
first_name: "Matthew",
middle_name: "Magee",
last_name: "Marshall",
gender: "male",
locale: "en-US",
age: 26,
timezone: -5
}
Create a new user with username and password
POST /user
> Content-Type: application/json
{ "username":"mmarshall", "password": "jellyfish" }
< 201
< Content-Type: application/json
{ "status": "created", "url": "/v1/user/mmarshall" }
Update a user profile
PUT /user/{username}
> Content-Type: application/json
{
"edu_level": "bachelors",
"edu_institution": "MIT"
}
< 201
< Content_type: application/json
{
"status": "updated",
"url": "/v1/user/mmarshall",
"fields": [
"edu_level",
"edu_institution"
]
}
--
Group
Operations related to managing groups and group memberships
--
Create a new group
POST /group
{
"realm": "nutraspace.com",
"name": "Dietitians",
"description": "A place for dietitians to congregate",
"admins": [
"mmarshall",
"akannan"
]
}
< 201
{ "status": "created", "url": "/v1/group/032342-2432-4234-908" }