forked from qingstor/qingstor-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_spec_example_swagger_v2.0.json
241 lines (241 loc) · 6.55 KB
/
api_spec_example_swagger_v2.0.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
{
"swagger": "2.0",
"info": {
"version": "2016-01-06",
"title": "QingStor",
"description": "QingStor provides low-cost and reliable online storage service with unlimited storage space, high read and write performance, high reliability and data safety, fine-grained access control, and easy to use API.",
"termsOfService": "https://www.qingcloud.com/about/tos",
"license": {
"name": "The Apache License (Version 2)",
"url": "https://www.apache.org/licenses/LICENSE-2.0"
},
"contact": {
"name": "Yunify SDK Group",
"email": "[email protected]"
}
},
"paths": {
"/": {
"get": {
"operationId": "ListBuckets",
"summary": "Get Service",
"description": "Retrieve the bucket list.",
"externalDocs": {
"url": "https://docs.qingcloud.com/qingstor/api/service/get.html"
},
"parameters": [
{
"name": "Location",
"description": "Limits results to buckets that in the location",
"type": "string",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"count": {
"description": "Bucket count",
"type": "integer"
},
"buckets": {
"description": "Buckets information",
"type": "array",
"items": {
"$ref": "#/definitions/bucket"
}
}
}
}
}
}
}
},
"/{bucketName}": {
"parameters": [
{
"$ref": "#/parameters/bucketName"
},
{
"$ref": "#/parameters/zone"
}
],
"get": {
"tags": [
"Bucket"
],
"operationId": "ListObjects",
"summary": "GET Bucket (List Objects)",
"description": "Retrieve the object list in a bucket.",
"externalDocs": {
"url": "https://docs.qingcloud.com/qingstor/api/bucket/get.html"
},
"parameters": [
{
"name": "prefix",
"description": "Limits results to keys that begin with the prefix",
"type": "string",
"in": "query"
},
{
"name": "delimiter",
"description": "Put all keys that share a common prefix into a list",
"type": "string",
"in": "query"
},
{
"name": "marker",
"description": "Limit results to keys that start at this marker",
"type": "string",
"in": "query"
},
{
"name": "limit",
"description": "Results count limit",
"type": "integer",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Bucket name",
"type": "string"
},
"owner": {
"$ref": "#/definitions/owner"
},
"prefix": {
"description": "Prefix that specified in request parameters",
"type": "string"
},
"delimiter": {
"description": "Delimiter that specified in request parameters",
"type": "string"
},
"limit": {
"description": "Limit that specified in request parameters",
"type": "integer"
},
"marker": {
"description": "Marker that specified in request parameters",
"type": "string"
},
"next_marker": {
"description": "The last key in keys list",
"type": "string"
},
"keys": {
"description": "Object keys",
"type": "array",
"items": {
"$ref": "#/definitions/key"
}
},
"common_prefixes": {
"description": "Other object keys that share common prefixes",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
},
"parameters": {
"bucketName": {
"name": "bucketName",
"description": "Bucket name",
"type": "string",
"required": true,
"in": "path"
},
"zone": {
"name": "zone",
"description": "QingCloud Zone ID",
"type": "string",
"in": "query"
}
},
"definitions": {
"bucket": {
"description": "Bucket",
"type": "object",
"properties": {
"location": {
"description": "QingCloud Zone ID",
"type": "string"
},
"name": {
"description": "Bucket name",
"type": "string"
},
"url": {
"description": "URL to access the bucket",
"type": "string"
},
"created": {
"description": "Created time of the bucket",
"type": "string",
"format": "date-time"
}
}
},
"key": {
"description": "Object key",
"type": "object",
"properties": {
"key": {
"description": "Object key",
"type": "string"
},
"mime_type": {
"description": "MIME type of the object",
"type": "string"
},
"etag": {
"description": "MD5sum of the object",
"type": "string"
},
"size": {
"description": "Object content size",
"type": "integer"
},
"modified": {
"description": "Last modified time in unix time format",
"type": "integer"
},
"created": {
"description": "Object created time",
"type": "string",
"format": "date-time"
}
}
},
"owner": {
"description": "Bucket owner",
"type": "object",
"properties": {
"id": {
"description": "User ID",
"type": "string"
},
"name": {
"description": "Username",
"type": "string"
}
}
}
}
}