-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.json
199 lines (199 loc) · 6.81 KB
/
swagger.json
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{
"swagger": "2.0",
"info": {
"title": "Unrepeatable",
"version": "0.1"
},
"paths": {
"/api/keys/current": {
"get": {
"tags": [
"All",
"Keys"
],
"summary": "Returns all information about the key which is currently in use by the authenticated user.",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returns the details of the key which is currently in use."
},
"404": {
"description": "Returns 404 if no key is in use at the moment."
}
}
}
},
"/api/keys": {
"get": {
"tags": [
"All",
"Keys"
],
"summary": "Returns details of keys selected by paging.",
"produces": [
"application/json"
],
"parameters": [
{
"name": "lastId",
"in": "query",
"description": "Last id on the previous page, by default this is 0",
"required": false,
"type": "integer",
"default": 0
},
{
"name": "numEntries",
"in": "query",
"description": "Number of entries in the page. By default this value is set to 10, however, a 100 entries limit is enforced.",
"required": false,
"type": "integer",
"default": 10
}
],
"responses": {
"200": {
"description": "Returns the requested keys."
}
}
}
},
"/api/keys/{keyId}": {
"get": {
"tags": [
"All",
"Keys"
],
"summary": "Returns the details of the specified key.",
"produces": [
"application/json"
],
"parameters": [
{
"name": "keyId",
"in": "path",
"description": "Unique integer identifier of the key.",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "Returns the details of the specified key."
},
"404": {
"description": "Returns 404 when the specified key could not be found."
}
}
}
},
"/api/posts": {
"get": {
"tags": [
"All",
"Posts"
],
"summary": "Returns details of posts selected by paging.",
"produces": [
"application/json"
],
"parameters": [
{
"name": "lastId",
"in": "query",
"description": "Last id on the previous page, by default this is 0",
"required": false,
"type": "integer",
"default": 0
},
{
"name": "numEntries",
"in": "query",
"description": "Number of entries in the page. By default this value is set to 10, however, a 100 entries limit is enforced.",
"required": false,
"type": "integer",
"default": 10
}
],
"responses": {
"200": {
"description": "Returns the requested posts."
}
}
},
"post": {
"tags": [
"All",
"Posts"
],
"summary": "Add a posts with the specified details.",
"responses": {
"200": {
"description": "The post has been succesfully created."
},
"409": {
"description": "Could not create the post with the specified details."
}
}
}
},
"/api/posts/{postId}": {
"get": {
"tags": [
"All",
"Posts"
],
"summary": "Returns the details of a specific post.",
"produces": [
"application/json"
],
"parameters": [
{
"name": "postId",
"in": "path",
"description": "Unique integer identifier of the post.",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "The details of the post are returned."
},
"404": {
"description": "The specified post-id could not be retrieved."
}
}
}
},
"/api/unlock": {
"post": {
"tags": [
"All",
"Keys"
],
"summary": "Stores the key identifier in a session variable for later use.",
"parameters": [
{
"name": "key",
"in": "formData",
"description": "Unique key identifier.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Stored the key identifier in the current session."
},
"400": {
"description": "Returns this HTTP error if the specified key identifier does not exists, or if the key is terminated."
}
}
}
}
},
"definitions": {}
}