-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.apib
121 lines (88 loc) · 2.45 KB
/
api.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
FORMAT: 1A
# Repo Service
This is a RESTful API for repository management
## Group API Root
This resource offers the initial API capabilities in
the form of the links in the JSON body.
## API Root Collection [/]
### List All Resources [GET]
+ Response 200 (application/json)
[
{ "href": "http://localhost:3001/users" },
{ "href": "http://localhost:3001/repos" }
]
## Group Users
## Users Collection [/users]
### List All Users [GET]
+ Response 200 (application/json)
+ Attributes (array[User])
### Create a New User [POST]
+ Request (application/json)
+ Attributes (User Base)
+ Response 201 (application/json)
+ Headers
Location: /users/1
+ Attributes (User)
## Group User
## User [/users/{user_id}]
### View User [GET]
+ Response 200 (application/json)
+ Attributes (User)
## Group Repos
## Repos Collection [/repos]
### List All Repos [GET]
+ Response 200 (application/json)
+ Attributes (array[Repo,Repo 2])
### Create a New Repo [POST]
+ Request (application/json)
+ Attributes (Repo Post)
+ Response 201 (application/json)
+ Headers
Location: /repos/1
+ Attributes (Repo Response)
## Group Repo
## Repo [/repos/{repo_id}]
### View Repo [GET]
+ Response 200 (application/json)
+ Attributes (Repo Response)
### Delete Repo [DELETE]
+ Response 204
# Data Structures
## User Base
+ firstName: John
+ lastName: Doe
+ email: [email protected]
## User
+ Include (User Base)
+ Include (User Base)
+ created: `2016-11-11T08:40:51.620Z`
+ href: http://localhost:3001/users/1
+ repos (array)
* (object)
+ name: angular-seed,
+ href: http://localhost:3001/repos/1
* (object)
+ name: flexbox-example,
+ href: http://localhost:3001/repos/2
## Repo Post
+ name: angular-seed-karma-mocha-sinon-chai
+ href: http://localhost:3001/repos/1
+ fork: true (boolean)
+ git_url: git://github.com/lazlojuly/angular-seed-karma-mocha-sinon-chai.git
## Repo Response
+ Include (Repo Post)
+ owner (object)
+ name: lazlojuly
+ href: http://localhost:3001/users/1
+ private: false
+ description: Forked angular-seed project with mocha-sinon-chai test stack
## Repo 2
+ name: flexbox-example
+ href: http://localhost:3001/repos/2
+ fork: true (boolean)
+ git_url: git://github.com/lazlojuly/flexbox-example.git
+ owner (object)
+ name: lazlojuly
+ href: http://localhost:3001/users/1
+ private: false
+ description: Multi-column flexbox layout