{"info":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","description":"<html><head></head><body><p>The API job scheduler is service that aims to organize and schedule tasks automatically.</p>\n<p>List of APIs:</p>\n<ol>\n<li>Auth (<code>{{base_url}}/users</code>)</li>\n<li>Job (<code>{{base_url}}/jobs</code>)</li>\n</ol>\n<h2 id=\"authentication\">Authentication</h2>\n<p>The API job scheduler uses <strong>Token-based</strong> for authentication. You can generate a <strong>Token</strong> when you register/login, that will generate the token. You must include a Token in each other APIs request with the <code>Authorization</code> request header.</p>\n<p><code>Authorization: Token</code></p>\n<h2 id=\"general-response\">General Response</h2>\n<p><strong>Unauthorizae</strong></p>\n<p>If an Token is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"errors\": {\n        \"error_message\": \"Authentication credentials were not provided.\",\n        \"code\": \"not_authenticated\",\n        \"validation_error\": null\n    }\n}\n\n</code></pre>\n<p><strong>Not Found</strong></p>\n<p>You will get this response if the url you’re trying to access is wrong, or if the resource you’re trying to access is not exist.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"errors\": {\n        \"error_message\": \"Page not found.\",\n        \"code\": \"not_found\",\n        \"validation_error\": null\n    }\n}\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"15717582","collectionId":"c12ce7db-a45a-4413-aaf7-84400853df20","publishedId":"2sA35BaP94","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-03-23T02:32:54.000Z"},"item":[{"name":"Auth","item":[{"name":"Register","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","let responseData = pm.response.json();","pm.collectionVariables.set(\"token\", responseData.token);",""],"type":"text/javascript","id":"020dfcf6-d329-4003-8315-f5b5d3465147"}}],"id":"d79c5d78-8233-4f86-bf0b-cea5b731e980","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ahmadhipranant@gmail.com\",\n    \"full_name\": \"Ahmadhi Prananta\",\n    \"password\": \"32313231\"\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/users/register/","description":"<p>This endpoint allows users to create new accounts by providing necessary information <code>email</code>, <code>full_name</code>, and <code>password</code>.</p>\n<h4 id=\"parameters\"><strong>Parameters</strong></h4>\n<p>Here's a list of all the parameters which can be used in this endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>ATTRIBUTE</strong></th>\n<th><strong>DESCRIPTION</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code>  <br />  <br />  <br /><code>full_name</code>  <br />  <br />  <br /><code>password</code></td>\n<td><strong>string (required)</strong>  <br />User's email.  <br />  <br /><strong>string (required)</strong>  <br />User's full name.  <br />  <br /><strong>string (required)</strong>  <br />User's password.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["users","register",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"9a2322f2-012e-4c42-96d6-ad4f222c2596","name":"Successful Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ahmadhipranant@gmail.com\",\n    \"full_name\": \"Ahmadhi Prananta\",\n    \"password\": \"32313231\"\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/users/register/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2024 07:51:52 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"127"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"full_name\": \"Ahmadhi Prananta\",\n        \"email\": \"ahmadhipranant@gmail.com\"\n    },\n    \"token\": \"d4d76a2f1fc0a5199ab29069bb3ddbc65b6c3067\"\n}"},{"id":"02774e03-5bb2-4410-9923-4921cd7ce6a9","name":"Duplicate Email","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ahmadhipranant@gmail.com\",\n    \"full_name\": \"Ahmadhi Prananta\",\n    \"password\": \"32313231\"\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/users/register/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2024 11:07:42 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"202"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": {\n        \"error_message\": \"duplicate key value violates unique constraint \\\"user_email_key\\\"\\nDETAIL:  Key (email)=(ahmadhipranant@gmail.com) already exists.\\n\",\n        \"code\": \"error\",\n        \"validation_error\": null\n    }\n}"}],"_postman_id":"d79c5d78-8233-4f86-bf0b-cea5b731e980"},{"name":"Login","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","let responseData = pm.response.json();","if (responseData) {","    pm.collectionVariables.set(\"token\", responseData.token);","}","",""],"type":"text/javascript","id":"bb5f040e-18b5-4041-916a-1be1a0001a90"}},{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript","id":"00fab5de-698f-4e7a-8926-0a231bb8a09a"}}],"id":"65c39a42-d219-4eae-8972-373c83b75690","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ahmadhipranant@gmail.com\",\n    \"password\": \"32313231\"\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/users/login/","description":"<p>This endpoint verifies user credentials (such as <code>email</code> and <code>password</code>) and returns a token identifier for authentication to access restricted resources.</p>\n<h4 id=\"parameters\"><strong>Parameters</strong></h4>\n<p>Here's a list of all the parameters which can be used in this endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>ATTRIBUTE</strong></th>\n<th><strong>DESCRIPTION</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code>  <br />  <br />  <br /><code>password</code></td>\n<td><strong>string (required)</strong>  <br />User's email.  <br />  <br /><strong>string (required)</strong>  <br />User's password.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["users","login",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"3e06f136-9626-4d1e-9f17-9f143c0675d1","name":"Successful Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ahmadhipranant@gmail.com\",\n    \"password\": \"32313231\"\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/users/login/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2024 07:51:58 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"127"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"full_name\": \"Ahmadhi Prananta\",\n        \"email\": \"ahmadhipranant@gmail.com\"\n    },\n    \"token\": \"d4d76a2f1fc0a5199ab29069bb3ddbc65b6c3067\"\n}"},{"id":"74072b86-1fe0-4deb-ad42-c6dc0b2d1b8d","name":"Invalid Email or Password","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ahmadhipranant@gmail.co\",\n    \"password\": \"32313231\"\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/users/login/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 09:27:17 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"113"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": {\n        \"error_message\": \"Email and password combination is incorrect\",\n        \"code\": \"error\",\n        \"validation_error\": null\n    }\n}"}],"_postman_id":"65c39a42-d219-4eae-8972-373c83b75690"}],"id":"515f9a6c-ecb1-41da-8caf-71285fdd3e61","description":"<p>The <code>/users</code> endpoints let you manage information about the user. To use others API, you need to register/login first.</p>\n","auth":{"type":"noauth","isInherited":false},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"cea511fc-2560-4636-83c0-69209563b7a2"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"44a4d2b4-53bb-4e5e-8eea-bfc830f089b1"}}],"_postman_id":"515f9a6c-ecb1-41da-8caf-71285fdd3e61"},{"name":"Job Service","item":[{"name":"Create Job","id":"58e83dbe-d184-41b1-9573-dc1db1223169","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Send email after 2 minutes\",\n    \"is_recurring\": false,\n    \"interval\": \"PT2M\",\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"max_retry_count\": 3,\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"receiver\": \"ahmadhihastiputra@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/jobs/","description":"<p>Create a new job.</p>\n<p>A successful POST request typically returns a <code>201 CREATED</code> response code.</p>\n<h4 id=\"parameters\"><strong>Parameters</strong></h4>\n<p>Here's a list of all the parameters which can be used in this endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>ATTRIBUTE</strong></th>\n<th><strong>DESCRIPTION</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code>  <br />  <br />  <br /><code>is_recurring</code>  <br />  <br />  <br />  <br /><code>interval</code>  <br />  <br />  <br />  <br />  <br />  <br />  <br />  <br /><code>max_retry_count</code>  <br />  <br />  <br />  <br />  <br /><code>callback_url</code>  <br />  <br />  <br />  <br /><code>job_type</code>  <br />  <br />  <br />  <br /><code>config</code></td>\n<td><strong>string (required)</strong>  <br />The job name.  <br />  <br /><strong>boolean (required)</strong>  <br />The system should support one-time execution <strong>or</strong> recurring style.  <br />  <br /><strong>string (required)</strong>  <br />Durations represented using the ISO 8601 duration format (<strong>PnDTnHnMn</strong>).  <br />Documentation: <a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html</a>  <br />  <br /><strong>integer (required)</strong>  <br />maximum number of times a task will be attempted in case of failures or errors.  <br />  <br /><strong>string (required)</strong>  <br />The callback URL that will sent wether the request is success or failed.  <br />  <br /><strong>string (required)</strong>  <br />The type of job to be executed.  <br />For now, it supports only: <strong>SEND_EMAIL</strong>  <br />  <br /><strong>JSON (required)</strong>  <br />config for the request. This can contains anything types. For <strong>SEND_EMAIL</strong> type, the config will as follow:  <br /><code>receiver</code>: (<strong>string</strong>)  <br /><code>message</code>: (<strong>string</strong>)</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"b3725437-2504-405a-8ff6-90cc4f1c0cba","name":"Successful Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Send email after 2 minutes\",\n    \"is_recurring\": false,\n    \"interval\": \"PT2M\",\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"max_retry_count\": 3,\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"receiver\": \"ahmadhihastiputra@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/jobs/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 11:03:05 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"49"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"job_id\": \"89a82faf-b82a-4544-a4ee-3f7e4bb70e7e\"\n}"}],"_postman_id":"58e83dbe-d184-41b1-9573-dc1db1223169"},{"name":"List Job","id":"8ec830dd-ef09-45f1-8db1-1b75469e4930","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/","description":"<p>List all jobs.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"3fc7fe1b-9be0-4963-929e-6e8ad02f507c","name":"Successful Response","originalRequest":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 09:54:28 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"782"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"jobs\": [\n        {\n            \"job_id\": \"5c909276-2cfd-4c8b-b5b3-2028e85f27c6\",\n            \"name\": \"Test 1 Minutes Job Periodically\",\n            \"is_recurring\": false,\n            \"interval\": \"PT1M\",\n            \"max_retry_count\": 3,\n            \"callback_url\": \"https://email.requestcatcher.com/\",\n            \"job_type\": \"SEND_EMAIL\",\n            \"config\": {\n                \"sender\": \"ahmadhiprananta@gmail.com\",\n                \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\n                \"receiver\": \"ahmadhihastiputra@gmail.com\"\n            }\n        }\n    ]\n}"}],"_postman_id":"8ec830dd-ef09-45f1-8db1-1b75469e4930"},{"name":"Get Job","id":"18d79b8b-79c7-4ca7-b4ab-7ac1780349c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/","description":"<p>Get a job using ID.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs","5c909276-2cfd-4c8b-b5b3-2028e85f27c6",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"9a785206-6f89-4fe4-9f86-e36ef0d16399","name":"Successful Response","originalRequest":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:10:00 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"771"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"job_id\": \"5c909276-2cfd-4c8b-b5b3-2028e85f27c6\",\n    \"name\": \"Test 1 Minutes Job Periodically\",\n    \"is_recurring\": false,\n    \"interval\": \"PT1M\",\n    \"max_retry_count\": 3,\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"sender\": \"ahmadhiprananta@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\n        \"receiver\": \"ahmadhihastiputra@gmail.com\"\n    }\n}"},{"id":"f0021055-6a55-41f4-9f81-57fd36f167ca","name":"Job Not Found","originalRequest":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:41:39 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"83"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": {\n        \"error_message\": \"Job not found\",\n        \"code\": \"error\",\n        \"validation_error\": null\n    }\n}"}],"_postman_id":"18d79b8b-79c7-4ca7-b4ab-7ac1780349c8"},{"name":"Update Job","id":"f34e68ea-0c87-4795-9ca8-d8f0fce36387","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Send email after 2 minutes\",\n    \"is_recurring\": false,\n    \"interval\": \"PT2M\",\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"max_retry_count\": 5,\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"receiver\": \"ahmadhihastiputra@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/","description":"<p>Update job using ID.</p>\n<h4 id=\"parameters\"><strong>Parameters</strong></h4>\n<p>Here's a list of all the parameters which can be used in this endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>ATTRIBUTE</strong></th>\n<th><strong>DESCRIPTION</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code>  <br />  <br />  <br /><code>is_recurring</code>  <br />  <br />  <br />  <br /><code>interval</code>  <br />  <br />  <br />  <br />  <br />  <br />  <br /><code>max_retry_count</code>  <br />  <br />  <br />  <br /><code>callback_url</code>  <br />  <br />  <br />  <br /><code>job_type</code>  <br />  <br />  <br />  <br /><code>config</code></td>\n<td><strong>string (required)</strong>  <br />The job name.  <br />  <br /><strong>boolean (required)</strong>  <br />The system should support one-time execution <strong>or</strong> recurring style.  <br />  <br /><strong>string (required)</strong>  <br />Durations represented using the ISO 8601 duration format (<strong>PnDTnHnMn</strong>).  <br />Documentation: <a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html</a>  <br />  <br /><strong>integer (required)</strong>  <br />Tmaximum number of times a task will be attempted in case of failures or errors.  <br />  <br /><strong>string (required)</strong>  <br />The callback URL that will sent wether the request is success or failed.  <br />  <br /><strong>string (required)</strong>  <br />The type of job to be executed.  <br />For now, it supports only: <strong>SEND_EMAIL</strong>  <br />  <br /><strong>JSON (required)</strong>  <br />config for the request. This can contains anything types. For <strong>SEND_EMAIL</strong> type, the config will as follow:  <br /><code>receiver</code>: (<strong>string</strong>)  <br /><code>message</code>: (<strong>string</strong>)</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs","5c909276-2cfd-4c8b-b5b3-2028e85f27c6",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"ed136c29-2c80-44b6-a927-6ee841771a65","name":"Successful Response","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Send email after 2 minutes\",\n    \"is_recurring\": false,\n    \"interval\": \"PT2M\",\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"max_retry_count\": 5,\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"receiver\": \"ahmadhihastiputra@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:42:46 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"725"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"name\": \"Send email after 2 minutes\",\n    \"is_recurring\": false,\n    \"interval\": \"PT2M\",\n    \"max_retry_count\": 5,\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"receiver\": \"ahmadhihastiputra@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n    },\n    \"id\": \"5c909276-2cfd-4c8b-b5b3-2028e85f27c6\"\n}"},{"id":"88190899-c9a4-417a-991e-6b3aa06a0a5f","name":"Job Not Found","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Send email after 2 minutes\",\n    \"is_recurring\": false,\n    \"interval\": \"PT2M\",\n    \"callback_url\": \"https://email.requestcatcher.com/\",\n    \"max_retry_count\": 5,\n    \"job_type\": \"SEND_EMAIL\",\n    \"config\": {\n        \"receiver\": \"ahmadhihastiputra@gmail.com\",\n        \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c7/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:43:03 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"83"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": {\n        \"error_message\": \"Job not found\",\n        \"code\": \"error\",\n        \"validation_error\": null\n    }\n}"},{"id":"dea51f49-f458-46b2-9672-4239fcc15132","name":"Validation Error","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"My Youtube\",\n    \"host\": \"youtube.com\",\n    \"enabled\": true,\n    \"timeout\": 2500\n}","options":{"raw":{"language":"json"}}},"url":"{{localUrl}}/services/0bb687d0-212d-4cd4-9c52-ca9a5d06e57c/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 03 Mar 2024 15:25:38 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.10"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"160"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": {\n        \"error_message\": \"Something went wrong.\",\n        \"code\": \"invalid\",\n        \"validation_error\": {\n            \"port\": [\n                \"This field is required.\"\n            ],\n            \"path\": [\n                \"This field is required.\"\n            ]\n        }\n    }\n}"}],"_postman_id":"f34e68ea-0c87-4795-9ca8-d8f0fce36387"},{"name":"Delete Job","id":"60f86399-e9b3-4ca2-a1c8-efb64d9e368e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/","description":"<p>Delete a job.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs","5c909276-2cfd-4c8b-b5b3-2028e85f27c6",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"4e7c3980-c047-47a6-867e-2c47b4cd9086","name":"Successful Response","originalRequest":{"method":"DELETE","header":[],"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c6/"},"status":"No Content","code":204,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:44:08 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"38"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Successfully deleted job\"\n}"},{"id":"eacb9077-d148-4628-ac25-895419f0fee4","name":"Job Not Found","originalRequest":{"method":"DELETE","header":[],"url":"http://35.208.188.151/jobs/5c909276-2cfd-4c8b-b5b3-2028e85f27c7/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:43:35 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"83"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": {\n        \"error_message\": \"Job not found\",\n        \"code\": \"error\",\n        \"validation_error\": null\n    }\n}"}],"_postman_id":"60f86399-e9b3-4ca2-a1c8-efb64d9e368e"}],"id":"4db945ca-1e3c-4d77-b89d-834f9bbc98cb","description":"<p>The <code>/jobs</code> endpoints let you manage your job.</p>\n","_postman_id":"4db945ca-1e3c-4d77-b89d-834f9bbc98cb","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}}},{"name":"Task History","item":[{"name":"List Task Execution History","id":"7bbad11f-2fc5-4d0b-9ecd-ae3d5b3bcc18","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/task-histories/","description":"<p>List all task history.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs","task-histories",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"14bbdeef-bb98-4538-943a-756fd28144eb","name":"Successful Response","originalRequest":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/task-histories/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:50:11 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"203"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"task_histories\": [\n        {\n            \"id\": \"2bd9b6c2-b1bb-4587-be62-180e062c9f04\",\n            \"execution_time\": \"2024-04-07T17:47:40.724820+07:00\",\n            \"status\": \"COMPLETED\",\n            \"retry_count\": 1,\n            \"created_at\": \"2024-04-07T17:47:38.977000+07:00\"\n        }\n    ]\n}"}],"_postman_id":"7bbad11f-2fc5-4d0b-9ecd-ae3d5b3bcc18"},{"name":"Get Task Execution History","id":"9b1b9430-db2b-45f6-aa40-96d87bfbff5b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/task-histories/2bd9b6c2-b1bb-4587-be62-180e062c9f04/","description":"<p>Get a task history using ID.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}},"urlObject":{"path":["jobs","task-histories","2bd9b6c2-b1bb-4587-be62-180e062c9f04",""],"host":["http://35.208.188.151"],"query":[],"variable":[]}},"response":[{"id":"cf153640-691e-4417-a8d9-41ccc0e435f9","name":"Successful Response","originalRequest":{"method":"GET","header":[],"url":"http://35.208.188.151/jobs/task-histories/2bd9b6c2-b1bb-4587-be62-180e062c9f04/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 07 Apr 2024 10:50:37 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.8.19"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, origin"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"182"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"2bd9b6c2-b1bb-4587-be62-180e062c9f04\",\n    \"execution_time\": \"2024-04-07T17:47:40.724820+07:00\",\n    \"status\": \"COMPLETED\",\n    \"retry_count\": 1,\n    \"created_at\": \"2024-04-07T17:47:38.977000+07:00\"\n}"}],"_postman_id":"9b1b9430-db2b-45f6-aa40-96d87bfbff5b"}],"id":"7fea3f4c-e5bd-4090-aabf-2cfbe677b972","description":"<p>An <code>jobs/task-histories</code> endpoint that retrieve all or the latest execution histories and their status related to a specific <code>job_id</code></p>\n","_postman_id":"7fea3f4c-e5bd-4090-aabf-2cfbe677b972","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c12ce7db-a45a-4413-aaf7-84400853df20","id":"c12ce7db-a45a-4413-aaf7-84400853df20","name":"API Job Scheduler Documentation","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]}},"event":[{"listen":"prerequest","script":{"id":"df445f5e-35dc-4a86-8288-23fddb335f0e","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ed5a9ce4-13a1-4400-af73-bd26c34764c7","type":"text/javascript","exec":[""]}}],"variable":[{"key":"token","value":"","type":"string"},{"key":"baseUrl","value":"http://localhost:8000","type":"string","disabled":true},{"key":"baseUrl","value":"http://35.208.188.151","type":"string"}]}