{"info":{"_postman_id":"8bba7691-3ca7-48cb-9d8f-009272f1b56f","name":"Pet Store","description":"<html><head></head><body><h2 id=\"introduction\">Introduction</h2>\n<p>This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on <a href=\"http://swagger.io/irc/\">irc.freenode.net, #swagger</a>. For this sample, you can use the api key <code>special-key</code> to test the authorization filters.</p>\n<p>Find out more about Swagger: <a href=\"http://swagger.io\">http://swagger.io</a></p>\n<h2 id=\"environments\">Environments</h2>\n<p>This API has support for multiple environments. Each environment has one or more base URIs defined.</p>\n<h3 id=\"production\">Production</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Server</th>\n<th>Base URI</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>server1</td>\n<td><code>https://petstore.swagger.io/v2</code></td>\n</tr>\n<tr>\n<td>server2</td>\n<td><code>http://petstore.swagger.io/v2</code></td>\n</tr>\n<tr>\n<td>auth server</td>\n<td><code>https://petstore.swagger.io/oauth</code></td>\n</tr>\n</tbody>\n</table>\n</div><p>The default environment is <strong>production</strong> and the default server is <strong>server1</strong>.</p>\n<h2 id=\"authorization\">Authorization</h2>\n<p>The<br>SDK will attempt to authorize by providing no scopes in case an<br>endpoint requiring authentication is called. You can also authorize the<br>client yourself.</p>\n<p>Your application must obtain user authorization before it can execute an endpoint call. The SDK uses <em>OAuth 2.0 Implicit Grant</em> to obtain a user's consent to perform an API request on user's behalf.</p>\n<p>This process requires the presence of a client-side JavaScript code on the redirect URI page to receive the <em>access token</em> after the consent step is completed.</p>\n<h3 id=\"1--obtain-user-consent\">1- Obtain user consent</h3>\n<p>To<br>obtain user's consent, you must redirect the user to the authorization<br>page. You must pass the scopes for which you need permission to access.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{URI for auth server}/authorize?response_type=code&amp;client_id={CLIENT_ID}&amp;redirect_uri={REDIRECT_URI}&amp;scope={SCOPE}\n\n</code></pre><h3 id=\"2--handle-the-oauth-server-response\">2- Handle the OAuth server response</h3>\n<p>Once<br>the user responds to the consent request, the OAuth 2.0 server responds<br>to your application's access request by redirecting the user to the<br>redirect URI specified set in <code>Configuration</code>.</p>\n<p>The redirect URI will receive the <em>access token</em> as the <code>token</code> argument in the URL fragment.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://example.com/oauth/callback#token=XXXXXXXXXXXXXXXXXXXXXXXXX\n\n</code></pre><p>The<br>access token must be extracted by the client-side JavaScript code. The<br>access token can be used to authorize any further endpoint calls by the<br>JavaScript code.</p>\n<h3 id=\"scopes\">Scopes</h3>\n<p>Scopes<br>enable your application to only request access to the resources it<br>needs while enabling users to control the amount of access they grant to<br>your application. The following scopes are available:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Scope Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>read:pets</code></td>\n<td>read your pets</td>\n</tr>\n<tr>\n<td><code>write:pets</code></td>\n<td>modify pets in your account</td>\n</tr>\n</tbody>\n</table>\n</div><p>Tester: Bagus Cahyo Sulistiyo</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12159507","collectionId":"8bba7691-3ca7-48cb-9d8f-009272f1b56f","publishedId":"2sAXjPzpqv","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-09-04T23:52:46.000Z"},"item":[{"name":"User","item":[{"name":"Login","event":[{"listen":"test","script":{"id":"787aff4a-b38f-44f1-9531-97b18cab89d8","exec":["pm.test(\"TS_LG_01 - Login Berhasil\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"61e03bd6-7014-4d3f-994a-4b3a12019e0c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"{{username}}","type":"text"},{"key":"password","value":"{{password}}","type":"text"}]},"url":"{{url}}/user/login","urlObject":{"path":["user","login"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"61e03bd6-7014-4d3f-994a-4b3a12019e0c"},{"name":"Logout","event":[{"listen":"test","script":{"id":"e8618efc-66a0-45da-8f37-959962e4f67b","exec":["pm.test(\"TS_LGT_002 - Akun Berhasil Logout\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"e4d0900b-2c10-49e0-8da2-eb17bd1c387f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{url}}/user/logout","urlObject":{"path":["user","logout"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e4d0900b-2c10-49e0-8da2-eb17bd1c387f"},{"name":"Create User","event":[{"listen":"test","script":{"id":"47fe289b-dc13-470c-ad33-2905c7491602","exec":["pm.test(\"TS_AU_01 - Berhasil Menambah User\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"70a73ac3-442b-4c7d-a7a3-3df1033d0be2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"id\": 0,\r\n  \"username\": \"ajisukma\",\r\n  \"firstName\": \"Aji\",\r\n  \"lastName\": \"Sukma\",\r\n  \"email\": \"ajisukma@gmail.com\",\r\n  \"password\": \"secret_password\",\r\n  \"phone\": \"082222222222\",\r\n  \"userStatus\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/user","urlObject":{"path":["user"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"70a73ac3-442b-4c7d-a7a3-3df1033d0be2"},{"name":"Update User","event":[{"listen":"test","script":{"id":"445c4616-cef8-4aec-8274-9c86adc93df1","exec":["pm.test(\"TS_UU_01 - Berhasil Mengubah Data User\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"46db1ea3-003d-4782-a152-ad9b1a95e7fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"ajisukmaroni\",\r\n  \"firstName\": \"Aji Sukma\",\r\n  \"lastName\": \"Roni\",\r\n  \"email\": \"ajisukmaroni@gmail.com\",\r\n  \"password\": \"secret_password\",\r\n  \"phone\": \"089999999\",\r\n  \"userStatus\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/user/:username","urlObject":{"path":["user",":username"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"jhondue","key":"username"}]}},"response":[],"_postman_id":"46db1ea3-003d-4782-a152-ad9b1a95e7fc"},{"name":"Create User with Array","event":[{"listen":"test","script":{"id":"b3cc947e-e9ad-43eb-80b8-2402d248f357","exec":["pm.test(\"TS_AUA - Berhasil Menambah User\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"7f2e2b30-c25f-44a6-9576-7234016c7cfc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"[\r\n  {\r\n    \"username\": \"joko\",\r\n    \"firstName\": \"joko\",\r\n    \"lastName\": \"cahyadi\",\r\n    \"email\": \"joko@gmail.com\",\r\n    \"password\": \"password\",\r\n    \"phone\": \"0899999999\",\r\n    \"userStatus\": 1\r\n  }\r\n]","options":{"raw":{"language":"json"}}},"url":"{{url}}/user/createWithArray","urlObject":{"path":["user","createWithArray"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7f2e2b30-c25f-44a6-9576-7234016c7cfc"},{"name":"Get User by Username","event":[{"listen":"test","script":{"id":"0a0d527b-3157-429d-bc0f-ebf2e6df0915","exec":["pm.test(\"TS_GU_01 - User Ditemukan\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"0e838261-f80d-4301-800c-94d6e01c05e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"username","value":"ajisukma","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{url}}/user/:username","urlObject":{"path":["user",":username"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"ajisukma","key":"username"}]}},"response":[],"_postman_id":"0e838261-f80d-4301-800c-94d6e01c05e2"}],"id":"54326abe-d29e-41da-94b0-73eb463d8d51","description":"<p>Operations about user</p>\n<p>Find out more about our store: <a href=\"http://swagger.io\">http://swagger.io</a></p>\n","_postman_id":"54326abe-d29e-41da-94b0-73eb463d8d51"},{"name":"Store","item":[{"name":"Inventory","event":[{"listen":"test","script":{"id":"05abee09-9814-4be6-8bc5-90db832fcb42","exec":["pm.test(\"TS_SI_01 - Berhasil Mengecek Inventory\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"cfafa905-2192-411b-b547-333a806abf93","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{url}}/store/inventory","urlObject":{"path":["store","inventory"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cfafa905-2192-411b-b547-333a806abf93"},{"name":"Create Order","event":[{"listen":"test","script":{"id":"ff5680da-9c3a-4fbb-9093-5836b62d2289","exec":["pm.test(\"TS_SO_01 - Berhasil Menambah Order\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"c5b4a537-f1a6-4b91-8c35-58e22c952512","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"petId\": 1,\r\n    \"quantity\": \"cat\",\r\n    \"shipDate\": \"2024-09-04T04:05:43.585Z\",\r\n    \"status\": \"placed\",\r\n    \"complete\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/store/order","urlObject":{"path":["store","order"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5b4a537-f1a6-4b91-8c35-58e22c952512"},{"name":"Find Order by Id","event":[{"listen":"test","script":{"id":"d2b6357d-9985-473c-8612-4d702d041f74","exec":["pm.test(\"TS_SDO_01 - Berhasil Menemukan Data Order\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"aa98c81f-0d04-4e75-b54d-3524c3c3311f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{url}}/store/order/:orderId","urlObject":{"path":["store","order",":orderId"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"22","key":"orderId"}]}},"response":[],"_postman_id":"aa98c81f-0d04-4e75-b54d-3524c3c3311f"},{"name":"Delete Order","event":[{"listen":"test","script":{"id":"b0462adf-01e5-4c80-bc57-018688aeb9c7","exec":["pm.test(\"TS_DO_01 - Berhasil Menghapus Order\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"e8a18db2-cfee-4882-bfb8-5e8b9ddb8462","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{url}}/store/order/:orderId","urlObject":{"path":["store","order",":orderId"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"12","key":"orderId"}]}},"response":[],"_postman_id":"e8a18db2-cfee-4882-bfb8-5e8b9ddb8462"}],"id":"8a087427-69d5-47f9-af93-a02c92cd06c4","description":"<p>Access to Petstore orders</p>\n","_postman_id":"8a087427-69d5-47f9-af93-a02c92cd06c4"},{"name":"Pet","item":[{"name":"Create Pet","event":[{"listen":"test","script":{"id":"44278db7-c046-411b-a803-f156c4fab374","exec":["pm.test(\"TS_AP_01 - Berhasil Menambah Pet\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"9ccf8459-ba4e-438c-9d2e-a59cd522dae0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"category\": {\r\n    \"name\": \"string\"\r\n  },\r\n  \"name\": \"doggie\",\r\n  \"photoUrls\": [\r\n    \"string\"\r\n  ],\r\n  \"tags\": [\r\n    {\r\n      \"name\": \"string\"\r\n    }\r\n  ],\r\n  \"status\": \"available\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/pet","urlObject":{"path":["pet"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9ccf8459-ba4e-438c-9d2e-a59cd522dae0"},{"name":"Update Pet","event":[{"listen":"test","script":{"id":"7f30c4ba-6aff-420c-8d19-849e7821fa6a","exec":["pm.test(\"TS_UP_01 - Berhasil Mengupdate Pet\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"f555b90b-eaf7-4acc-8334-5279670c4214","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 0,\r\n  \"category\": {\r\n    \"name\": \"string\"\r\n  },\r\n  \"name\": \"doggie\",\r\n  \"photoUrls\": [\r\n    \"string\"\r\n  ],\r\n  \"tags\": [\r\n    {\r\n      \"name\": \"string\"\r\n    }\r\n  ],\r\n  \"status\": \"available\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/pet","urlObject":{"path":["pet"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f555b90b-eaf7-4acc-8334-5279670c4214"},{"name":"Upload Image Pet","event":[{"listen":"test","script":{"id":"366455a5-b3d4-4bd9-916e-21ade4cbc533","exec":["pm.test(\"TS_UIP_01 - Berhasil Mengupload Image Pet\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"18eaf5d9-e206-458f-a90f-685123bf5298","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"additionalMetadata","value":"This is dog","type":"text"},{"key":"file","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/ACER/Downloads/dog.jpeg"],"src":"postman-cloud:///1ef6b145-2d84-4d80-bc9d-f66e4bb5e2c4"}]},"url":"{{url}}/pet/:petId/uploadImage","urlObject":{"path":["pet",":petId","uploadImage"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"1","key":"petId"}]}},"response":[],"_postman_id":"18eaf5d9-e206-458f-a90f-685123bf5298"},{"name":"Find Pet by Id","event":[{"listen":"test","script":{"id":"f7210310-4c5e-4b01-8775-b876fab89ddc","exec":["pm.test(\"TS_FP_01 - Berhasil Menemukan Pet\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"04984383-8725-4a59-bd7c-a365f689decf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{url}}/pet/:petId","urlObject":{"path":["pet",":petId"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"3","key":"petId"}]}},"response":[],"_postman_id":"04984383-8725-4a59-bd7c-a365f689decf"},{"name":"Find Pet by Status","event":[{"listen":"test","script":{"id":"b70c3d45-76d4-486a-8ea7-36001a16cf1e","exec":["pm.test(\"TS_FPS_01 - Berhasil Menemukan Pet\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"f233a30f-b151-49a7-b0a1-b9bf8d4716ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{url}}/pet/findByStatus?status=available","urlObject":{"path":["pet","findByStatus"],"host":["{{url}}"],"query":[{"key":"status","value":"available"}],"variable":[]}},"response":[],"_postman_id":"f233a30f-b151-49a7-b0a1-b9bf8d4716ab"},{"name":"Delete Pet","event":[{"listen":"test","script":{"id":"dffd42e3-1070-48a8-9624-2eedc72bb2bf","exec":["pm.test(\"TS_DP_01 - Berhasil Mengahpus Data Pet\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"545bd676-dea8-44e4-bb22-426be46abd06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{url}}/pet/:petId","urlObject":{"path":["pet",":petId"],"host":["{{url}}"],"query":[],"variable":[{"type":"any","value":"34","key":"petId"}]}},"response":[],"_postman_id":"545bd676-dea8-44e4-bb22-426be46abd06"}],"id":"5e2b5938-c2ac-4fda-9706-9d35364e43f0","description":"<p>Everything about your Pets</p>\n<p>Find out more: <a href=\"http://swagger.io\">http://swagger.io</a></p>\n","_postman_id":"5e2b5938-c2ac-4fda-9706-9d35364e43f0"}]}