{ "info": { "_postman_id": "cda01864-ad4d-4de3-b243-f54afa27b62a", "name": "Webex Calling Calls API", "description": "These tests exercise the /telephonycalls Webex Calling API and validate the results. They are designed to provide developers who are unfamilar with the Calling API with a set of examples to understand the basic concepts of how to use them.\n\n1) Create an outbound (Click to Dial) Call and verify it is gettable and perform a basic Hold and Resume operation on the call.\n2) Answer an inbound call (UserA calls apiUser), intiatate another call from the same user (apiUser calls UserB) and perform a Consult Transfer (i.e. apiUser transfers the call to connect UserA with UserB)\n3) Answer an inbound call (UserA calls apiUser) and blind transfer (Divert) the call to apiUser's voicemail.\n4) Answer an inbound call, park the call on another destination and retrieve the call back to apiUser.\n5) Get Call History (i.e. missed calls, placed calls and received calls).\n6) Voice Messages (execute the voice messages APIs)\n\nBefore running these tests the following environment variables must be set:\n* WEBEX_TOKEN -- an OAuth token for a user configured for calling in the test environment. These tests require a token with all the calling scopes (spark:calls_read and spark:calls_write). To get started quickly, developers can copy their temporary token from the [Webex For Developers Gettings Started Guide](https://developer.webex.com/docs/api/getting-started#accounts-and-authentication). \n* WEBEX_API_URL -- the URL of the meetings API under test, generally the default value of \"https://webexapis.com/v1/\" does not need to be changed\n* DESTINATION -- The destination to be dialed. Destination can be extensions, PSTN numbers, FAC codes or SIP URI. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain\n* TRANSFER_DESTINATION -- The destination to be dialed. This is used to make a second call from the api user in order to transfer the call.\n* PARK_DESTINATION -- The destination to park the call.\n* VOICE_MESSAGE_ID - the voice message Id. Used by the Voice Message APIs that require a message Id to perform the action.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Basic Call With Hold and Resume", "item": [ { "name": "Dial (Click to Call)", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "var theCall = pm.response.json();", "pm.collectionVariables.set(\"_callId\", theCall.callId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\t\"destination\": \"{{DESTINATION}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/dial", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "dial" ] } }, "response": [] }, { "name": "Answer a Call", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/answer", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "answer" ] } }, "response": [] }, { "name": "Get Call Status", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "" ] } }, "response": [] }, { "name": "Hold", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/hold", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "hold" ] } }, "response": [] }, { "name": "Get Call Status", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "" ] } }, "response": [] }, { "name": "Resume", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/resume", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "resume" ] } }, "response": [] }, { "name": "End a Call", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/hangup", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "hangup" ] } }, "response": [] }, { "name": "Cleanup", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "function cleanup() {", " const clean = _.keys(pm.collectionVariables.toObject());", " _.each(clean, (arrItem) => {", " //console.log(`Evalauating environment varable:${arrItem}`);", " if (arrItem.startsWith(\"_\")) {", " //console.log(`Will remove temporary env var:${arrItem}`);", " pm.collectionVariables.unset(arrItem);", " }", " });", "}", "", "// Run the cleanup script which deletes all env vars that start with \"_\"", "cleanup();" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://postman-echo.com/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "" ] }, "description": "This request will run a pre-request script that will delete all the temporary environment variables that have been set." }, "response": [] } ] }, { "name": "Answer Inbound Call and Transfer", "item": [ { "name": "Get Call Status", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var allCalls = pm.response.json();", "if ((allCalls.items) && (allCalls.items.length)) {", " pm.collectionVariables.set(\"_callId\", allCalls.items[0].id);", "}" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "" ] } }, "response": [] }, { "name": "Answer a Call", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/answer", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "answer" ] } }, "response": [] }, { "name": "Dial (Click to Call) 2nd Number", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "var theCall = pm.response.json();", "pm.collectionVariables.set(\"_callId2\", theCall.callId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"destination\": \"{{TRANSFER_DESTINATION}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/dial", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "dial" ] } }, "response": [] }, { "name": "Answer 2nd Call", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId2}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/answer", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "answer" ] } }, "response": [] }, { "name": "Transfer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/transfer", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "transfer" ] } }, "response": [] }, { "name": "Cleanup", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "function cleanup() {", " const clean = _.keys(pm.collectionVariables.toObject());", " _.each(clean, (arrItem) => {", " //console.log(`Evalauating environment varable:${arrItem}`);", " if (arrItem.startsWith(\"_\")) {", " //console.log(`Will remove temporary env var:${arrItem}`);", " pm.collectionVariables.unset(arrItem);", " }", " });", "}", "", "// Run the cleanup script which deletes all env vars that start with \"_\"", "cleanup();" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://postman-echo.com/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "" ] }, "description": "This request will run a pre-request script that will delete all the temporary environment variables that have been set." }, "response": [] } ] }, { "name": "Blind Transfer To Voicemail", "item": [ { "name": "Get Call Status", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var allCalls = pm.response.json();", "pm.collectionVariables.set(\"_callId\", allCalls.items[0].id);" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "" ] } }, "response": [] }, { "name": "Divert a Call To Voicemail", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\",\n\t\"toVoicemail\": true\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/divert", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "divert" ] } }, "response": [] }, { "name": "Cleanup", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "function cleanup() {", " const clean = _.keys(pm.collectionVariables.toObject());", " _.each(clean, (arrItem) => {", " //console.log(`Evalauating environment varable:${arrItem}`);", " if (arrItem.startsWith(\"_\")) {", " //console.log(`Will remove temporary env var:${arrItem}`);", " pm.collectionVariables.unset(arrItem);", " }", " });", "}", "", "// Run the cleanup script which deletes all env vars that start with \"_\"", "cleanup();" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://postman-echo.com/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "" ] }, "description": "This request will run a pre-request script that will delete all the temporary environment variables that have been set." }, "response": [] } ] }, { "name": "Park and Retrieve a call", "item": [ { "name": "Get Call Status", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var allCalls = pm.response.json();", "pm.collectionVariables.set(\"_callId\", allCalls.items[0].id);" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "" ] } }, "response": [] }, { "name": "Answer a Call", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\":\"{{_callId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/answer", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "answer" ] } }, "response": [] }, { "name": "Park the Call", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theCall = pm.response.json();", "pm.collectionVariables.set(\"_parkedAgainst\", theCall.parkedAgainst.number);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"callId\": \"{{_callId}}\",\n \"destination\": \"{{PARK_DESTINATION}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/park", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "park" ] } }, "response": [] }, { "name": "Retrieve the Call", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "var theCall = pm.response.json();", "pm.collectionVariables.set(\"_retrievedCallId\", theCall.callId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"destination\": \"{{_parkedAgainst}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/retrieve", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "retrieve" ] } }, "response": [] }, { "name": "Answer a Call", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"callId\": \"{{_retrievedCallId}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/answer", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "answer" ] } }, "response": [] }, { "name": "Cleanup", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "function cleanup() {", " const clean = _.keys(pm.collectionVariables.toObject());", " _.each(clean, (arrItem) => {", " //console.log(`Evalauating environment varable:${arrItem}`);", " if (arrItem.startsWith(\"_\")) {", " //console.log(`Will remove temporary env var:${arrItem}`);", " pm.collectionVariables.unset(arrItem);", " }", " });", "}", "", "// Run the cleanup script which deletes all env vars that start with \"_\"", "cleanup();" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://postman-echo.com/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "" ] }, "description": "This request will run a pre-request script that will delete all the temporary environment variables that have been set." }, "response": [] } ] }, { "name": "Call History", "item": [ { "name": "Get Call History - All Calls", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/history", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "history" ] } }, "response": [] }, { "name": "Get Call History - Placed Calls", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/history?type=placed", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "history" ], "query": [ { "key": "type", "value": "placed" } ] } }, "response": [] }, { "name": "Get Call History - Received Calls", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/history?type=received", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "history" ], "query": [ { "key": "type", "value": "received" } ] } }, "response": [] }, { "name": "Get Call History - Missed Calls", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/calls/history?type=missed", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "calls", "history" ], "query": [ { "key": "type", "value": "missed" } ] } }, "response": [] } ] }, { "name": "Voice Messages", "item": [ { "name": "Get Message Summary", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages/summary", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages", "summary" ] } }, "response": [] }, { "name": "Get List of Messages", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages" ] } }, "response": [] }, { "name": "Mark a Message as Read", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messageId\":\"{{VOICE_MESSAGE_ID}}\" \n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages/markAsRead", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages", "markAsRead" ] } }, "response": [] }, { "name": "Mark a Message as Unread", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messageId\":\"{{VOICE_MESSAGE_ID}}\" \n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages/markAsUnread", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages", "markAsUnread" ] } }, "response": [] }, { "name": "Mark All Messages as Read", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages/markAsRead", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages", "markAsRead" ] } }, "response": [] }, { "name": "Mark All Messages as Unread", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages/markAsUnread", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages", "markAsUnread" ] } }, "response": [] }, { "name": "Delete Message", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{WEBEX_API_URL}}telephony/voiceMessages/{{VOICE_MESSAGE_ID}}", "host": [ "{{WEBEX_API_URL}}telephony" ], "path": [ "voiceMessages", "{{VOICE_MESSAGE_ID}}" ] } }, "response": [] } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{WEBEX_TOKEN}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "WEBEX_TOKEN", "value": "Set this to an authorized user's token" }, { "key": "WEBEX_API_URL", "value": "https://webexapis.com/v1/" }, { "key": "DESTINATION", "value": "Set this to the number or address to call" }, { "key": "TRANSFER_DESTINATION", "value": "Set this to the number or address to transfer to" }, { "key": "PARK_DESTINATION", "value": "The destination where the call needs to be park and retrieved from" }, { "key": "_callId", "value": "" }, { "key": "VOICE_MESSAGE_ID", "value": "Set this to the voice message Id" } ] }