blob: 7ef0f244b78bbade697ac40058b7213a1759cf99 [file] [log] [blame]
Joe Gregorio2379ecc2010-10-26 10:51:28 -04001{
Joe Gregoriof4153422011-03-18 22:45:18 -04002 "kind": "discovery#describeItem",
Joe Gregorio2379ecc2010-10-26 10:51:28 -04003 "name": "zoo",
4 "version": "v1",
Joe Gregoriof4153422011-03-18 22:45:18 -04005 "description": "Zoo API used for Apiary testing",
Joe Gregorio6a63a762011-05-02 22:36:05 -04006 "basePath": "/zoo/",
Joe Gregorio2379ecc2010-10-26 10:51:28 -04007 "rpcPath": "/rpc",
Joe Gregoriof4153422011-03-18 22:45:18 -04008 "features": [
9 "dataWrapper"
10 ],
11 "schemas": {
12 "Animal": {
13 "id": "Animal",
14 "type": "object",
15 "properties": {
16 "etag": {
17 "type": "string"
18 },
19 "kind": {
20 "type": "string",
21 "default": "zoo#animal"
22 },
23 "name": {
24 "type": "string"
25 },
26 "photo": {
27 "type": "object",
28 "properties": {
29 "filename": {
30 "type": "string"
31 },
32 "hash": {
33 "type": "string"
34 },
35 "hashAlgorithm": {
36 "type": "string"
37 },
38 "size": {
39 "type": "integer"
40 },
41 "type": {
42 "type": "string"
43 }
44 }
45 }
46 }
47 },
48 "Animal2": {
49 "id": "Animal2",
50 "type": "object",
51 "properties": {
52 "kind": {
53 "type": "string",
54 "default": "zoo#animal"
55 },
56 "name": {
57 "type": "string"
58 }
59 }
60 },
61 "AnimalFeed": {
62 "id": "AnimalFeed",
63 "type": "object",
64 "properties": {
65 "etag": {
66 "type": "string"
67 },
68 "items": {
69 "type": "array",
70 "items": {
71 "$ref": "Animal"
72 }
73 },
74 "kind": {
75 "type": "string",
76 "default": "zoo#animalFeed"
77 }
78 }
79 },
80 "LoadFeed": {
81 "id": "LoadFeed",
82 "type": "object",
83 "properties": {
84 "items": {
85 "type": "array",
86 "items": {
87 "type": "object",
88 "properties": {
89 "doubleVal": {
90 "type": "number"
91 },
Joe Gregorio2b781282011-12-08 12:00:25 -050092 "nullVal": {
93 "type": "null"
94 },
95 "booleanVal": {
96 "type": "boolean",
97 "description": "True or False."
98 },
99 "anyVal": {
100 "type": "any",
101 "description": "Anything will do."
102 },
Joe Gregoriof4153422011-03-18 22:45:18 -0400103 "enumVal": {
104 "type": "string"
105 },
106 "kind": {
107 "type": "string",
108 "default": "zoo#loadValue"
109 },
110 "longVal": {
111 "type": "integer"
112 },
113 "stringVal": {
114 "type": "string"
115 }
116 }
117 }
118 },
119 "kind": {
120 "type": "string",
121 "default": "zoo#loadFeed"
122 }
123 }
124 }
125 },
Joe Gregorio7a6df3a2011-01-31 21:55:21 -0500126 "methods": {
127 "query": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400128 "path": "query",
129 "id": "bigquery.query",
Joe Gregorio7a6df3a2011-01-31 21:55:21 -0500130 "httpMethod": "GET",
131 "parameters": {
132 "q": {
Joe Gregoriobee86832011-02-22 10:00:19 -0500133 "type": "string",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400134 "location": "query",
Joe Gregorio7a6df3a2011-01-31 21:55:21 -0500135 "required": false,
136 "repeated": false
Joe Gregoriobee86832011-02-22 10:00:19 -0500137 },
138 "i": {
139 "type": "integer",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400140 "location": "query",
Joe Gregoriobee86832011-02-22 10:00:19 -0500141 "required": false,
142 "repeated": false,
143 "minimum": "0",
144 "maximum": "4294967295",
145 "default": "20"
146 },
147 "n": {
148 "type": "number",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400149 "location": "query",
Joe Gregoriobee86832011-02-22 10:00:19 -0500150 "required": false,
151 "repeated": false
152 },
153 "b": {
154 "type": "boolean",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400155 "location": "query",
Joe Gregoriobee86832011-02-22 10:00:19 -0500156 "required": false,
157 "repeated": false
158 },
159 "a": {
160 "type": "any",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400161 "location": "query",
Joe Gregoriobee86832011-02-22 10:00:19 -0500162 "required": false,
163 "repeated": false
164 },
165 "o": {
166 "type": "object",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400167 "location": "query",
Joe Gregoriobee86832011-02-22 10:00:19 -0500168 "required": false,
169 "repeated": false
170 },
171 "e": {
172 "type": "string",
Joe Gregorio6a63a762011-05-02 22:36:05 -0400173 "location": "query",
Joe Gregoriobee86832011-02-22 10:00:19 -0500174 "required": false,
175 "repeated": false,
176 "enum": [
177 "foo",
178 "bar"
179 ]
Joe Gregorio6804c7a2011-11-18 14:30:32 -0500180 },
Craig Citro1e742822012-03-01 12:59:22 -0800181 "er": {
182 "type": "string",
183 "location": "query",
184 "required": false,
185 "repeated": true,
186 "enum": [
187 "one",
188 "two",
189 "three"
190 ]
191 },
Joe Gregorio6804c7a2011-11-18 14:30:32 -0500192 "rr": {
193 "type": "string",
194 "location": "query",
195 "required": false,
196 "repeated": true,
197 "pattern": "[a-z]+"
Joe Gregorio7a6df3a2011-01-31 21:55:21 -0500198 }
199 }
200 }
201 },
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400202 "resources": {
Joe Gregorio3fada332011-01-07 17:07:45 -0500203 "my": {
204 "resources": {
205 "favorites": {
206 "methods": {
207 "list": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400208 "path": "favorites/@me/mine",
209 "id": "zoo.animals.mine",
Joe Gregorio3fada332011-01-07 17:07:45 -0500210 "httpMethod": "GET",
211 "parameters": {
212 "max-results": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400213 "location": "query",
Joe Gregorio3fada332011-01-07 17:07:45 -0500214 "required": false
215 }
216 }
217 }
218 }
219 }
220 }
221 },
Joe Gregoriod92897c2011-07-07 11:44:56 -0400222 "global": {
223 "resources": {
224 "print": {
225 "methods": {
226 "assert": {
227 "path": "global/print/assert",
228 "id": "zoo.animals.mine",
229 "httpMethod": "GET",
230 "parameters": {
231 "max-results": {
232 "location": "query",
233 "required": false
234 }
235 }
236 }
237 }
238 }
239 }
240 },
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400241 "animals": {
242 "methods": {
243 "crossbreed": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400244 "path": "animals/crossbreed",
245 "id": "zoo.animals.crossbreed",
Joe Gregoriof4153422011-03-18 22:45:18 -0400246 "httpMethod": "POST",
247 "description": "Cross-breed animals",
248 "response": {
249 "$ref": "Animal2"
Joe Gregorio84d3c1f2011-07-25 10:39:45 -0400250 },
251 "mediaUpload": {
252 "accept": [
253 "image/png"
254 ],
255 "protocols": {
256 "simple": {
257 "multipart": true,
258 "path": "upload/activities/{userId}/@self"
259 },
260 "resumable": {
261 "multipart": true,
262 "path": "upload/activities/{userId}/@self"
263 }
264 }
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400265 }
266 },
267 "delete": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400268 "path": "animals/{name}",
269 "id": "zoo.animals.delete",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400270 "httpMethod": "DELETE",
Joe Gregoriof4153422011-03-18 22:45:18 -0400271 "description": "Delete animals",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400272 "parameters": {
273 "name": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400274 "location": "path",
Joe Gregoriof4153422011-03-18 22:45:18 -0400275 "required": true,
276 "description": "Name of the animal to delete",
277 "type": "string"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400278 }
Joe Gregoriof4153422011-03-18 22:45:18 -0400279 },
280 "parameterOrder": [
281 "name"
282 ]
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400283 },
284 "get": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400285 "path": "animals/{name}",
286 "id": "zoo.animals.get",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400287 "httpMethod": "GET",
Joe Gregoriof4153422011-03-18 22:45:18 -0400288 "description": "Get animals",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400289 "parameters": {
290 "name": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400291 "location": "path",
Joe Gregoriof4153422011-03-18 22:45:18 -0400292 "required": true,
293 "description": "Name of the animal to load",
294 "type": "string"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400295 },
296 "projection": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400297 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400298 "type": "string",
299 "enum": [
300 "full"
301 ],
302 "enumDescriptions": [
303 "Include everything"
304 ]
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400305 }
Joe Gregoriof4153422011-03-18 22:45:18 -0400306 },
307 "parameterOrder": [
308 "name"
309 ],
310 "response": {
311 "$ref": "Animal"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400312 }
313 },
Joe Gregorioe08a1662011-12-07 09:48:22 -0500314 "getmedia": {
315 "path": "animals/{name}",
316 "id": "zoo.animals.get",
317 "httpMethod": "GET",
318 "description": "Get animals",
319 "parameters": {
320 "name": {
321 "location": "path",
322 "required": true,
323 "description": "Name of the animal to load",
324 "type": "string"
325 },
326 "projection": {
327 "location": "query",
328 "type": "string",
329 "enum": [
330 "full"
331 ],
332 "enumDescriptions": [
333 "Include everything"
334 ]
335 }
336 },
337 "parameterOrder": [
338 "name"
339 ]
340 },
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400341 "insert": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400342 "path": "animals",
343 "id": "zoo.animals.insert",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400344 "httpMethod": "POST",
Joe Gregoriof4153422011-03-18 22:45:18 -0400345 "description": "Insert animals",
346 "request": {
347 "$ref": "Animal"
348 },
349 "response": {
350 "$ref": "Animal"
Joe Gregoriofdf7c802011-06-30 12:33:38 -0400351 },
352 "mediaUpload": {
353 "accept": [
354 "image/png"
355 ],
356 "maxSize": "1KB",
357 "protocols": {
358 "simple": {
359 "multipart": true,
360 "path": "upload/activities/{userId}/@self"
361 },
362 "resumable": {
363 "multipart": true,
364 "path": "upload/activities/{userId}/@self"
365 }
366 }
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400367 }
368 },
369 "list": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400370 "path": "animals",
371 "id": "zoo.animals.list",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400372 "httpMethod": "GET",
Joe Gregoriof4153422011-03-18 22:45:18 -0400373 "description": "List animals",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400374 "parameters": {
375 "max-results": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400376 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400377 "description": "Maximum number of results to return",
378 "type": "integer",
379 "minimum": "0"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400380 },
381 "name": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400382 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400383 "description": "Restrict result to animals with this name",
384 "type": "string"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400385 },
386 "projection": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400387 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400388 "type": "string",
389 "enum": [
390 "full"
391 ],
392 "enumDescriptions": [
393 "Include absolutely everything"
394 ]
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400395 },
396 "start-token": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400397 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400398 "description": "Pagination token",
399 "type": "string"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400400 }
Joe Gregoriof4153422011-03-18 22:45:18 -0400401 },
402 "response": {
403 "$ref": "AnimalFeed"
404 }
405 },
406 "patch": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400407 "path": "animals/{name}",
408 "id": "zoo.animals.patch",
Joe Gregoriof4153422011-03-18 22:45:18 -0400409 "httpMethod": "PATCH",
410 "description": "Update animals",
411 "parameters": {
412 "name": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400413 "location": "path",
Joe Gregoriof4153422011-03-18 22:45:18 -0400414 "required": true,
415 "description": "Name of the animal to update",
416 "type": "string"
417 }
418 },
419 "parameterOrder": [
420 "name"
421 ],
422 "request": {
423 "$ref": "Animal"
424 },
425 "response": {
426 "$ref": "Animal"
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400427 }
428 },
429 "update": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400430 "path": "animals/{name}",
431 "id": "zoo.animals.update",
Joe Gregoriof4153422011-03-18 22:45:18 -0400432 "httpMethod": "PUT",
433 "description": "Update animals",
434 "parameters": {
435 "name": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400436 "location": "path",
Joe Gregoriof4153422011-03-18 22:45:18 -0400437 "description": "Name of the animal to update",
438 "type": "string"
439 }
440 },
441 "parameterOrder": [
442 "name"
443 ],
444 "request": {
445 "$ref": "Animal"
446 },
447 "response": {
448 "$ref": "Animal"
449 }
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400450 }
451 }
452 },
453 "load": {
454 "methods": {
455 "list": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400456 "path": "load",
457 "id": "zoo.load.list",
Joe Gregoriof4153422011-03-18 22:45:18 -0400458 "httpMethod": "GET",
459 "response": {
460 "$ref": "LoadFeed"
461 }
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400462 }
463 }
464 },
465 "loadNoTemplate": {
466 "methods": {
467 "list": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400468 "path": "loadNoTemplate",
469 "id": "zoo.loadNoTemplate.list",
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400470 "httpMethod": "GET"
471 }
472 }
Joe Gregoriof4153422011-03-18 22:45:18 -0400473 },
474 "scopedAnimals": {
475 "methods": {
476 "list": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400477 "path": "scopedanimals",
478 "id": "zoo.scopedAnimals.list",
Joe Gregoriof4153422011-03-18 22:45:18 -0400479 "httpMethod": "GET",
480 "description": "List animals (scoped)",
481 "parameters": {
482 "max-results": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400483 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400484 "description": "Maximum number of results to return",
485 "type": "integer",
486 "minimum": "0"
487 },
488 "name": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400489 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400490 "description": "Restrict result to animals with this name",
491 "type": "string"
492 },
493 "projection": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400494 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400495 "type": "string",
496 "enum": [
497 "full"
498 ],
499 "enumDescriptions": [
500 "Include absolutely everything"
501 ]
502 },
503 "start-token": {
Joe Gregorio6a63a762011-05-02 22:36:05 -0400504 "location": "query",
Joe Gregoriof4153422011-03-18 22:45:18 -0400505 "description": "Pagination token",
506 "type": "string"
507 }
508 },
509 "response": {
510 "$ref": "AnimalFeed"
511 }
512 }
513 }
Joe Gregorio2379ecc2010-10-26 10:51:28 -0400514 }
515 }
516}