taskqueue-api.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. {
  2. "kind": "discovery#restDescription",
  3. "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/xnLtIe0CIvW_kIgCrq0S6VocjyE\"",
  4. "discoveryVersion": "v1",
  5. "id": "taskqueue:v1beta1",
  6. "name": "taskqueue",
  7. "version": "v1beta1",
  8. "revision": "20141111",
  9. "title": "TaskQueue API",
  10. "description": "Lets you access a Google App Engine Pull Task Queue over REST.",
  11. "ownerDomain": "google.com",
  12. "ownerName": "Google",
  13. "icons": {
  14. "x16": "https://www.google.com/images/icons/product/app_engine-16.png",
  15. "x32": "https://www.google.com/images/icons/product/app_engine-32.png"
  16. },
  17. "documentationLink": "https://developers.google.com/appengine/docs/python/taskqueue/rest",
  18. "protocol": "rest",
  19. "baseUrl": "https://www.googleapis.com/taskqueue/v1beta1/projects/",
  20. "basePath": "/taskqueue/v1beta1/projects/",
  21. "rootUrl": "https://www.googleapis.com/",
  22. "servicePath": "taskqueue/v1beta1/projects/",
  23. "batchPath": "batch",
  24. "parameters": {
  25. "alt": {
  26. "type": "string",
  27. "description": "Data format for the response.",
  28. "default": "json",
  29. "enum": [
  30. "json"
  31. ],
  32. "enumDescriptions": [
  33. "Responses with Content-Type of application/json"
  34. ],
  35. "location": "query"
  36. },
  37. "fields": {
  38. "type": "string",
  39. "description": "Selector specifying which fields to include in a partial response.",
  40. "location": "query"
  41. },
  42. "key": {
  43. "type": "string",
  44. "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
  45. "location": "query"
  46. },
  47. "oauth_token": {
  48. "type": "string",
  49. "description": "OAuth 2.0 token for the current user.",
  50. "location": "query"
  51. },
  52. "prettyPrint": {
  53. "type": "boolean",
  54. "description": "Returns response with indentations and line breaks.",
  55. "default": "true",
  56. "location": "query"
  57. },
  58. "quotaUser": {
  59. "type": "string",
  60. "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
  61. "location": "query"
  62. },
  63. "userIp": {
  64. "type": "string",
  65. "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
  66. "location": "query"
  67. }
  68. },
  69. "auth": {
  70. "oauth2": {
  71. "scopes": {
  72. "https://www.googleapis.com/auth/taskqueue": {
  73. "description": "Manage your Tasks and Taskqueues"
  74. },
  75. "https://www.googleapis.com/auth/taskqueue.consumer": {
  76. "description": "Consume Tasks from your Taskqueues"
  77. }
  78. }
  79. }
  80. },
  81. "schemas": {
  82. "Task": {
  83. "id": "Task",
  84. "type": "object",
  85. "properties": {
  86. "enqueueTimestamp": {
  87. "type": "string",
  88. "description": "Time (in seconds since the epoch) at which the task was enqueued.",
  89. "format": "int64"
  90. },
  91. "id": {
  92. "type": "string",
  93. "description": "Name of the task."
  94. },
  95. "kind": {
  96. "type": "string",
  97. "description": "The kind of object returned, in this case set to task.",
  98. "default": "taskqueues#task"
  99. },
  100. "leaseTimestamp": {
  101. "type": "string",
  102. "description": "Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.",
  103. "format": "int64"
  104. },
  105. "payloadBase64": {
  106. "type": "string",
  107. "description": "A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded."
  108. },
  109. "queueName": {
  110. "type": "string",
  111. "description": "Name of the queue that the task is in."
  112. }
  113. }
  114. },
  115. "TaskQueue": {
  116. "id": "TaskQueue",
  117. "type": "object",
  118. "properties": {
  119. "acl": {
  120. "type": "object",
  121. "description": "ACLs that are applicable to this TaskQueue object.",
  122. "properties": {
  123. "adminEmails": {
  124. "type": "array",
  125. "description": "Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.",
  126. "items": {
  127. "type": "string"
  128. }
  129. },
  130. "consumerEmails": {
  131. "type": "array",
  132. "description": "Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.",
  133. "items": {
  134. "type": "string"
  135. }
  136. },
  137. "producerEmails": {
  138. "type": "array",
  139. "description": "Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.",
  140. "items": {
  141. "type": "string"
  142. }
  143. }
  144. }
  145. },
  146. "id": {
  147. "type": "string",
  148. "description": "Name of the taskqueue."
  149. },
  150. "kind": {
  151. "type": "string",
  152. "description": "The kind of REST object returned, in this case taskqueue.",
  153. "default": "taskqueues#taskqueue"
  154. },
  155. "maxLeases": {
  156. "type": "integer",
  157. "description": "The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.",
  158. "format": "int32"
  159. },
  160. "stats": {
  161. "type": "object",
  162. "description": "Statistics for the TaskQueue object in question.",
  163. "properties": {
  164. "leasedLastHour": {
  165. "type": "string",
  166. "description": "Number of tasks leased in the last hour.",
  167. "format": "int64"
  168. },
  169. "leasedLastMinute": {
  170. "type": "string",
  171. "description": "Number of tasks leased in the last minute.",
  172. "format": "int64"
  173. },
  174. "oldestTask": {
  175. "type": "string",
  176. "description": "The timestamp (in seconds since the epoch) of the oldest unfinished task.",
  177. "format": "int64"
  178. },
  179. "totalTasks": {
  180. "type": "integer",
  181. "description": "Number of tasks in the queue.",
  182. "format": "int32"
  183. }
  184. }
  185. }
  186. }
  187. },
  188. "Tasks": {
  189. "id": "Tasks",
  190. "type": "object",
  191. "properties": {
  192. "items": {
  193. "type": "array",
  194. "description": "The actual list of tasks returned as a result of the lease operation.",
  195. "items": {
  196. "$ref": "Task"
  197. }
  198. },
  199. "kind": {
  200. "type": "string",
  201. "description": "The kind of object returned, a list of tasks.",
  202. "default": "taskqueue#tasks"
  203. }
  204. }
  205. },
  206. "Tasks2": {
  207. "id": "Tasks2",
  208. "type": "object",
  209. "properties": {
  210. "items": {
  211. "type": "array",
  212. "description": "The actual list of tasks currently active in the TaskQueue.",
  213. "items": {
  214. "$ref": "Task"
  215. }
  216. },
  217. "kind": {
  218. "type": "string",
  219. "description": "The kind of object returned, a list of tasks.",
  220. "default": "taskqueues#tasks"
  221. }
  222. }
  223. }
  224. },
  225. "resources": {
  226. "taskqueues": {
  227. "methods": {
  228. "get": {
  229. "id": "taskqueue.taskqueues.get",
  230. "path": "{project}/taskqueues/{taskqueue}",
  231. "httpMethod": "GET",
  232. "description": "Get detailed information about a TaskQueue.",
  233. "parameters": {
  234. "getStats": {
  235. "type": "boolean",
  236. "description": "Whether to get stats. Optional.",
  237. "location": "query"
  238. },
  239. "project": {
  240. "type": "string",
  241. "description": "The project under which the queue lies.",
  242. "required": true,
  243. "location": "path"
  244. },
  245. "taskqueue": {
  246. "type": "string",
  247. "description": "The id of the taskqueue to get the properties of.",
  248. "required": true,
  249. "location": "path"
  250. }
  251. },
  252. "parameterOrder": [
  253. "project",
  254. "taskqueue"
  255. ],
  256. "response": {
  257. "$ref": "TaskQueue"
  258. },
  259. "scopes": [
  260. "https://www.googleapis.com/auth/taskqueue",
  261. "https://www.googleapis.com/auth/taskqueue.consumer"
  262. ]
  263. }
  264. }
  265. },
  266. "tasks": {
  267. "methods": {
  268. "delete": {
  269. "id": "taskqueue.tasks.delete",
  270. "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
  271. "httpMethod": "DELETE",
  272. "description": "Delete a task from a TaskQueue.",
  273. "parameters": {
  274. "project": {
  275. "type": "string",
  276. "description": "The project under which the queue lies.",
  277. "required": true,
  278. "location": "path"
  279. },
  280. "task": {
  281. "type": "string",
  282. "description": "The id of the task to delete.",
  283. "required": true,
  284. "location": "path"
  285. },
  286. "taskqueue": {
  287. "type": "string",
  288. "description": "The taskqueue to delete a task from.",
  289. "required": true,
  290. "location": "path"
  291. }
  292. },
  293. "parameterOrder": [
  294. "project",
  295. "taskqueue",
  296. "task"
  297. ],
  298. "scopes": [
  299. "https://www.googleapis.com/auth/taskqueue",
  300. "https://www.googleapis.com/auth/taskqueue.consumer"
  301. ]
  302. },
  303. "get": {
  304. "id": "taskqueue.tasks.get",
  305. "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
  306. "httpMethod": "GET",
  307. "description": "Get a particular task from a TaskQueue.",
  308. "parameters": {
  309. "project": {
  310. "type": "string",
  311. "description": "The project under which the queue lies.",
  312. "required": true,
  313. "location": "path"
  314. },
  315. "task": {
  316. "type": "string",
  317. "description": "The task to get properties of.",
  318. "required": true,
  319. "location": "path"
  320. },
  321. "taskqueue": {
  322. "type": "string",
  323. "description": "The taskqueue in which the task belongs.",
  324. "required": true,
  325. "location": "path"
  326. }
  327. },
  328. "parameterOrder": [
  329. "project",
  330. "taskqueue",
  331. "task"
  332. ],
  333. "response": {
  334. "$ref": "Task"
  335. },
  336. "scopes": [
  337. "https://www.googleapis.com/auth/taskqueue",
  338. "https://www.googleapis.com/auth/taskqueue.consumer"
  339. ]
  340. },
  341. "lease": {
  342. "id": "taskqueue.tasks.lease",
  343. "path": "{project}/taskqueues/{taskqueue}/tasks/lease",
  344. "httpMethod": "POST",
  345. "description": "Lease 1 or more tasks from a TaskQueue.",
  346. "parameters": {
  347. "leaseSecs": {
  348. "type": "integer",
  349. "description": "The lease in seconds.",
  350. "required": true,
  351. "format": "int32",
  352. "location": "query"
  353. },
  354. "numTasks": {
  355. "type": "integer",
  356. "description": "The number of tasks to lease.",
  357. "required": true,
  358. "format": "int32",
  359. "location": "query"
  360. },
  361. "project": {
  362. "type": "string",
  363. "description": "The project under which the queue lies.",
  364. "required": true,
  365. "location": "path"
  366. },
  367. "taskqueue": {
  368. "type": "string",
  369. "description": "The taskqueue to lease a task from.",
  370. "required": true,
  371. "location": "path"
  372. }
  373. },
  374. "parameterOrder": [
  375. "project",
  376. "taskqueue",
  377. "numTasks",
  378. "leaseSecs"
  379. ],
  380. "response": {
  381. "$ref": "Tasks"
  382. },
  383. "scopes": [
  384. "https://www.googleapis.com/auth/taskqueue",
  385. "https://www.googleapis.com/auth/taskqueue.consumer"
  386. ]
  387. },
  388. "list": {
  389. "id": "taskqueue.tasks.list",
  390. "path": "{project}/taskqueues/{taskqueue}/tasks",
  391. "httpMethod": "GET",
  392. "description": "List Tasks in a TaskQueue",
  393. "parameters": {
  394. "project": {
  395. "type": "string",
  396. "description": "The project under which the queue lies.",
  397. "required": true,
  398. "location": "path"
  399. },
  400. "taskqueue": {
  401. "type": "string",
  402. "description": "The id of the taskqueue to list tasks from.",
  403. "required": true,
  404. "location": "path"
  405. }
  406. },
  407. "parameterOrder": [
  408. "project",
  409. "taskqueue"
  410. ],
  411. "response": {
  412. "$ref": "Tasks2"
  413. },
  414. "scopes": [
  415. "https://www.googleapis.com/auth/taskqueue",
  416. "https://www.googleapis.com/auth/taskqueue.consumer"
  417. ]
  418. }
  419. }
  420. }
  421. }
  422. }