{"info":{"_postman_id":"e8706ab1-3612-48b5-9a42-e6e4c94e4320","name":"Mashery API OAuth","description":"<html><head></head><body><ul>\n<li><a href=\"#what-is-this\">What is this?</a></li>\n<li><a href=\"#why-should-i-use-it\">Why should I use it?</a></li>\n<li><a href=\"#how-do-i-install-and-configure\">How do I install and configure?</a></li>\n<li><a href=\"#how-do-i-execute-the-requests\">How do I execute the requests?</a></li>\n<li><a href=\"#reference\">Reference</a><ul>\n<li><a href=\"#getting-an-access-token\">Getting an access token</a></li>\n<li><a href=\"#oauth-flows\">OAuth flows</a></li>\n<li><a href=\"#api-specification\">API Specification</a></li>\n</ul>\n</li>\n</ul>\n<p><strong>Confidentiality</strong></p>\n<p>© 2019 TIBCO Software Inc. All rights reserved.</p>\n<p>The following is information of TIBCO Software Inc. Use, duplication, transmission, or republication for any purpose without the prior written consent of TIBCO is expressly prohibited.</p>\n<p><strong>Disclaimer</strong></p>\n<p>This document (including, without limitation, any product roadmap or statement of direction data) illustrates the planned testing, release and availability dates for TIBCO products and services. This document is provided for informational purposes only and its contents are subject to change without notice. TIBCO makes no warranties, express or implied, in or relating to this document or any information in it, including, without limitation, that this document, or any information in it, is error-free or meets any conditions of merchantability or fitness for a particular purpose. This document may not be reproduced or transmitted in any form or by any means without our prior written permission.\nThe material provided is for informational purposes only, and should not be relied on in making a purchasing decision. The information is not a commitment, promise or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remain at our sole discretion.\nIn this document TIBCO or its representatives may make forward-looking statements regarding future events, TIBCO’s future results or our future financial performance. These statements are based on management’s current expectations. Although we believe that the expectations reflected in the forward-looking statements contained in this document are reasonable, these expectations or any of the forward-looking statements could prove to be incorrect and actual results or financial performance could differ materially from those stated herein. TIBCO does not undertake to update any forward-looking statement that may be made from time to time or on its behalf.</p>\n<h1 id=\"what-is-this\">What is this?</h1>\n<p>This collection runs all OAuth requests available in the <a href=\"https://developer.mashery.com/docs/read/mashery_api/30\">v3 Mashery API</a> and <a href=\"https://developer.mashery.com/docs/read/mashery_api/20\">v2 Mashery API</a>.</p>\n<p>The collection contains:</p>\n<ul>\n<li>A set of <a href=\"https://developer.mashery.com/docs/read/mashery_api/30\">v3 Mashery API</a> requests to create OAuth token and resource endpoints.</li>\n<li>A set of <a href=\"https://developer.mashery.com/docs/read/mashery_api/20\">v2 Mashery API</a> requests to manage OAuth tokens.</li>\n<li>A set of <a href=\"https://developer.mashery.com/docs/read/mashery_api/30\">v3 Mashery API</a> requests to delete resources created by the collection.</li>\n</ul>\n<h1 id=\"why-should-i-use-it\">Why should I use it?</h1>\n<p>It provides a convenient, portable way of using the Mashery OAuth APIs without doing any coding or reading much documentation. It's easy to make ad hoc requests and updates using the pre-built requests.</p>\n<h1 id=\"how-do-i-install-and-configure\">How do I install and configure?</h1>\n<ul>\n<li>You need a Mashery area, an id (username/password) and a v3 API key/secret. If you don't have these, then sign-up at <a href=\"https://developer.mashery.com/\">https://developer.mashery.com/</a>.</li>\n<li>Download and install Postman from from <a href=\"https://www.getpostman.com/apps\">https://www.getpostman.com/apps</a>.</li>\n<li>Open Postman, click on the 'Manage Environments' gear icon in the top right, select the 'Globals' button and add variables with values set to your credentials:<ul>\n<li>'v3 API domain' set to 'api.mashery.com'</li>\n<li>'v3 API key'</li>\n<li>'v3 API secret'</li>\n<li>'v3 API username'</li>\n<li>'v3 API password'</li>\n<li>'area id' (the UUID)</li>\n<li>'site id' (the id)</li>\n</ul>\n</li>\n<li>In a browser, go to <a href=\"https://documenter.getpostman.com/view/4885521/RzfnknBN\">https://documenter.getpostman.com/view/4885521/RzfnknBN</a> and select 'Run in Postman' (button top right). This imports into Postman the Mashery API OAuth request collection.</li>\n</ul>\n<p>That's it.</p>\n<p>Note: if you are using Mashery Local 5.1 or greater in untethered mode, then please consult the installation and configuration manual.</p>\n<h1 id=\"how-do-i-execute-the-requests\">How do I execute the requests?</h1>\n<p>Execute each v3 folder request in order up to and including 'Activate OAuth Package Key'. These create an OAuth enabled service with resource and token endpoints. They also create a member, package, plan and key to access that service.</p>\n<p>Now execute 'createAccessToken'. Depending on when you completed the previous requests, it can take up to 10 minutes before this can execute successfully. When 'createAccessToken' executes successfully, run 'Get OAuth Resource'. This uses the access token.</p>\n<p>After that, you can try 'revokeAccessToken' and then 'Get OAuth Resource' to show that the token is no longer valid.</p>\n<p>Execute the other requests in the v2 folder to try other OAuth functions.</p>\n<p>Some request responses pre-populate data for other requests. For example, executing 'Create OAuth Service' saves the service id, so if you then execute 'Create OAuth Token Endpoint' the service id in that request is already set.</p>\n<p>When you are finished, execute the three v3 folder delete requests in order. These remove the resources created by the collection.</p>\n<h1 id=\"reference\">Reference</h1>\n<h2 id=\"getting-an-access-token\">Getting an access token</h2>\n<p>To execute any Mashery API request you need an access token so in Postman go to the Authentication folder and run the 'Get Token' request.</p>\n<p>Note: your 'v3 API key' and 'v3 API secret' are used in the Authorization header for the 'Get Token' request. The resulting access token is used in all other requests:</p>\n<p><code>Authorization: Bearer xxxtokenxxx</code></p>\n<p>The token lasts one hour. You can now execute any other request. If you see a response 'Not Authorized', then you need a new token.</p>\n<h2 id=\"oauth-implementation-guide\">OAuth implementation guide</h2>\n<p><a href=\"https://community.tibco.com/wiki/tibco-mashery-oauth-20-implementation-guide\">https://community.tibco.com/wiki/tibco-mashery-oauth-20-implementation-guide</a></p>\n<h2 id=\"api-specification\">API Specification</h2>\n<p>The Mashery v3 API specification is available at:</p>\n<p><a href=\"https://developer.mashery.com/docs/read/mashery_api/30\">https://developer.mashery.com/docs/read/mashery_api/30</a></p>\n<p>The Mashery v2 API specification is available at:</p>\n<p><a href=\"https://developer.mashery.com/docs/read/mashery_api/20\">https://developer.mashery.com/docs/read/mashery_api/20</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"What is this?","slug":"what-is-this"},{"content":"Why should I use it?","slug":"why-should-i-use-it"},{"content":"How do I install and configure?","slug":"how-do-i-install-and-configure"},{"content":"How do I execute the requests?","slug":"how-do-i-execute-the-requests"},{"content":"Reference","slug":"reference"}],"owner":"4885521","collectionId":"e8706ab1-3612-48b5-9a42-e6e4c94e4320","publishedId":"RzfnknBN","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-12-18T22:02:26.000Z"},"item":[{"name":"v3","item":[{"name":"Get API Token","event":[{"listen":"test","script":{"id":"8fe83952-407d-4dc3-950c-8106c1fd55f3","exec":["var jsonData = JSON.parse(responseBody);","","if (\"access_token\" in jsonData) {","    pm.globals.set(\"access_token\", jsonData.access_token);","    postman.setNextRequest(\"Get Public Hostname\");","}"],"type":"text/javascript"}}],"id":"9a4e6508-3453-40d2-a310-446e8788ee10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{v3 API key}}"},{"key":"password","value":"{{v3 API secret}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"password","type":"text"},{"key":"username","value":"{{v3 API username}}","type":"text"},{"key":"password","value":"{{v3 API password}}","type":"text"},{"key":"scope","value":"{{area id}}","type":"text"}]},"url":"https://{{v3 API domain}}/v3/token","description":"<p>Creates the token required to make v3 API requests.</p>\n","urlObject":{"protocol":"https","path":["v3","token"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a4e6508-3453-40d2-a310-446e8788ee10"},{"name":"Get Public Hostname","event":[{"listen":"test","script":{"id":"2272c0c8-d961-4d3f-a839-9698944c5d9f","exec":["var jsonData = JSON.parse(responseBody);","","if (\"address\" in jsonData[0]) {","    pm.globals.set(\"oauth hostname\", jsonData[0].address);","    postman.setNextRequest(\"Create OAuth Service\");","} else {","    pm.globals.unset(\"oauth hostname\");","}"],"type":"text/javascript"}}],"id":"a70dab6f-fdaa-4441-a08d-878ac90dc232","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{v3 API domain}}/v3/rest/domains/public/hostnames?fields=address","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","domains","public","hostnames"],"host":["{{v3 API domain}}"],"query":[{"key":"fields","value":"address"}],"variable":[]}},"response":[],"_postman_id":"a70dab6f-fdaa-4441-a08d-878ac90dc232"},{"name":"Create OAuth Service","event":[{"listen":"test","script":{"id":"f02e881a-6ca8-4ab5-9b68-d9c35f9289c0","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth service id\", jsonData.id.trim());","    postman.setNextRequest(\"Create OAuth Token Endpoint\");","} else {","    pm.globals.unset(\"oauth service id\");","}"],"type":"text/javascript"}}],"id":"a8fd5cfe-4a65-434a-888c-fef341bf4460","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Postman created OAuth service\",\n    \"securityProfile\": {\n        \"oauth\": {\n            \"qpsLimitCeiling\": 0,\n            \"rateLimitCeiling\": 0,\n            \"accessTokenTtl\": 3600,\n            \"grantTypes\": [\n                \"authorization_code\",\n                \"implicit\",\n                \"password\",\n                \"client_credentials\"\n            ],\n            \"accessTokenType\": \"bearer\",\n            \"authorizationCodeTtl\": 0,\n            \"forwardedHeaders\": [],\n            \"macAlgorithm\": \"hmac-sha-1\",\n            \"refreshTokenTtl\": 86400,\n            \"accessTokenTtlEnabled\": true,\n            \"allowMultipleToken\": false,\n            \"enableRefreshTokenTtl\": true,\n            \"forceOauthRedirectUrl\": false,\n            \"forceSslRedirectUrlEnabled\": false,\n            \"masheryTokenApiEnabled\": true,\n            \"refreshTokenEnabled\": true,\n            \"secureTokensEnabled\": false,\n            \"tokenBasedRateLimitsEnabled\": false\n        }\n    }\n}"},"url":"https://{{v3 API domain}}/v3/rest/services","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","services"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a8fd5cfe-4a65-434a-888c-fef341bf4460"},{"name":"Create OAuth Token Endpoint","event":[{"listen":"test","script":{"id":"f02e881a-6ca8-4ab5-9b68-d9c35f9289c0","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth token endpoint\", jsonData.id);","    postman.setNextRequest(\"Create OAuth Resource Endpoint\");","} else {","    pm.globals.unset(\"oauth token endpoint\");","}"],"type":"text/javascript"}}],"id":"e2119c04-3ab8-4d38-b4db-4971fe3bed05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Postman created OAuth token endpoint\",\n\t\"trafficManagerDomain\": \"{{oauth hostname}}\",\n\t\"publicDomains\": [{\"address\": \"{{oauth hostname}}\"}],\n\t\"type\": \"token\",\n\t\"requestPathAlias\": \"/oauth\"\n}"},"url":"https://{{v3 API domain}}/v3/rest/services/{{oauth service id}}/endpoints","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","services","{{oauth service id}}","endpoints"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e2119c04-3ab8-4d38-b4db-4971fe3bed05"},{"name":"Create OAuth Resource Endpoint","event":[{"listen":"test","script":{"id":"f02e881a-6ca8-4ab5-9b68-d9c35f9289c0","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth resource endpoint\", jsonData.id);","    postman.setNextRequest(\"Create OAuth Member\");","} else {","    pm.globals.unset(\"oauth resource endpoint\");","}"],"type":"text/javascript"}}],"id":"1a8f699e-a451-4961-8909-eac50e500245","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Postman created OAuth resource endpoint\",\n\t\"trafficManagerDomain\": \"{{oauth hostname}}\",\n\t\"publicDomains\": [{\"address\": \"{{oauth hostname}}\"}],\n\t\"requestPathAlias\": \"/resources\",\n\t\"systemDomains\": [{\"address\": \"integration.cloud.tibcoapps.com\"}],\n\t\"outboundRequestTargetPath\": \"/u4gmknzehvjvneeh54tpksna5fvtvmdx/\",\n\t\"outboundTransportProtocol\":\"https\",\n\t\"type\": \"standard\",\n    \"oauthGrantTypes\": [\n      \"authorization_code\",\n      \"implicit\",\n      \"password\",\n      \"client_credentials\"\n    ],\n    \"requestAuthenticationType\": \"oauth\"\n}"},"url":"https://{{v3 API domain}}/v3/rest/services/{{oauth service id}}/endpoints","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","services","{{oauth service id}}","endpoints"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1a8f699e-a451-4961-8909-eac50e500245"},{"name":"Create OAuth Member","event":[{"listen":"test","script":{"id":"587ec4ec-7be5-4a60-87fd-62ea93507946","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth member id\", jsonData.id);","    postman.setNextRequest(\"Create OAuth Members Application\");","} else {","    pm.globals.unset(\"oauth member id\");","}"],"type":"text/javascript"}}],"id":"944fc499-0af9-45fb-ab00-844a1ec443b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":" {\n\t\"username\": \"PostmanCreatedUser307\",\n    \"displayName\": \"PostmanCreatedName287\",\n    \"email\": \"postman147@email.com\",\n    \"passwdNew\": \"P05tM@n2018\",\n    \"areaStatus\": \"active\"\n}"},"url":"https://{{v3 API domain}}/v3/rest/members","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","members"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"944fc499-0af9-45fb-ab00-844a1ec443b7"},{"name":"Create OAuth Members Application","event":[{"listen":"test","script":{"id":"587ec4ec-7be5-4a60-87fd-62ea93507946","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth app id\", jsonData.id);","    postman.setNextRequest(\"Create OAuth Package\");","} else {","    pm.globals.unset(\"oauth app id\");","}",""],"type":"text/javascript"}}],"id":"14a4c489-f5f0-4916-a7ff-727a4821e2cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":" {\n    \"name\": \"Postman created OAuth App\",\n    \"description\": \"Postman created OAuth App\"\n}"},"url":"https://{{v3 API domain}}/v3/rest/members/{{oauth member id}}/applications","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","members","{{oauth member id}}","applications"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"14a4c489-f5f0-4916-a7ff-727a4821e2cf"},{"name":"Create OAuth Package","event":[{"listen":"test","script":{"id":"081831f7-6112-42cd-a892-b7514809802b","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth package id\", jsonData.id);","    postman.setNextRequest(\"Get Roles\");","} else {","    pm.globals.unset(\"oauth package id\");","    postman.setNextRequest(\"Delete OAuth Package\");","}",""],"type":"text/javascript"}}],"id":"1e80d6e5-a810-4da3-99e9-d2511dfa2510","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Postman created OAuth package\",\n\t\"sharedSecretLength\": 10\n}"},"url":"https://{{v3 API domain}}/v3/rest/packages","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","packages"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1e80d6e5-a810-4da3-99e9-d2511dfa2510"},{"name":"Get Roles","event":[{"listen":"test","script":{"id":"087bb15d-a9b8-4980-8657-b67f80fbeeac","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData[0]) {","    pm.globals.set(\"oauth everyone\", jsonData[0].id);","    postman.setNextRequest(\"Create OAuth Plan\");","} else {","    pm.globals.unset(\"oauth everyone\");","    postman.setNextRequest(\"Delete OAuth Package\");","}"],"type":"text/javascript"}}],"id":"25794420-579c-4d97-8a74-e0f707dc33a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://{{v3 API domain}}/v3/rest/roles?search=name:Everyone","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","roles"],"host":["{{v3 API domain}}"],"query":[{"key":"search","value":"name:Everyone"}],"variable":[]}},"response":[],"_postman_id":"25794420-579c-4d97-8a74-e0f707dc33a1"},{"name":"Create OAuth Plan","event":[{"listen":"test","script":{"id":"19249430-e966-42d5-bd05-e5265fcccf56","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData) {","    pm.globals.set(\"oauth plan id\", jsonData.id);","    postman.setNextRequest(\"Create OAuth Package Key\");","} else {","    pm.globals.unset(\"oauth plan id\");","    postman.setNextRequest(\"Delete OAuth Package\");","}",""],"type":"text/javascript"}}],"id":"d035c968-8c4e-4432-96d6-2a92196d4c0c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\":\"Postman created plan\",\n\t\"services\":[{\"id\":\"{{oauth service id}}\",\"name\":\"\",\"created\":\"\",\"updated\":\"\",\"endpoints\":[{\"id\":\"{{oauth token endpoint}}\",\"created\":\"\",\"updated\":\"\",\"name\":\"\",\"methods\":[],\"undefinedMethodsAllowed\":true},{\"id\":\"{{oauth resource endpoint}}\",\"created\":\"\",\"updated\":\"\",\"name\":\"\",\"methods\":[],\"undefinedMethodsAllowed\":true}]}],\n\t\"roles\":[{\"id\":\"{{oauth everyone}}\",\"name\":\"\",\"action\":\"register_keys\"}]\n}"},"url":"https://{{v3 API domain}}/v3/rest/packages/{{oauth package id}}/plans","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","packages","{{oauth package id}}","plans"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d035c968-8c4e-4432-96d6-2a92196d4c0c"},{"name":"Create OAuth Package Key","event":[{"listen":"test","script":{"id":"587ec4ec-7be5-4a60-87fd-62ea93507946","exec":["var jsonData = JSON.parse(responseBody);","","if (\"id\" in jsonData && \"apikey\" in jsonData && \"secret\" in jsonData) {","    pm.globals.set(\"oauth package key\", jsonData.id);","    pm.globals.set(\"oauth client key\", jsonData.apikey);","    pm.globals.set(\"oauth client secret\", jsonData.secret);","    postman.setNextRequest(\"Activate OAuth Package Key\");","} else {","    pm.globals.unset(\"oauth package key\");","    pm.globals.unset(\"oauth client key\");","    pm.globals.unset(\"oauth client secret\");","    postman.setNextRequest(\"Delete OAuth Package\");","}",""],"type":"text/javascript"}}],"id":"0bfbec1c-d2ae-4069-8e2f-084b6bf71198","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":" {\n    \"package\": { \"id\": \"{{oauth package id}}\"},\n    \"plan\" : { \"id\": \"{{oauth plan id}}\"}\n}"},"url":"https://{{v3 API domain}}/v3/rest/applications/{{oauth app id}}/packageKeys","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","applications","{{oauth app id}}","packageKeys"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0bfbec1c-d2ae-4069-8e2f-084b6bf71198"},{"name":"Activate OAuth Package Key","event":[{"listen":"test","script":{"id":"587ec4ec-7be5-4a60-87fd-62ea93507946","exec":["postman.setNextRequest(\"createAccessToken\");",""],"type":"text/javascript"}}],"id":"2302700a-6dd2-45e8-85c5-f13bea5d2877","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":" {\n\t\"status\": \"active\"\n}"},"url":"https://{{v3 API domain}}/v3/rest/packageKeys/{{oauth package key}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","packageKeys","{{oauth package key}}"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2302700a-6dd2-45e8-85c5-f13bea5d2877"},{"name":"Get OAuth Resource","event":[{"listen":"test","script":{"id":"1184d94e-a8c9-472e-a1f2-407354ee6e2e","exec":["postman.setNextRequest(\"createAuthorizationToken\");"],"type":"text/javascript"}}],"id":"98e4e2f2-bb13-40ad-8445-cab495602032","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth access token}}","type":"text"}],"url":"http://{{oauth hostname}}/resources/product/1002","urlObject":{"protocol":"http","path":["resources","product","1002"],"host":["{{oauth hostname}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"98e4e2f2-bb13-40ad-8445-cab495602032"},{"name":"Delete OAuth Package","event":[{"listen":"test","script":{"id":"081831f7-6112-42cd-a892-b7514809802b","exec":["pm.globals.unset(\"oauth package id\");","pm.globals.unset(\"oauth package key\");","pm.globals.unset(\"oauth everyone\");","pm.globals.unset(\"oauth access token\");","postman.setNextRequest(\"Delete OAuth Member\");","",""],"type":"text/javascript"}}],"id":"13f69125-0849-43f5-bce3-e3404feb5719","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://{{v3 API domain}}/v3/rest/packages/{{oauth package id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","packages","{{oauth package id}}"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"13f69125-0849-43f5-bce3-e3404feb5719"},{"name":"Delete OAuth Member","event":[{"listen":"test","script":{"id":"587ec4ec-7be5-4a60-87fd-62ea93507946","exec":["pm.globals.unset(\"oauth member id\");","postman.setNextRequest(\"Delete OAuth Member\");",""],"type":"text/javascript"}}],"id":"476c5393-59a4-456a-bcc7-5825605acd70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"https://{{v3 API domain}}/v3/rest/members/{{oauth member id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","members","{{oauth member id}}"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"476c5393-59a4-456a-bcc7-5825605acd70"},{"name":"Delete OAuth Service","event":[{"listen":"test","script":{"id":"f02e881a-6ca8-4ab5-9b68-d9c35f9289c0","exec":["pm.globals.unset(\"oauth service id\");","pm.globals.unset(\"oauth resource endpoint\");","pm.globals.unset(\"oauth token endpoint\");","pm.globals.unset(\"oauth hostname\");","postman.setNextRequest(null);","",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"65598a49-9af9-4927-a784-9baf6f2364e3","exec":[""],"type":"text/javascript"}}],"id":"77fbbd04-302f-444e-843e-49b95895b0f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://{{v3 API domain}}/v3/rest/services/{{oauth service id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","name":"v3","type":"folder"}},"urlObject":{"protocol":"https","path":["v3","rest","services","{{oauth service id}}"],"host":["{{v3 API domain}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"77fbbd04-302f-444e-843e-49b95895b0f3"}],"id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"929caec2-8a03-4a55-b43c-98a6a3effb58","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"169f50e7-0067-405d-a542-87f1eb7a5384","type":"text/javascript","exec":[""]}}],"_postman_id":"2cdc8555-2bb4-484f-b833-82c1a12a05a5","description":""},{"name":"v2","item":[{"name":"createAccessToken","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"07dc21ad-944c-4a47-bf55-3b18880697fe","exec":["var jsonData = JSON.parse(responseBody);","","if (\"refresh_token\" in jsonData.result) {","    pm.globals.set(\"oauth refresh token\", jsonData.result.refresh_token);","}","","if (\"access_token\" in jsonData.result) {","    pm.globals.set(\"oauth access token\", jsonData.result.access_token);","    postman.setNextRequest(\"Get OAuth Resource\");","} else {","    postman.setNextRequest(\"Delete OAuth Package\");","}"],"type":"text/javascript"}}],"id":"b459e28b-4bbc-4a04-a42b-07c75f968f02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.createAccessToken\",\n  \"params\": {\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"service_key\": \"{{oauth service id}}\",\n    \"token_data\": {\n      \"grant_type\": \"client_credentials\",\n      \"scope\": \"{{area id}}\"\n    },\n    \"uri\": {\n      \"redirect_uri\": \"https://localhost\"\n    },\n    \"user_context\":\"{{oauth member id}}\"\n  },\n  \"response_type\":\"token\"\n}"},"url":"https://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"https","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"b459e28b-4bbc-4a04-a42b-07c75f968f02"},{"name":"refreshAccessToken","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"07dc21ad-944c-4a47-bf55-3b18880697fe","exec":["var jsonData = JSON.parse(responseBody);","","if (\"refresh_token\" in jsonData.result) {","    pm.globals.set(\"oauth refresh token\", jsonData.result.refresh_token);","}","","if (\"access_token\" in jsonData.result) {","    pm.globals.set(\"oauth access token\", jsonData.result.access_token);","    postman.setNextRequest(\"Get OAuth Resource\");","} else {","    postman.setNextRequest(\"Delete OAuth Package\");","}"],"type":"text/javascript"}}],"id":"387ad93f-deb8-4956-b06f-d19c0a55601f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.createAccessToken\",\n  \"params\": {\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"service_key\": \"{{oauth service id}}\",\n    \"token_data\": {\n      \"grant_type\": \"refresh_token\",\n      \"refresh_token\" : \"{{oauth refresh token}}\",\n      \"scope\": \"{{area id}}\"\n    },\n    \"uri\": {\n      \"redirect_uri\": \"https://localhost\"\n    },\n    \"user_context\":\"{{oauth member id}}\"\n  },\n  \"response_type\":\"token\"\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"387ad93f-deb8-4956-b06f-d19c0a55601f"},{"name":"createAuthorizationCode","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"1a6b5eed-d5e1-44cf-9471-af66a17216b6","exec":[" postman.setNextRequest(\"fetchAccessToken\");"],"type":"text/javascript"}}],"id":"e9cef5a9-3b75-4b20-ae46-df4509f7588d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"x-mashery-debug","value":"{{x-mashery-debug}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.createAuthorizationCode\",\n  \"params\": {\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"response_type\": \"code\",\n    \"scope\": null,\n    \"service_key\": \"{{oauth service id}}\",\n    \"uri\": {\n      \"redirect_uri\": \"https://localhost\"\n    }\n  },\n  \"user_context\":\"{{oauth member id}}\"\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"e9cef5a9-3b75-4b20-ae46-df4509f7588d"},{"name":"fetchAccessToken","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"fb179781-87d9-4c36-a2f8-49011d41c90b","exec":[" postman.setNextRequest(\"updateAccessToken\");"],"type":"text/javascript"}}],"id":"a7ad8ff3-8ebe-49e8-a197-b1d0e015e61a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.fetchAccessToken\",\n  \"params\": {\n  \t\"access_token\": \"{{oauth access token}}\",\n    \"service_key\": \"{{oauth service id}}\"\n  }\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"a7ad8ff3-8ebe-49e8-a197-b1d0e015e61a"},{"name":"updateAccessToken","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"0717aa6a-c0be-4e70-a343-978156641343","exec":[" postman.setNextRequest(\"fetchApplication\");"],"type":"text/javascript"}}],"id":"11e8d404-ff38-4411-b0d9-d31f3c6d0db0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.updateAccessToken\",\n  \"params\": {\n  \t\"access_token\": \"{{oauth access token}}\",\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"expires_in\": 3600,\n    \"scope\": \"{{area id}}\",\n    \"service_key\": \"{{oauth service id}}\",\n    \"user_context\":\"{{oauth member id}}\"\n  }\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"11e8d404-ff38-4411-b0d9-d31f3c6d0db0"},{"name":"fetchApplication","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"241b4407-dbc9-4f3d-bf98-f05f2ee40335","exec":[" postman.setNextRequest(\"fetchUserApplications\");"],"type":"text/javascript"}}],"id":"6ec8b787-372f-4767-881b-df72deb04e6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.fetchApplication\",\n  \"params\": {\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"service_key\": \"{{oauth service id}}\",\n    \"uri\": null\n  },\n  \"response_type\":null\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"6ec8b787-372f-4767-881b-df72deb04e6b"},{"name":"fetchUserApplications","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"4cf07fb8-1907-4193-a4ff-615dee3120ef","exec":[" postman.setNextRequest(\"revokeUserApplication\");"],"type":"text/javascript"}}],"id":"e5951a78-df34-4b14-9091-a3b277806a77","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.fetchUserApplications\",\n  \"params\": {\n    \"service_key\": \"{{oauth service id}}\",\n    \"token_status\": \"all\",\n\t\"user_context\":\"{{oauth member id}}\"\n  }\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"e5951a78-df34-4b14-9091-a3b277806a77"},{"name":"revokeUserApplication","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"3365eaa5-e44a-4615-999d-110564250968","exec":[" postman.setNextRequest(\"revokeAccessToken\");"],"type":"text/javascript"}}],"id":"8d0880da-f192-4a48-986f-a5a0213b847c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.revokeUserApplication\",\n  \"params\": {\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"service_key\": \"{{oauth service id}}\",\n\t\"user_context\":\"{{oauth member id}}\"\n  }\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"8d0880da-f192-4a48-986f-a5a0213b847c"},{"name":"revokeAccessToken","event":[{"listen":"prerequest","script":{"id":"35af33d9-89bd-4e43-9f6c-a43cbc911226","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"45f62757-4d8e-4740-b24c-6177186a5506","exec":[" postman.setNextRequest(\"Delete OAuth Package\");"," pm.globals.unset(\"oauth access token\");"],"type":"text/javascript"}}],"id":"6a0461bf-0d37-4c64-a000-fcf1e9910030","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"oauth2.revokeAccessToken\",\n  \"params\": {\n  \t\"access_token\": \"{{oauth access token}}\",\n    \"client\": {\n      \"client_id\": \"{{oauth client key}}\",\n      \"client_secret\": \"{{oauth client secret}}\"\n    },\n    \"service_key\": \"{{oauth service id}}\"\n  }\n}"},"url":"http://{{v2 API domain}}/v2/json-rpc/{{site id}}?apikey={{v3 API key}}&sig={{sig}}","urlObject":{"protocol":"http","path":["v2","json-rpc","{{site id}}"],"host":["{{v2 API domain}}"],"query":[{"key":"apikey","value":"{{v3 API key}}"},{"key":"sig","value":"{{sig}}"}],"variable":[]}},"response":[],"_postman_id":"6a0461bf-0d37-4c64-a000-fcf1e9910030"}],"id":"107e83d5-1c71-4391-8cde-2d8e51052063","event":[{"listen":"prerequest","script":{"id":"6536d5c7-f57a-4216-8e0f-17233050e928","type":"text/javascript","exec":["// Access your env variables like this","var key = pm.globals.get(\"v3 API key\");","var secret = pm.globals.get(\"v3 API secret\");","console.log(\"key is \" + key);","console.log(\"secret is \"+ secret);","","const now = new Date();","var t = now.getTime().toString();","t = t.substring(0,10);","","var sig = CryptoJS.MD5(key + secret + t).toString();","","// Set the new environment variable","pm.globals.set(\"sig\", sig);","pm.environment.set(\"sig\",sig);","console.log(\"sig is \"+ sig);"]}},{"listen":"test","script":{"id":"36fc50db-55aa-433b-9858-afaffadab17e","type":"text/javascript","exec":[""]}}],"_postman_id":"107e83d5-1c71-4391-8cde-2d8e51052063","description":""}],"event":[{"listen":"prerequest","script":{"id":"e351c126-1f97-4cf7-8a04-d2ed95f28d77","type":"text/javascript","exec":["postman.setNextRequest(\"Get API Token\");"]}},{"listen":"test","script":{"id":"28e70353-9fa4-4198-92e4-429f1f145d90","type":"text/javascript","exec":[""]}}],"variable":[{"key":"v2 object query","value":""}]}