{"info":{"_postman_id":"688672df-1671-4404-ad25-5126139a0f80","name":"grape","description":"<html><head></head><body><p>Grape is a distributed delay task system based on Redis. </p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8030511","collectionId":"688672df-1671-4404-ad25-5126139a0f80","publishedId":"SVYoufE8","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-08-02T02:20:16.000Z"},"item":[{"name":"Job API","item":[{"name":"produce","id":"90fbc270-790f-45a9-ab9e-cf5c2dd449fe","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"orderId\": \"j001\",\n    \"sumMoney\": 2000,\n    \"count\": 10000\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9521/api/job/produce?tube=test&jid=j004&dtr=1000&ttr=10000","description":"<p>produce a job to delay queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","produce"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>job id</p>\n","type":"text/plain"},"key":"jid","value":"j004"},{"description":{"content":"<p>delay to run ms</p>\n","type":"text/plain"},"key":"dtr","value":"1000"},{"description":{"content":"<p>time to run ms</p>\n","type":"text/plain"},"key":"ttr","value":"10000"}],"variable":[]}},"response":[{"id":"01f4a2c5-ba04-47da-bccb-46fd941bc53a","name":"produce","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"orderId\": \"j001\",\n    \"sumMoney\": 2000,\n    \"count\": 10000\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:9521/api/job/produce?tube=test&jid=j004&dtr=1000&ttr=10000","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","produce"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"jid","value":"j004","description":"job id"},{"key":"dtr","value":"1000","description":"delay to run ms"},{"key":"ttr","value":"10000","description":"time to run ms"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"4"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"90fbc270-790f-45a9-ab9e-cf5c2dd449fe"},{"name":"release","id":"48f92d46-4a8a-4cda-9057-817747e25ca0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://localhost:9521/api/job/release?tube=test&jid=j001&dtr=20000","description":"<p>release a job to delay queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","release"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>job id</p>\n","type":"text/plain"},"key":"jid","value":"j001"},{"description":{"content":"<p>job delay to run x ms</p>\n","type":"text/plain"},"key":"dtr","value":"20000"}],"variable":[]}},"response":[{"id":"14b0b36b-6882-41f1-893e-945581f67731","name":"release","originalRequest":{"method":"PUT","header":[],"url":{"raw":"http://localhost:9521/api/job/release?tube=test&jid=j001&dtr=20000","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","release"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"jid","value":"j001","description":"job id"},{"key":"dtr","value":"20000","description":"job delay to run x ms"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"5"}],"cookie":[],"responseTime":null,"body":"false"}],"_postman_id":"48f92d46-4a8a-4cda-9057-817747e25ca0"},{"name":"kick","id":"a011624f-1b23-4c4b-a053-613732734bac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"tube","value":"test","type":"text","description":"<p>tube name</p>\n"},{"key":"id","value":"j001","type":"text","description":"<p>job id</p>\n"},{"key":"dtr","value":"2000","type":"text","description":"<p>job delay to run x ms</p>\n"}]},"url":"http://localhost:9521/api/job/kick?tube=test&jid=j002&dtr=10000","description":"<p>kick a job from failure queue to delay queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","kick"],"host":["localhost"],"query":[{"key":"tube","value":"test"},{"key":"jid","value":"j002"},{"key":"dtr","value":"10000"}],"variable":[]}},"response":[{"id":"0c63af4c-c28f-4657-8029-105d9045ed5a","name":"kick","originalRequest":{"method":"PUT","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"tube","value":"test","type":"text","description":"tube name"},{"key":"id","value":"j001","type":"text","description":"job id"},{"key":"dtr","value":"2000","type":"text","description":"job delay to run x ms"}]},"url":{"raw":"http://localhost:9521/api/job/kick?tube=test&jid=j002&dtr=10000","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","kick"],"query":[{"key":"tube","value":"test"},{"key":"jid","value":"j002"},{"key":"dtr","value":"10000"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"5"}],"cookie":[],"responseTime":null,"body":"false"}],"_postman_id":"a011624f-1b23-4c4b-a053-613732734bac"},{"name":"delete","id":"8c6ea9ea-a452-4eee-b974-ea7cb9e081d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:9521/api/job/delete?tube=test&jid=j001","description":"<p>delete a job from delay queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","delete"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>job id</p>\n","type":"text/plain"},"key":"jid","value":"j001"}],"variable":[]}},"response":[{"id":"d82b99d3-b757-42ca-bb8e-8168127cbdfd","name":"delete","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:9521/api/job/delete?tube=test&jid=j001","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","delete"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"jid","value":"j001","description":"job id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"4"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"8c6ea9ea-a452-4eee-b974-ea7cb9e081d2"},{"name":"finish","id":"42ccc09a-3561-449e-95fb-544bb9127f52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:9521/api/job/finish?tube=test&jid=j003","description":"<p>finish a job from remain queue when processing the job is ok</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","finish"],"host":["localhost"],"query":[{"key":"tube","value":"test"},{"key":"jid","value":"j003"}],"variable":[]}},"response":[{"id":"8396d588-b7c1-4ffd-ab1a-735e97de1497","name":"finish","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:9521/api/job/finish?tube=test&jid=j003","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","finish"],"query":[{"key":"tube","value":"test"},{"key":"jid","value":"j003"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"5"}],"cookie":[],"responseTime":null,"body":"false"}],"_postman_id":"42ccc09a-3561-449e-95fb-544bb9127f52"},{"name":"discard","id":"154baaed-0d5c-4843-8f7d-1a4b05f32e7c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:9521/api/job/discard?tube=test&jid=j002","description":"<p>discard a job for failure queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","discard"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>job id</p>\n","type":"text/plain"},"key":"jid","value":"j002"}],"variable":[]}},"response":[{"id":"6fa7d242-40af-4f4a-9e85-03b83031778e","name":"discard","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:9521/api/job/discard?tube=test&jid=j002","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","discard"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"jid","value":"j002","description":"job id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"5"}],"cookie":[],"responseTime":null,"body":"false"}],"_postman_id":"154baaed-0d5c-4843-8f7d-1a4b05f32e7c"},{"name":"bury","id":"dec5628c-b9af-4b72-8184-7fea731d3b92","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://localhost:9521/api/job/bury?tube=test&jid=j004","description":"<p>failured a job from remain queue to failure queue when processing the job is failed</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","bury"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>job id</p>\n","type":"text/plain"},"key":"jid","value":"j004"}],"variable":[]}},"response":[{"id":"31a7d272-8338-4866-a48f-9cad5b4d00d0","name":"bury","originalRequest":{"method":"PUT","header":[],"url":{"raw":"http://localhost:9521/api/job/bury?tube=test&jid=j004","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","bury"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"jid","value":"j004","description":"job id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"4"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"dec5628c-b9af-4b72-8184-7fea731d3b92"},{"name":"consume","id":"812db58e-b37d-443b-aa10-3badfedfe840","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9521/api/job/consume?tube=test&max=10","description":"<p>consume jobs from ready queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","consume"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>max consume size per times</p>\n","type":"text/plain"},"key":"max","value":"10"}],"variable":[]}},"response":[{"id":"2997a5dc-bfc1-4755-8e9a-b5dd1cba3042","name":"consume","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:9521/api/job/consume?tube=test&max=10","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","consume"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"max","value":"10","description":"max consume size per times"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"146"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"j004\",\n        \"dtr\": 1000,\n        \"ttr\": 10000,\n        \"noe\": 0,\n        \"data\": \"ewogICAgIm9yZGVySWQiOiAiajAwMSIsCiAgICAic3VtTW9uZXkiOiAyMDAwLAogICAgImNvdW50IjogMTAwMDAKfQ\"\n    }\n]"}],"_postman_id":"812db58e-b37d-443b-aa10-3badfedfe840"},{"name":"peek","id":"15ad4236-c4bd-4334-a3b3-7e9886ec0091","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9521/api/job/peek?tube=test&max=10","description":"<p>peek a job from failure queue</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","job","peek"],"host":["localhost"],"query":[{"description":{"content":"<p>tube name</p>\n","type":"text/plain"},"key":"tube","value":"test"},{"description":{"content":"<p>max peek size per times</p>\n","type":"text/plain"},"key":"max","value":"10"}],"variable":[]}},"response":[{"id":"2425d971-a975-4243-b189-6687444de20e","name":"peek","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:9521/api/job/peek?tube=test&max=10","protocol":"http","host":["localhost"],"port":"9521","path":["api","job","peek"],"query":[{"key":"tube","value":"test","description":"tube name"},{"key":"max","value":"10","description":"max peek size per times"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"146"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"j004\",\n        \"dtr\": 1000,\n        \"ttr\": 10000,\n        \"noe\": 3,\n        \"data\": \"ewogICAgIm9yZGVySWQiOiAiajAwMSIsCiAgICAic3VtTW9uZXkiOiAyMDAwLAogICAgImNvdW50IjogMTAwMDAKfQ\"\n    }\n]"}],"_postman_id":"15ad4236-c4bd-4334-a3b3-7e9886ec0091"}],"id":"81380173-d31b-4d84-80f8-d57674a0d77c","description":"<p>job api for produce and consume delay job</p>\n","event":[{"listen":"prerequest","script":{"id":"b198fd8e-c5a5-4d59-a214-102cedfcc355","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d108d250-98d9-403f-82fd-f83cf7a30df4","type":"text/javascript","exec":[""]}}],"_postman_id":"81380173-d31b-4d84-80f8-d57674a0d77c"},{"name":"Tube API","item":[{"name":"list","id":"33f61eb4-73fa-4c30-8eff-5e444a68f898","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9521/api/tube/list","description":"<p>get tube set</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","tube","list"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d6dab124-a86e-4afc-90fe-784c72dbd63e","name":"list","originalRequest":{"method":"GET","header":[],"url":"http://localhost:9521/api/tube/list"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"8"}],"cookie":[],"responseTime":null,"body":"[\n    \"test\"\n]"}],"_postman_id":"33f61eb4-73fa-4c30-8eff-5e444a68f898"},{"name":"stats","id":"e3a5a2cb-30a5-41a7-803d-01bdf2221773","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9521/api/tube/stats","description":"<p>get tube's stats info</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","tube","stats"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1c95009d-49fc-4e8e-8da4-4f04e36b7fc0","name":"stats","originalRequest":{"method":"GET","header":[],"url":"http://localhost:9521/api/tube/stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"140"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"dateTime\": 1689390610122,\n        \"tubeName\": \"test\",\n        \"totalJobSize\": 0,\n        \"finishJobSize\": 0,\n        \"delayQueueSize\": 0,\n        \"retainQueueSize\": 0,\n        \"failedQueueSize\": 1\n    }\n]"},{"id":"8f7af9ee-7945-4d69-a694-1627dad3a8c0","name":"stats","originalRequest":{"method":"GET","header":[],"url":"https://adc969ef-170b-416b-9340-d3da862d0d9c.mock.pstmn.io/api/tube/stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 25 Jul 2023 08:39:03 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"221"},{"key":"Connection","value":"keep-alive"},{"key":"x-srv-trace","value":"v=1;t=d90d2b0a634a8acb"},{"key":"x-srv-span","value":"v=1;s=7c6afdb39874da24"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"X-RateLimit-Limit","value":"120"},{"key":"X-RateLimit-Remaining","value":"119"},{"key":"X-RateLimit-Reset","value":"1690274403"},{"key":"ETag","value":"W/\"dd-Su3/QGMo0zqQ5lQPgGjgVMXCRtk\""},{"key":"Vary","value":"Accept-Encoding"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"dateTime\": 1689390610122,\n        \"tubeName\": \"test\",\n        \"totalJobSize\": 0,\n        \"finishJobSize\": 0,\n        \"delayQueueSize\": 0,\n        \"retainQueueSize\": 0,\n        \"failedQueueSize\": 1\n    }\n]"}],"_postman_id":"e3a5a2cb-30a5-41a7-803d-01bdf2221773"},{"name":"stats/:tube","id":"f9c7a789-1b05-43e7-970f-62dc715e2b86","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9521/api/tube/stats/test","description":"<p>get tube's stats info</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","tube","stats","test"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a176d4fd-50ed-47b7-9555-c73ace1b3b7e","name":"stats/:tube","originalRequest":{"method":"GET","header":[],"url":"http://localhost:9521/api/tube/stats/test"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"138"}],"cookie":[],"responseTime":null,"body":"{\n    \"dateTime\": 1689390621584,\n    \"tubeName\": \"test\",\n    \"totalJobSize\": 0,\n    \"finishJobSize\": 0,\n    \"delayQueueSize\": 0,\n    \"retainQueueSize\": 0,\n    \"failedQueueSize\": 1\n}"},{"id":"f9ff337d-456b-468f-aca9-e047b972ffc6","name":"stats/:tube","originalRequest":{"method":"GET","header":[],"url":"https://adc969ef-170b-416b-9340-d3da862d0d9c.mock.pstmn.io/api/tube/stats/test"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 25 Jul 2023 08:40:52 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"181"},{"key":"Connection","value":"keep-alive"},{"key":"x-srv-trace","value":"v=1;t=2767fb87fae52879"},{"key":"x-srv-span","value":"v=1;s=6a1e4c07fc4ad041"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"X-RateLimit-Limit","value":"120"},{"key":"X-RateLimit-Remaining","value":"118"},{"key":"X-RateLimit-Reset","value":"1690274469"},{"key":"ETag","value":"W/\"b5-YLGSq0JqUErrqtwUGs8Szb1w5uQ\""},{"key":"Vary","value":"Accept-Encoding"}],"cookie":[],"responseTime":null,"body":"{\n    \"dateTime\": 1689390621584,\n    \"tubeName\": \"test\",\n    \"totalJobSize\": 0,\n    \"finishJobSize\": 0,\n    \"delayQueueSize\": 0,\n    \"retainQueueSize\": 0,\n    \"failedQueueSize\": 1\n}"}],"_postman_id":"f9c7a789-1b05-43e7-970f-62dc715e2b86"},{"name":"create","id":"51e885ef-c8fe-4cde-a4cb-cd41562f88f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:9521/api/tube/create?tube=test","description":"<p>create a tube</p>\n","urlObject":{"protocol":"http","port":"9521","path":["api","tube","create"],"host":["localhost"],"query":[{"key":"tube","value":"test"}],"variable":[]}},"response":[{"id":"25eb817f-76a5-4962-a911-08f5386cb8b8","name":"create","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://localhost:9521/api/tube/create?tube=test","protocol":"http","host":["localhost"],"port":"9521","path":["api","tube","create"],"query":[{"key":"tube","value":"test"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"content-length","value":"4"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"51e885ef-c8fe-4cde-a4cb-cd41562f88f3"}],"id":"a0008f76-e5f5-4859-a0f6-0553762b8cc8","description":"<p>tube api for tube stats info</p>\n","event":[{"listen":"prerequest","script":{"id":"688953df-f783-44ac-b8e6-4b73957bd7dc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"74598205-03fb-432e-9ce6-2db737c05d29","type":"text/javascript","exec":[""]}}],"_postman_id":"a0008f76-e5f5-4859-a0f6-0553762b8cc8"}],"event":[{"listen":"prerequest","script":{"id":"7519d475-1895-4df0-809e-43b35181bf1f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4b1e7874-00ff-490f-9ed4-271c876478f4","type":"text/javascript","exec":[""]}}],"variable":[{"key":"tubename","value":"test"},{"key":"host","value":"http://localhost:9521","type":"string"}]}