taskqueue-api.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. {
  2. "kind": "discovery#restDescription",
  3. "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/LPLXKKjaGUbCz_MfuhQ-STkNWfw\"",
  4. "discoveryVersion": "v1",
  5. "id": "taskqueue:v1beta2",
  6. "name": "taskqueue",
  7. "version": "v1beta2",
  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/v1beta2/projects/",
  20. "basePath": "/taskqueue/v1beta2/projects/",
  21. "rootUrl": "https://www.googleapis.com/",
  22. "servicePath": "taskqueue/v1beta2/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. "retry_count": {
  114. "type": "integer",
  115. "description": "The number of leases applied to this task.",
  116. "format": "int32"
  117. },
  118. "tag": {
  119. "type": "string",
  120. "description": "Tag for the task, could be used later to lease tasks grouped by a specific tag."
  121. }
  122. }
  123. },
  124. "TaskQueue": {
  125. "id": "TaskQueue",
  126. "type": "object",
  127. "properties": {
  128. "acl": {
  129. "type": "object",
  130. "description": "ACLs that are applicable to this TaskQueue object.",
  131. "properties": {
  132. "adminEmails": {
  133. "type": "array",
  134. "description": "Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.",
  135. "items": {
  136. "type": "string"
  137. }
  138. },
  139. "consumerEmails": {
  140. "type": "array",
  141. "description": "Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.",
  142. "items": {
  143. "type": "string"
  144. }
  145. },
  146. "producerEmails": {
  147. "type": "array",
  148. "description": "Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.",
  149. "items": {
  150. "type": "string"
  151. }
  152. }
  153. }
  154. },
  155. "id": {
  156. "type": "string",
  157. "description": "Name of the taskqueue."
  158. },
  159. "kind": {
  160. "type": "string",
  161. "description": "The kind of REST object returned, in this case taskqueue.",
  162. "default": "taskqueues#taskqueue"
  163. },
  164. "maxLeases": {
  165. "type": "integer",
  166. "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.",
  167. "format": "int32"
  168. },
  169. "stats": {
  170. "type": "object",
  171. "description": "Statistics for the TaskQueue object in question.",
  172. "properties": {
  173. "leasedLastHour": {
  174. "type": "string",
  175. "description": "Number of tasks leased in the last hour.",
  176. "format": "int64"
  177. },
  178. "leasedLastMinute": {
  179. "type": "string",
  180. "description": "Number of tasks leased in the last minute.",
  181. "format": "int64"
  182. },
  183. "oldestTask": {
  184. "type": "string",
  185. "description": "The timestamp (in seconds since the epoch) of the oldest unfinished task.",
  186. "format": "int64"
  187. },
  188. "totalTasks": {
  189. "type": "integer",
  190. "description": "Number of tasks in the queue.",
  191. "format": "int32"
  192. }
  193. }
  194. }
  195. }
  196. },
  197. "Tasks": {
  198. "id": "Tasks",
  199. "type": "object",
  200. "properties": {
  201. "items": {
  202. "type": "array",
  203. "description": "The actual list of tasks returned as a result of the lease operation.",
  204. "items": {
  205. "$ref": "Task"
  206. }
  207. },
  208. "kind": {
  209. "type": "string",
  210. "description": "The kind of object returned, a list of tasks.",
  211. "default": "taskqueue#tasks"
  212. }
  213. }
  214. },
  215. "Tasks2": {
  216. "id": "Tasks2",
  217. "type": "object",
  218. "properties": {
  219. "items": {
  220. "type": "array",
  221. "description": "The actual list of tasks currently active in the TaskQueue.",
  222. "items": {
  223. "$ref": "Task"
  224. }
  225. },
  226. "kind": {
  227. "type": "string",
  228. "description": "The kind of object returned, a list of tasks.",
  229. "default": "taskqueues#tasks"
  230. }
  231. }
  232. }
  233. },
  234. "resources": {
  235. "taskqueues": {
  236. "methods": {
  237. "get": {
  238. "id": "taskqueue.taskqueues.get",
  239. "path": "{project}/taskqueues/{taskqueue}",
  240. "httpMethod": "GET",
  241. "description": "Get detailed information about a TaskQueue.",
  242. "parameters": {
  243. "getStats": {
  244. "type": "boolean",
  245. "description": "Whether to get stats. Optional.",
  246. "location": "query"
  247. },
  248. "project": {
  249. "type": "string",
  250. "description": "The project under which the queue lies.",
  251. "required": true,
  252. "location": "path"
  253. },
  254. "taskqueue": {
  255. "type": "string",
  256. "description": "The id of the taskqueue to get the properties of.",
  257. "required": true,
  258. "location": "path"
  259. }
  260. },
  261. "parameterOrder": [
  262. "project",
  263. "taskqueue"
  264. ],
  265. "response": {
  266. "$ref": "TaskQueue"
  267. },
  268. "scopes": [
  269. "https://www.googleapis.com/auth/taskqueue",
  270. "https://www.googleapis.com/auth/taskqueue.consumer"
  271. ]
  272. }
  273. }
  274. },
  275. "tasks": {
  276. "methods": {
  277. "delete": {
  278. "id": "taskqueue.tasks.delete",
  279. "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
  280. "httpMethod": "DELETE",
  281. "description": "Delete a task from a TaskQueue.",
  282. "parameters": {
  283. "project": {
  284. "type": "string",
  285. "description": "The project under which the queue lies.",
  286. "required": true,
  287. "location": "path"
  288. },
  289. "task": {
  290. "type": "string",
  291. "description": "The id of the task to delete.",
  292. "required": true,
  293. "location": "path"
  294. },
  295. "taskqueue": {
  296. "type": "string",
  297. "description": "The taskqueue to delete a task from.",
  298. "required": true,
  299. "location": "path"
  300. }
  301. },
  302. "parameterOrder": [
  303. "project",
  304. "taskqueue",
  305. "task"
  306. ],
  307. "scopes": [
  308. "https://www.googleapis.com/auth/taskqueue",
  309. "https://www.googleapis.com/auth/taskqueue.consumer"
  310. ]
  311. },
  312. "get": {
  313. "id": "taskqueue.tasks.get",
  314. "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
  315. "httpMethod": "GET",
  316. "description": "Get a particular task from a TaskQueue.",
  317. "parameters": {
  318. "project": {
  319. "type": "string",
  320. "description": "The project under which the queue lies.",
  321. "required": true,
  322. "location": "path"
  323. },
  324. "task": {
  325. "type": "string",
  326. "description": "The task to get properties of.",
  327. "required": true,
  328. "location": "path"
  329. },
  330. "taskqueue": {
  331. "type": "string",
  332. "description": "The taskqueue in which the task belongs.",
  333. "required": true,
  334. "location": "path"
  335. }
  336. },
  337. "parameterOrder": [
  338. "project",
  339. "taskqueue",
  340. "task"
  341. ],
  342. "response": {
  343. "$ref": "Task"
  344. },
  345. "scopes": [
  346. "https://www.googleapis.com/auth/taskqueue",
  347. "https://www.googleapis.com/auth/taskqueue.consumer"
  348. ]
  349. },
  350. "insert": {
  351. "id": "taskqueue.tasks.insert",
  352. "path": "{project}/taskqueues/{taskqueue}/tasks",
  353. "httpMethod": "POST",
  354. "description": "Insert a new task in a TaskQueue",
  355. "parameters": {
  356. "project": {
  357. "type": "string",
  358. "description": "The project under which the queue lies",
  359. "required": true,
  360. "location": "path"
  361. },
  362. "taskqueue": {
  363. "type": "string",
  364. "description": "The taskqueue to insert the task into",
  365. "required": true,
  366. "location": "path"
  367. }
  368. },
  369. "parameterOrder": [
  370. "project",
  371. "taskqueue"
  372. ],
  373. "request": {
  374. "$ref": "Task"
  375. },
  376. "response": {
  377. "$ref": "Task"
  378. },
  379. "scopes": [
  380. "https://www.googleapis.com/auth/taskqueue",
  381. "https://www.googleapis.com/auth/taskqueue.consumer"
  382. ]
  383. },
  384. "lease": {
  385. "id": "taskqueue.tasks.lease",
  386. "path": "{project}/taskqueues/{taskqueue}/tasks/lease",
  387. "httpMethod": "POST",
  388. "description": "Lease 1 or more tasks from a TaskQueue.",
  389. "parameters": {
  390. "groupByTag": {
  391. "type": "boolean",
  392. "description": "When true, all returned tasks will have the same tag",
  393. "location": "query"
  394. },
  395. "leaseSecs": {
  396. "type": "integer",
  397. "description": "The lease in seconds.",
  398. "required": true,
  399. "format": "int32",
  400. "location": "query"
  401. },
  402. "numTasks": {
  403. "type": "integer",
  404. "description": "The number of tasks to lease.",
  405. "required": true,
  406. "format": "int32",
  407. "location": "query"
  408. },
  409. "project": {
  410. "type": "string",
  411. "description": "The project under which the queue lies.",
  412. "required": true,
  413. "location": "path"
  414. },
  415. "tag": {
  416. "type": "string",
  417. "description": "The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag",
  418. "location": "query"
  419. },
  420. "taskqueue": {
  421. "type": "string",
  422. "description": "The taskqueue to lease a task from.",
  423. "required": true,
  424. "location": "path"
  425. }
  426. },
  427. "parameterOrder": [
  428. "project",
  429. "taskqueue",
  430. "numTasks",
  431. "leaseSecs"
  432. ],
  433. "response": {
  434. "$ref": "Tasks"
  435. },
  436. "scopes": [
  437. "https://www.googleapis.com/auth/taskqueue",
  438. "https://www.googleapis.com/auth/taskqueue.consumer"
  439. ]
  440. },
  441. "list": {
  442. "id": "taskqueue.tasks.list",
  443. "path": "{project}/taskqueues/{taskqueue}/tasks",
  444. "httpMethod": "GET",
  445. "description": "List Tasks in a TaskQueue",
  446. "parameters": {
  447. "project": {
  448. "type": "string",
  449. "description": "The project under which the queue lies.",
  450. "required": true,
  451. "location": "path"
  452. },
  453. "taskqueue": {
  454. "type": "string",
  455. "description": "The id of the taskqueue to list tasks from.",
  456. "required": true,
  457. "location": "path"
  458. }
  459. },
  460. "parameterOrder": [
  461. "project",
  462. "taskqueue"
  463. ],
  464. "response": {
  465. "$ref": "Tasks2"
  466. },
  467. "scopes": [
  468. "https://www.googleapis.com/auth/taskqueue",
  469. "https://www.googleapis.com/auth/taskqueue.consumer"
  470. ]
  471. },
  472. "patch": {
  473. "id": "taskqueue.tasks.patch",
  474. "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
  475. "httpMethod": "PATCH",
  476. "description": "Update tasks that are leased out of a TaskQueue. This method supports patch semantics.",
  477. "parameters": {
  478. "newLeaseSeconds": {
  479. "type": "integer",
  480. "description": "The new lease in seconds.",
  481. "required": true,
  482. "format": "int32",
  483. "location": "query"
  484. },
  485. "project": {
  486. "type": "string",
  487. "description": "The project under which the queue lies.",
  488. "required": true,
  489. "location": "path"
  490. },
  491. "task": {
  492. "type": "string",
  493. "required": true,
  494. "location": "path"
  495. },
  496. "taskqueue": {
  497. "type": "string",
  498. "required": true,
  499. "location": "path"
  500. }
  501. },
  502. "parameterOrder": [
  503. "project",
  504. "taskqueue",
  505. "task",
  506. "newLeaseSeconds"
  507. ],
  508. "request": {
  509. "$ref": "Task"
  510. },
  511. "response": {
  512. "$ref": "Task"
  513. },
  514. "scopes": [
  515. "https://www.googleapis.com/auth/taskqueue",
  516. "https://www.googleapis.com/auth/taskqueue.consumer"
  517. ]
  518. },
  519. "update": {
  520. "id": "taskqueue.tasks.update",
  521. "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
  522. "httpMethod": "POST",
  523. "description": "Update tasks that are leased out of a TaskQueue.",
  524. "parameters": {
  525. "newLeaseSeconds": {
  526. "type": "integer",
  527. "description": "The new lease in seconds.",
  528. "required": true,
  529. "format": "int32",
  530. "location": "query"
  531. },
  532. "project": {
  533. "type": "string",
  534. "description": "The project under which the queue lies.",
  535. "required": true,
  536. "location": "path"
  537. },
  538. "task": {
  539. "type": "string",
  540. "required": true,
  541. "location": "path"
  542. },
  543. "taskqueue": {
  544. "type": "string",
  545. "required": true,
  546. "location": "path"
  547. }
  548. },
  549. "parameterOrder": [
  550. "project",
  551. "taskqueue",
  552. "task",
  553. "newLeaseSeconds"
  554. ],
  555. "request": {
  556. "$ref": "Task"
  557. },
  558. "response": {
  559. "$ref": "Task"
  560. },
  561. "scopes": [
  562. "https://www.googleapis.com/auth/taskqueue",
  563. "https://www.googleapis.com/auth/taskqueue.consumer"
  564. ]
  565. }
  566. }
  567. }
  568. }
  569. }