{ "info": { "_postman_id": "6ffd0285-a021-495f-a256-30b1029909f6", "name": "Meetings RESTful API Examples", "description": "These tests excersise the /meetings API and validate the results. They are designed to provide developers who are unfamilar with the Meetings API with a set of examples to understand the basic concepts of how to use them.\n\n1) Create a non recurring meeting tommorow and verify it is gettable\n2) Create a recurring meeting starting tommorow recurring daily for 10 instances, and verify it is gettable\n3) Create a second non recurring meeting tommorow and modify some of its attributes\n\n\nBefore running these tests the following environment variables must be set:\n* WEBEX_TOKEN -- an OAuth token for a user configured for meetings in the test environment. These tests require a token with all the meetings scopes and the spark:people_read scopy. 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* MEETINGS_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* TIMEZONE_STRING -- the [Time Zone String](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) that you want your results to be returned in (ie: \"America/New_York\" for the US East Coast)\n* UTCOFFSET - the [offset from UTC Time](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to set your meetings (ie: \"-04:00\" for New York during Daylight Savings Time). This is used by the tests pre-request scripts to create start and end time parameters that will make sense in your timezone\n* OTHER_USERS_EMAIL -- an email of another CI user to invite to a meeting. This user must belong to the same org as the caller of the APIs in order for the PUT /meetingInvitees sample to work.\n\nPre set:\n* MAX_RESULTS -- the max number of meetings to query for -- initially set to 2\n\n\n", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "17540584" }, "item": [ { "name": "Meeting", "item": [ { "name": "Create a non recurring meeting for tommorow", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "pm.collectionVariables.set(\"_theMeeting\", JSON.stringify(theMeeting));", "", "pm.test(\"Response is valid and has an id\", function () {", " console.log(theMeeting.id);", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_singleMeetingId\", theMeeting.id);", " console.log(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"Response has a meeting number\", function () {", " pm.expect(theMeeting.meetingNumber).to.be.a(\"string\");", " pm.collectionVariables.set(\"_singleMeetingNumber\", theMeeting.meetingNumber);", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(theMeeting.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(theMeeting.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"Recurrance is single\", function () {", " pm.expect(theMeeting.meetingType).to.equal(\"meetingSeries\");", "});", "", "pm.test(\"Start time is as expected\", function () {", " pm.expect(theMeeting.start).to.equal(pm.collectionVariables.get(\"_start_time\"));", "});", "", "pm.test(\"End Time time is as expected\", function () {", " pm.expect(theMeeting.end).to.equal(pm.collectionVariables.get(\"_end_time\"));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Sample Title\",\n \"agenda\": \"Sample Agenda\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\", \n \"enabledAutoRecordMeeting\": false,\n \"allowAnyUserToBeCoHost\": false\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] }, "description": "Our prerequest script will examine the UTCOFFSET and TIMEZONE variables and generate a to/from team for a meeting that starts at noon tommorow and lasts for 30 minutes\nOur request body will use the temporary _start_time and _end_time variables that our prerequest script _start_time\nOur tests will validate that we got the expected result and set some additional temporary environment variables that will be used in subseqent tests" }, "response": [] }, { "name": "Get meeting by ID", "event": [ { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "pm.test(\"Meeting ID matches\", function () {", " pm.expect(theMeeting.id).to.equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"Meeting Number matches\", function () {", " pm.expect(theMeeting.meetingNumber).to.equal(pm.collectionVariables.get(\"_singleMeetingNumber\"));", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(theMeeting.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(theMeeting.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"Recurrance is single\", function () {", " pm.expect(theMeeting.meetingType).to.equal(\"meetingSeries\");", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "{{Authorization}}", "type": "text" } ], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_singleMeetingId}}" ] }, "description": "You can pass an ID directly to the /meetings API to get that object. In this case we will get the non-recurring meetingType:meetingSeries object that we just created." }, "response": [] }, { "name": "Get meeting using meetingSeriesId query param", "event": [ { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"Result contains a list\", function () {", " pm.expect(jsonData).to.have.keys('items');", "})", "", "pm.test(\"List contains one element\", function () {", " pm.expect(jsonData.items.length).to.equal(1);", "});", "", "var theMeeting = jsonData.items[0];", "", "pm.test(\"scheduledMeeting has meetingSeriesId\", function () {", " pm.expect(theMeeting.meetingSeriesId).to.equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "", "pm.test(\"Meeting ID matches meetingSeriesId\", function () {", " pm.expect(theMeeting.id).to.equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"Meeting Number matches\", function () {", " pm.expect(theMeeting.meetingNumber).to.equal(pm.collectionVariables.get(\"_singleMeetingNumber\"));", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(theMeeting.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(theMeeting.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"Meeting type is scheduledMeeting\", function () {", " pm.expect(theMeeting.meetingType).to.equal(\"scheduledMeeting\");", "});", "", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "pm.test(\"Start time is as expected in UTC Time\", function () {", " let _start_time = pm.collectionVariables.get('_start_time');", " let start_time = moment.utc(_start_time);", " pm.expect(theMeeting.start).to.equal(start_time.format());", "});", "", "pm.test(\"End Time time is as expected in UTC Time\", function () {", " let _end_time = pm.collectionVariables.get('_end_time');", " let end_time = moment.utc(_end_time);", " pm.expect(theMeeting.end).to.equal(end_time.format());", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "type": "text", "value": "{{Authorization}}" } ], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingSeriesId={{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingSeriesId", "value": "{{_singleMeetingId}}" } ] }, "description": "If we pass the id as a meetingSeriesId query param, we get a list of scheduledMeeting meetingTypes that are associated with this series. In this case since the meeting was non-recurring there is only one result. This scheduledMeeting DTO is exactly the same as it's non-recurring meetingSeries parent, except that the meetingType is different (scheduledMeeting vs meetingSeries), and it provides an explicit meetingSeriesId. Note that this matches the id, since in the caase of a non-recurring meeting the meetingSeries object and the scheduleMeeting object are the same thing." }, "response": [] }, { "name": "Update the meeting", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// Get the response body from the previous GET", "let theMeeting = JSON.parse(pm.collectionVariables.get(\"_theMeeting\"));", "", "// Change a couple of attributes", "theMeeting.enabledAutoRecordMeeting = (theMeeting.enabledAutoRecordMeeting) ? false : true;", "", "// Save the new expected values for our test", "pm.collectionVariables.set(\"_expectedAutoRecordMeeting\", theMeeting.enabledAutoRecordMeeting);", "", "// Write the updated body for the PUT back to the environment", "pm.collectionVariables.set(\"_theMeeting\", JSON.stringify(theMeeting));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"Meeting ID matches\", function () {", " pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"enabledAutoRecordMeeting is now true\", function () {", " pm.expect(jsonData.enabledAutoRecordMeeting).to.equal(pm.collectionVariables.get(\"_expectedAutoRecordMeeting\"));", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{{_theMeeting}}\n" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_singleMeetingId}}" ] }, "description": "In our pre-request script we grab the saved version of this meeting that we saved when we created it. We toggle the boolean value `enabledAutoRecordMeeting`. We then write the new meeting object to an environment and use that as the body of our PUT request. Our test validates that the result has the new value." }, "response": [] }, { "name": "Create series meeting", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at one pm", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(13, \"hours\");", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "console.log(pm.collectionVariables.get(\"_start_time\"));", "", "// End at 13:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "console.log(pm.collectionVariables.get(\"_end_time\"));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "pm.collectionVariables.set(\"_theMeetingSeries\", JSON.stringify(jsonData));", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(jsonData.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_recurringMeetingId\", jsonData.id);", "});", "", "pm.test(\"Response is valid and has an meeting number\", function () {", " pm.expect(jsonData.meetingNumber).to.be.a(\"string\");", " pm.collectionVariables.set(\"_recurringMeetingNumber\", jsonData.meetingNumber);", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(jsonData.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(jsonData.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"meetingType is meetingSeries\", function () {", " pm.expect(jsonData.meetingType).to.equal(\"meetingSeries\");", "});", "", "pm.test(\"Start time is as expected\", function () {", " pm.expect(jsonData.start).to.equal(pm.collectionVariables.get(\"_start_time\"));", "});", "", "pm.test(\"End Time time is as expected\", function () {", " pm.expect(jsonData.end).to.equal(pm.collectionVariables.get(\"_end_time\"));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Series Title\",\r\n \"agenda\": \"Series Agenda\",\r\n \"password\": \"A@ssword123\",\r\n \"start\": \"{{_start_time}}\",\r\n \"end\": \"{{_end_time}}\",\r\n \"timezone\": \"{{TIMEZONE_STRING}}\",\r\n \"recurrence\": \"FREQ=DAILY;INTERVAL=1;COUNT=10\",\r\n \"enabledAutoRecordMeeting\": false,\r\n \"allowAnyUserToBeCoHost\": false\r\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] }, "description": "This request is like the first POST request except that we add the reccurence field in our request body" }, "response": [] }, { "name": "Get recurring meeting by number", "event": [ { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array');", "});", "", "var theMeeting = pm.response.json().items[0];", "// console.log(theMeeting);", "", "pm.test(\"Meeting ID matches\", function () {", " pm.expect(theMeeting.id).to.not.equal(pm.collectionVariables.get(\"_recurringMeetingId\"));", "});", "", "pm.test(\"meetingSeriesId matches\", function () {", " pm.expect(theMeeting.meetingSeriesId).to.equal(pm.collectionVariables.get(\"_recurringMeetingId\"));", "});", "", "pm.test(\"Meeting Number matches\", function () {", " pm.expect(theMeeting.meetingNumber).to.equal(pm.collectionVariables.get(\"_recurringMeetingNumber\"));", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(theMeeting.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(theMeeting.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"meetingType is meetingSeries\", function () {", " pm.expect(theMeeting.meetingType).to.equal(\"scheduledMeeting\");", "});", "", "pm.test(\"Start time is as expected in UTC Time\", function () {", " let start_time = moment.utc(pm.collectionVariables.get(\"_start_time\"));", " pm.expect(theMeeting.start).to.equal(start_time.format());", "});", "", "pm.test(\"End Time time is as expected in UTC Time\", function () {", " let end_time = moment.utc(pm.collectionVariables.get(\"_end_time\"));", " pm.expect(theMeeting.end).to.equal(end_time.format());", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingNumber={{_recurringMeetingNumber}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingNumber", "value": "{{_recurringMeetingNumber}}" } ] }, "description": "In addition to including the ID of a meeting in the GET /meetings url, you can specify query parameters to get a meeting. In this example, we specify the meetingNumber. The result is always a list of items although in this case we get back just one element in the list, the meetingSeries that we just created with that meeting number." }, "response": [] }, { "name": "Get recurring meeting by meetingSeriesId", "event": [ { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array');", "});", "", "// Let's examine the first item in the list", "var theMeeting = pm.response.json().items[0];", "pm.collectionVariables.set(\"_aScheduledMeeting\", JSON.stringify(theMeeting));", "pm.collectionVariables.set(\"_aScheduledMeetingId\", theMeeting.id);", "", "pm.test(\"meetingType is scheduledMeeting\", function () {", " pm.expect(theMeeting.meetingType).to.equal(\"scheduledMeeting\");", "});", "", "pm.test(\"scheduledMeeting type ID does not match parents'\", function () {", " pm.expect(theMeeting.id).to.not.equal(pm.collectionVariables.get(\"_recurringMeetingId\"));", "});", "", "pm.test(\"meetingSeriesId does match\", function () {", " pm.expect(theMeeting.meetingSeriesId).to.equal(pm.collectionVariables.get(\"_recurringMeetingId\"));", "});", "", "pm.test(\"Meeting Number matches\", function () {", " pm.expect(theMeeting.meetingNumber).to.equal(pm.collectionVariables.get(\"_recurringMeetingNumber\"));", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(theMeeting.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(theMeeting.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"Start time is as expected in UTC Time\", function () {", " let start_time = moment.utc(pm.collectionVariables.get(\"_start_time\"));", " pm.expect(theMeeting.start).to.equal(start_time.format());", "});", "", "pm.test(\"End Time time is as expected in UTC Time\", function () {", " let end_time = moment.utc(pm.collectionVariables.get(\"_end_time\"));", " pm.expect(theMeeting.end).to.equal(end_time.format());", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/?meetingSeriesId={{_recurringMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "" ], "query": [ { "key": "meetingSeriesId", "value": "{{_recurringMeetingId}}" } ] }, "description": "We can perform the same request by specfing the meetingSeriesId as the query parameter instead of the meetingNumber. In this case the response will be a list of scheduledMeeting meetingType objects associated with the series. In this case each scheduledMeeting object has a unique id, but they all share a common meetingSeriesId." }, "response": [] }, { "name": "List a week's worth of recurring meeting instances", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Get a weeks worth of meetings starting at the start time", "let start_time = pm.collectionVariables.get(\"_start_time\");", "start_time = moment(start_time);", "let to_time = moment().startOf(start_time);", "to_time = to_time.add(7, \"days\");", "let _to_time = to_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_to_time\", _to_time);", "let from = encodeURIComponent(pm.collectionVariables.get(\"_start_time\"));", "let to = encodeURIComponent(_to_time);", "pm.collectionVariables.set(\"_from_time\", from);", "pm.collectionVariables.set(\"_to_time\", to);", "", "", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"List length does not exceed expected length of 7\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.below(8);", "});", "", "", "var jsonData = pm.response.json();", "if (Array.isArray(jsonData.items)) {", " let from = pm.collectionVariables.get(\"_start_time\");", " let date = moment.utc(from);", " from = date.format(\"YYYY-MM-DDTHH:mm:ss\") + \"Z\";", " let to = pm.collectionVariables.get(\"_to_time\");", " date = moment.utc(to);", " to = date.format(\"YYYY-MM-DDTHH:mm:ss\") + \"Z\";", " let date_in_range = true;", " for (let meeting of jsonData.items) {", " if ((meeting.end <= from) || (meeting.start >= to)) {", " tests[`Got meeting calendar view: Got meeting with start date:${meeting.start},end date:${meeting.end}, outside of range{from:${from}, to:${to}}`] = false;", " date_in_range = false;", " }", " }", " if (date_in_range) {", " tests[`Got meeting calendar view: All meeting start times in range{from:${from}, to:${to}}`] = true;", " }", "}" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{CITOKEN}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingSeriesId={{_recurringMeetingId}}&from={{_from_time}}&to={{_to_time}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "", "value": "", "disabled": true }, { "key": "", "value": "\n", "disabled": true }, { "key": "meetingSeriesId", "value": "{{_recurringMeetingId}}" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" } ] }, "description": "When querying for a list of scheduled meetings you can use the `to` and `from` query params. In this case we set it for a week which is the same as the default." }, "response": [] }, { "name": "Test max param on meeting instances", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"List length does not exceed max specified\", function () {", " let max_results =parseInt(pm.variables.get(\"MAX_RESULTS\"));", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.below(max_results+1);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{CITOKEN}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingSeriesId={{_recurringMeetingId}}&from={{_from_time}}&to={{_to_time}}&max={{MAX_RESULTS}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingSeriesId", "value": "{{_recurringMeetingId}}" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" }, { "key": "max", "value": "{{MAX_RESULTS}}" } ] }, "description": "You can also limit the number of results returned by setting the `max` query param. Here we make the same call as before but limit it to our MAX_RESULTS environment variable." }, "response": [] }, { "name": "Update a scheduled MeetingInstance", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// Get the response body from the previous GET", "let theMeeting = JSON.parse(pm.collectionVariables.get(\"_aScheduledMeeting\"));", "", "// Change a couple of attributes", "theMeeting.enabledAutoRecordMeeting = (theMeeting.enabledAutoRecordMeeting) ? false : true;", "", "// Save the new expected values for our test", "pm.collectionVariables.set(\"_expectedAutoRecordMeeting\", theMeeting.enabledAutoRecordMeeting);", "", "// Write the updated body for the PUT back to the environment", "pm.collectionVariables.set(\"_aScheduledMeeting\", JSON.stringify(theMeeting));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"Meeting ID matches\", function () {", " pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(\"_aScheduledMeetingId\"));", "});", "", "pm.test(\"isModified attribute is now true\", function () {", " pm.expect(jsonData.isModified).to.equal(true);", "});", "", "", "pm.test(\"enabledAutoRecordMeeting is now true\", function () {", " pm.expect(jsonData.enabledAutoRecordMeeting).to.equal(pm.collectionVariables.get(\"_expectedAutoRecordMeeting\"));", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{{_aScheduledMeeting}}\n" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_aScheduledMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_aScheduledMeetingId}}" ] }, "description": "This time we will modify just a single scheduledMeeting instance. Our prequest script will read in a copy of that meeting that we saved when we first listed the scheduledMeeting instances, and our test will validate that the value has changed as expected. Note that when a scheduleMeeting is updated the `isModified` attribute is set to true." }, "response": [] }, { "name": "Validate just one scheduledMeeting was updated", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"List length is two\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.equal(2);", "});", "", "pm.test(\"Meetings have different enabledAutoRecordMeeting settings\", function () {", " var jsonData = pm.response.json();", " var theList = jsonData.items;", " pm.expect(theList[0].enabledAutoRecordMeeting).to.not.equal(theList[1].enabledAutoRecordMeeting)", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{CITOKEN}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingSeriesId={{_recurringMeetingId}}&max=2", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingSeriesId", "value": "{{_recurringMeetingId}}" }, { "key": "max", "value": "2" } ] }, "description": "Let's get the next two scheduledMeeting instances and validate that they have different values for the enabledAutoRecordMeeting setting." }, "response": [] }, { "name": "Update the meeting series", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// Get the response body from the previous GET", "let theMeeting = JSON.parse(pm.collectionVariables.get(\"_theMeetingSeries\"));", "", "// Change a couple of attributes", "theMeeting.enabledAutoRecordMeeting = (theMeeting.enabledAutoRecordMeeting) ? false : true;", "", "// Save the new expected values for our test", "pm.collectionVariables.set(\"_expectedAutoRecordMeeting\", theMeeting.enabledAutoRecordMeeting);", "", "// Write the updated body for the PUT back to the environment", "pm.collectionVariables.set(\"_theMeetingSeries\", JSON.stringify(theMeeting));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"Meeting ID matches\", function () {", " pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(\"_recurringMeetingId\"));", "});", "", "pm.test(\"Meeting Number matches\", function () {", " pm.expect(jsonData.meetingNumber).to.equal(pm.collectionVariables.get(\"_recurringMeetingNumber\"));", "});", "", "pm.test(\"enabledAutoRecordMeeting is now \" + pm.collectionVariables.get(\"_expectedAutoRecordMeeting\"), function () {", " pm.expect(jsonData.enabledAutoRecordMeeting).to.equal(pm.collectionVariables.get(\"_expectedAutoRecordMeeting\"));", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{{_theMeetingSeries}}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_recurringMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_recurringMeetingId}}" ] }, "description": "This time we will modify just a single scheduledMeeting instance. Our prequest script will read in a copy of that meeting that we saved when we first listed the scheduledMeeting instances, and our test will validate that the value has changed as expected. The `isModified` attribute will be false in all scheduledMeeting instances, except the one that we previously changed." }, "response": [] }, { "name": "Validate all scheduledMeetings are updated", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"List length is two\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.equal(2);", "});", "", "pm.test(\"Meetings have the same enabledAutoRecordMeeting settings\", function () {", " var jsonData = pm.response.json();", " var theList = jsonData.items;", " pm.expect(theList[0].enabledAutoRecordMeeting).to.equal(theList[1].enabledAutoRecordMeeting)", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{CITOKEN}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingSeriesId={{_recurringMeetingId}}&from={{_from_time}}&to={{_to_time}}&max={{MAX_RESULTS}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingSeriesId", "value": "{{_recurringMeetingId}}" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" }, { "key": "max", "value": "{{MAX_RESULTS}}" } ] }, "description": "Let's get the next two scheduledMeeting instances and validate that they now all have the same value for the enabledAutoRecordMeeting setting." }, "response": [] }, { "name": "Create a 3rd non recurring meeting for tommorow", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at two PM", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(14, \"hours\");", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "", "// End at 2:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " console.log(jsonData.id);", " pm.expect(jsonData.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_secondSingleMeetingId\", jsonData.id);", "});", "", "pm.test(\"Response has a meeting number\", function () {", " pm.expect(jsonData.meetingNumber).to.be.a(\"string\");", " pm.collectionVariables.set(\"_secondSingleMeetingNumber\", jsonData.meetingNumber);", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Sample Title\",\n \"agenda\": \"Sample Agenda\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\", \n \"enabledAutoRecordMeeting\": false,\n \"allowAnyUserToBeCoHost\": false\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] }, { "name": "Get meetingSeries for next week (default)", "event": [ { "listen": "test", "script": { "exec": [ "var moment = require('moment');", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"List length is at least 3\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.above(2);", "});", "", "// Save the response in order to compare it with the next call", "pm.collectionVariables.set(\"_thisWeeksMeetingSeries\", JSON.stringify(pm.response.json()));", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] }, "description": "A GET to /meetings API with no query params returns a list of meetingSeries that have one or more associated scheduleMeetings that will happen in the next seven days. We expect at least 3 results." }, "response": [] }, { "name": "Get meetingSeries for next week (explicit params)", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"List length is at least 3\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.above(2);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=meetingSeries&from={{_from_time}}&to={{_to_time}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "meetingSeries" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" } ] }, "description": "Here we also get all the meetingSeries for the next week but this time we explicitly ask for `meetingType` of meetingSeries and set the `to` and `from` parameters for the next seven days. We test that we got the same results as the previous call" }, "response": [] }, { "name": "Get scheduledMeetings for next week", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "// There should be more scheduledMeetings than meetingSeries if any of our meetingSeries are daily recurring", "pm.test(\"There are more scheduledMeetings than meetingSeries\", function () {", " var scheduledMeetingsList = pm.response.json();", " var meetingSeriesList = JSON.parse(pm.collectionVariables.get(\"_thisWeeksMeetingSeries\"));", " pm.expect(scheduledMeetingsList.items.length).to.be.above(meetingSeriesList.items.length);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=scheduledMeeting&from={{_from_time}}&to={{_to_time}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "scheduledMeeting" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" } ] }, "description": "Now we change the `meetingType` to scheduledMeetings to get the scheduledMeetings instead of the meetingSeries type." }, "response": [] }, { "name": "Get scheduledMeetings from last week", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "// There should be more scheduledMeetings than meetingSeries if any of our meetingSeries are daily recurring", "pm.test(\"There are more scheduledMeetings than meetingSeries\", function () {", " var scheduledMeetingsList = pm.response.json();", " var meetingSeriesList = JSON.parse(pm.collectionVariables.get(\"_thisWeeksMeetingSeries\"));", " if (meetingSeriesList.items.length >= 10) {", " // List APIs return a max of 10 so we will skip this test", " return ", " }", " pm.expect(scheduledMeetingsList.items.length).to.be.above(meetingSeriesList.items.length);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=scheduledMeeting&from={{_from_time}}&to={{_to_time}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "scheduledMeeting" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" } ] }, "description": "By changing the `to` and `from` parameters we can look backwards and see previously scheduledMeetings. At the time of creating this collect they are all in the `state` of scheduled but soon they should be in either the `inProgress`, `ended` or `missed` states." }, "response": [] }, { "name": "Get scheduledMeetings that were missed - not yet available", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// start from today", "let from_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End after 7 days", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=scheduledMeeting&from={{_from_time}}&to={{_to_time}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "scheduledMeeting" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" } ] }, "description": "In the future we can add a `state` query param to \"missed\" and look backwards to see if we can find any scheduleMeetings that were missed" }, "response": [] }, { "name": "Get meetings that were joined last week -- not yet available", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "// This will be empty until the in-meetings APIs", "// become available and this data object is populated", "pm.test(\"List length is 0\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.equal(0);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// Start seven days ago", "let from_time = moment().startOf(\"day\");", "from_time = from_time.subtract(7, \"day\");", "pm.collectionVariables.set(\"_from_time\", from_time);", "", "// End today", "let to_time = moment().startOf(\"day\");", "to_time = to_time.add(7, \"day\");", "pm.collectionVariables.set(\"_to_time\", to_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=meeting&from={{_from_time}}&to={{_to_time}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "meeting" }, { "key": "from", "value": "{{_from_time}}" }, { "key": "to", "value": "{{_to_time}}" } ] }, "description": "In the near future you can set the `meetingType` to \"meeting\" to get meetings that have occured or are occuring." }, "response": [] }, { "name": "Get meetings that are happening now - not yet available", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "// This will be empty until the in-meetings APIs", "// become available and this data object is populated", "pm.test(\"List length is 0\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.equal(0);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// Start today", "let start_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", start_time);", "", "// End after 7 days", "let end_time = moment().startOf(\"day\");", "end_time = end_time.add(7, \"day\");", "pm.collectionVariables.set(\"_end_time\", start_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=meetingSeries&state=inProgress", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "meetingSeries" }, { "key": "state", "value": "inProgress" } ] }, "description": "Also in the near future you will be able to set the `state` to \"inProgress\" to get meetings that are occuring now. (You can query for either a meetingSeries or a meeting `meetingType`, but you must specify the one you are looking for)." }, "response": [] }, { "name": "Get meetings that are happening now - not yet available Copy", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "// This will be empty until the in-meetings APIs", "// become available and this data object is populated", "pm.test(\"List length is 0\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.equal(0);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "", "// Start today", "let start_time = moment().startOf(\"day\");", "pm.collectionVariables.set(\"_from_time\", start_time);", "", "// End after 7 days", "let end_time = moment().startOf(\"day\");", "end_time = end_time.add(7, \"day\");", "pm.collectionVariables.set(\"_end_time\", start_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings?meetingType=meetingSeries&state=inProgress", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ], "query": [ { "key": "meetingType", "value": "meetingSeries" }, { "key": "state", "value": "inProgress" } ] }, "description": "Also in the near future you will be able to set the `state` to \"inProgress\" to get meetings that are occuring now. (You can query for either a meetingSeries or a meeting `meetingType`, but you must specify the one you are looking for)." }, "response": [] }, { "name": "Delete the non recurring meeting", "event": [ { "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", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_singleMeetingId}}" ] } }, "response": [] }, { "name": "Delete the recurring meeting", "event": [ { "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": "" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_recurringMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_recurringMeetingId}}" ] } }, "response": [] }, { "name": "Delete the second single meeting", "event": [ { "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", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_secondSingleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_secondSingleMeetingId}}" ] } }, "response": [] }, { "name": "Attempt to delete a deleted meeting - should be 404", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 404\", function () {", " pm.response.to.have.status(404);", "});", "", "pm.test(\"Response contains a message field\", function () {", " pm.expect(pm.response.json().message).to.be.a(\"string\");", "});", "", "pm.test(\"Response contains an errors array\", function () {", " pm.expect(pm.response.json().errors).to.be.an(\"array\");", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{CITOKEN}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_singleMeetingId}}" ] } }, "response": [] }, { "name": "Attempt to GET a deleted meeting - should be 404", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 404\", function () {", " pm.response.to.have.status(404);", "});", "", "pm.test(\"Response contains a message field\", function () {", " pm.expect(pm.response.json().message).to.be.a(\"string\");", "});", "", "pm.test(\"Response contains an errors array\", function () {", " pm.expect(pm.response.json().errors).to.be.an(\"array\");", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_singleMeetingId}}" ] } }, "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": "Meeting Invitees", "item": [ { "name": "Get potential invitee details", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array');", "});", "", "pm.test(\"There is a single Webex user with this email\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).equal(1);", "});", "", "pm.test(\"We are able to get the users display name\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items[0].displayName).to.be.a('string');", " pm.collectionVariables.set(\"_otherUsersDisplayName\", jsonData.items[0].displayName)", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/people?email={{OTHER_USERS_EMAIL}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "people" ], "query": [ { "key": "email", "value": "{{OTHER_USERS_EMAIL}}" } ] }, "description": "Here we query info about the Webex user you configured in the OTHER_USERS_EMAIL collection variable. We will use this to get their display name which we can set when inviting them to the meeting." }, "response": [] }, { "name": "Get my details", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"We are able to get our own email\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.emails[0]).to.be.a('string');", " pm.collectionVariables.set(\"_myEmail\", jsonData.emails[0])", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/people/me", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "people", "me" ] }, "description": "We call this in order to get our own email used in subsequent requests." }, "response": [] }, { "name": "Create a non recurring meeting for tommorow", "event": [ { "listen": "prerequest", "script": { "exec": [ "var moment = require('moment');", "var utcoffset = pm.variables.get(\"UTCOFFSET\"); ", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " console.log(jsonData.id);", " pm.expect(jsonData.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_singleMeetingId\", jsonData.id);", "});", "", "pm.test(\"Response has a meeting number\", function () {", " pm.expect(jsonData.meetingNumber).to.be.a(\"string\");", " pm.collectionVariables.set(\"_singleMeetingNumber\", jsonData.meetingNumber);", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(jsonData.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Response has sipAddress\", function () {", " pm.expect(jsonData.sipAddress).to.be.a(\"string\");", "});", "", "pm.test(\"Recurrance is single\", function () {", " pm.expect(jsonData.meetingType).to.equal(\"meetingSeries\");", "});", "", "pm.test(\"Start time is as expected\", function () {", " pm.expect(jsonData.start).to.equal(pm.collectionVariables.get(\"_start_time\"));", "});", "", "pm.test(\"End Time time is as expected\", function () {", " pm.expect(jsonData.end).to.equal(pm.collectionVariables.get(\"_end_time\"));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Sample Title\",\n \"agenda\": \"Sample Agenda\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\", \n \"enabledAutoRecordMeeting\": false,\n \"allowAnyUserToBeCoHost\": false\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] }, "description": "We'll use this meeting to manage Invitees" }, "response": [] }, { "name": "Get meeting invitees", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array');", "});", "", "pm.test(\"There are no invitees\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).equal(0);", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees?meetingId={{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ], "query": [ { "key": "meetingId", "value": "{{_singleMeetingId}}" } ] }, "description": "We did not set any invitees when we first created the meeting, so we expect this API to return an empty list." }, "response": [] }, { "name": "Add a meeting invitee by email", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingInvitee = pm.response.json();", "pm.collectionVariables.set(\"_meetingInvitee\", theMeetingInvitee.id);", "", "pm.test(\"Email of invitee matches\", function () {", " pm.expect(theMeetingInvitee.email).equal(pm.variables.get(\"OTHER_USERS_EMAIL\"));", "});", "", "pm.test(\"meeting id matches\", function () {", " pm.expect(theMeetingInvitee.meetingId).equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"invitee is not a coHost\", function () {", " pm.expect(theMeetingInvitee.coHost).equal(false);", "});", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"meetingId\": \"{{_singleMeetingId}}\",\n\t\"email\": \"{{OTHER_USERS_EMAIL}}\",\n\t\"displayName\": \"{{_otherUsersDisplayName}}\",\n\t\"coHost\": false\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ] }, "description": "Now lets add the user you configured in the OTHER_USERS_EMAIL collection variable." }, "response": [] }, { "name": "Add a duplicate invitee", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 409\", function () {", " pm.response.to.have.status(409);", "});", "", "pm.test(\"Response contains a message field\", function () {", " pm.expect(pm.response.json().message).to.be.a(\"string\");", "});", "", "pm.test(\"Response contains an errors array\", function () {", " pm.expect(pm.response.json().errors).to.be.an(\"array\");", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\t\"meetingId\": \"{{_singleMeetingId}}\",\n\t\"email\": \"{{OTHER_USERS_EMAIL}}\",\n\t\"displayName\": \"{{OTHER_USERS_DISPLAYNAME}}\",\n\t\"alternateHost\": false\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees?meetingId={{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ], "query": [ { "key": "meetingId", "value": "{{_singleMeetingId}}" } ] }, "description": "If we try to add somone who is already invited (based on the email), we will get a 409 conflict error." }, "response": [] }, { "name": "Get meeting invitee Info", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingInvitee = pm.response.json();", "pm.collectionVariables.set(\"_meetingInviteeBody\", JSON.stringify(theMeetingInvitee));", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees/{{_meetingInvitee}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees", "{{_meetingInvitee}}" ] }, "description": "There should now be one user in the invitee list" }, "response": [] }, { "name": "Invite myself via email", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingInvitee = pm.response.json();", "pm.collectionVariables.set(\"_secondMeetingInvitee\", theMeetingInvitee.id);", "", "pm.test(\"Email of invitee matches\", function () {", " pm.expect(theMeetingInvitee.email).equal(pm.collectionVariables.get(\"_myEmail\"));", "});", "", "pm.test(\"meeting id matches\", function () {", " pm.expect(theMeetingInvitee.meetingId).equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"invitee is not a coHost\", function () {", " pm.expect(theMeetingInvitee.coHost).equal(false);", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"meetingId\": \"{{_singleMeetingId}}\",\n\t\"email\": \"{{_myEmail}}\"\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ] }, "description": "We can add ourselves as an invitee as well. (As the meeting organizer this is not strictly necessary, but it allows us to further exercise this API)" }, "response": [] }, { "name": "Get meeting invitees --now 2", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"There are two\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).equal(2)", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees?meetingId={{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ], "query": [ { "key": "meetingId", "value": "{{_singleMeetingId}}" } ] } }, "response": [] }, { "name": "Get meeting invitees - test max", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"query param max=1 was respected\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).to.be.below(2)", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees?meetingId={{_singleMeetingId}}&max=1", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ], "query": [ { "key": "meetingId", "value": "{{_singleMeetingId}}" }, { "key": "max", "value": "1" } ] }, "description": "The meetingInvitees api supports a `max` query filter parameter." }, "response": [] }, { "name": "Change Meeting Invitee", "event": [ { "listen": "prerequest", "script": { "exec": [ "// Get the response body from the previous GET", "let theInvitee = JSON.parse(pm.collectionVariables.get(\"_meetingInviteeBody\"));", "// Allow the meetingInvitee to be an alternate host", "theInvitee.coHost = true;", "// delete theInvitee.id", "// delete theInvitee.meetingId", "", "// Write the updated body for the PUT back to the environment", "pm.collectionVariables.set(\"_meetingInviteeBody\", JSON.stringify(theInvitee));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingInvitee = pm.response.json();", "", "pm.test(\"Email of invitee matches\", function () {", " pm.expect(theMeetingInvitee.email).to.be.a('string');", " pm.expect(theMeetingInvitee.email).equal(pm.variables.get(\"OTHER_USERS_EMAIL\"));", "});", "", "pm.test(\"meeting id matches\", function () {", " pm.expect(theMeetingInvitee.meetingId).equal(pm.collectionVariables.get(\"_singleMeetingId\"));", "});", "", "pm.test(\"invitee is now an alternate host\", function () {", " pm.expect(theMeetingInvitee.coHost).equal(true);", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{_meetingInviteeBody}}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees/{{_meetingInvitee}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees", "{{_meetingInvitee}}" ] }, "description": "In the prerequest script we will fetch the saved object that was created when we invited the user with OTHER_USERS_EMAIL collection variable. By default meeting invitees are not cohosts, but we can modify their meetingInvitee object and use the PUT request to make them one." }, "response": [] }, { "name": "Delete meeting invitee", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees/{{_meetingInvitee}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees", "{{_meetingInvitee}}" ] } }, "response": [] }, { "name": "Get meeting invitees --now 1", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"There are three invitees\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).equal(1)", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees?meetingId={{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ], "query": [ { "key": "meetingId", "value": "{{_singleMeetingId}}" } ] } }, "response": [] }, { "name": "Delete second meeting Invitee", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 204\", function () {", " pm.response.to.have.status(204);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees/{{_secondMeetingInvitee}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees", "{{_secondMeetingInvitee}}" ] } }, "response": [] }, { "name": "Delete non valid invitee - should fail", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 404\", function () {", " pm.response.to.have.status(404);", "});", "", "pm.test(\"Response contains a message field\", function () {", " pm.expect(pm.response.json().message).to.be.a(\"string\");", "});", "", "pm.test(\"Response contains an errors array\", function () {", " pm.expect(pm.response.json().errors).to.be.an(\"array\");", "});", "", "pm.test(\"Got expected error message\", function () {", " pm.expect(pm.response.json().message).to.equal(\"Cannot find invitee\");", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees/{{_meetingInvitee}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees", "{{_meetingInvitee}}" ] } }, "response": [] }, { "name": "Get meeting invitees --now 0", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"List of items was returned\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items).to.be.an('array')", "});", "", "pm.test(\"There are three invitees\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.items.length).equal(0)", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingInvitees?meetingId={{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingInvitees" ], "query": [ { "key": "meetingId", "value": "{{_singleMeetingId}}" } ] } }, "response": [] }, { "name": "Delete the non recurring meeting", "event": [ { "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", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_singleMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_singleMeetingId}}" ] } }, "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": [] } ], "description": "Exercise the /meetingInvitees endpoint" }, { "name": "Meeting Preferences", "item": [ { "name": "Get Meeting Preference Details", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences" ] }, "description": "The meetingPreferences endpoint exposes all the meeting preferences associated with the user [Doc](https://developer.webex.com/docs/api/v1/meeting-preferences/get-meeting-preference-details)" }, "response": [] }, { "name": "Get Personal Meeting Room Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingPrefs = pm.response.json();", "pm.collectionVariables.set(\"_personalMeetingRoom\", JSON.stringify(theMeetingPrefs));", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/personalMeetingRoom", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "personalMeetingRoom" ] } }, "response": [] }, { "name": "Update Personal Meeting Room Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{{_personalMeetingRoom}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/personalMeetingRoom", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "personalMeetingRoom" ] } }, "response": [] }, { "name": "Get Audio Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var _audioOptions = pm.response.json();", "pm.collectionVariables.set(\"_audioOptions\", JSON.stringify(_audioOptions));", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/audio", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "audio" ] } }, "response": [] }, { "name": "Update Audio Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingPrefs = pm.response.json();", "pm.collectionVariables.set(\"_audioPreferences\", JSON.stringify(theMeetingPrefs));", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{{_audioOptions}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/audio", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "audio" ] } }, "response": [] }, { "name": "Get Video Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var _videoOptions = pm.response.json();", "pm.collectionVariables.set(\"_videoOptions\", JSON.stringify(_videoOptions));", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/video", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "video" ] } }, "response": [] }, { "name": "Update Video Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingPrefs = pm.response.json();", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{{_videoOptions}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/video", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "video" ] } }, "response": [] }, { "name": "Get Scheduling Options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeetingPrefs = pm.response.json();", "pm.collectionVariables.set(\"_schedulingPreferences\", JSON.stringify(theMeetingPrefs));", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/schedulingOptions", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "schedulingOptions" ] } }, "response": [] }, { "name": "Update scheduling options", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var jsonData = pm.response.json();", "", "pm.test(\"_joinBeforeHostMinutes is now \" + pm.collectionVariables.get(\"_joinBeforeHostMinutes\"), function () {", " pm.expect(jsonData.joinBeforeHostMinutes).to.equal(pm.collectionVariables.get(\"_joinBeforeHostMinutes\"));", "});", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "// Get the response body from the previous GET", "let thePreferences = JSON.parse(pm.collectionVariables.get(\"_schedulingPreferences\"));", "", "// Change a couple of attributes", "if (thePreferences.joinBeforeHostMinutes <= 5) {", " thePreferences.joinBeforeHostMinutes += 5;", "} else {", " thePreferences.joinBeforeHostMinutes -= 5;", "}", "", "// Save the new expected values for our test", "pm.collectionVariables.set(\"_joinBeforeHostMinutes\", thePreferences.joinBeforeHostMinutes);", "", "// Write the updated body for the PUT back to the environment", "pm.collectionVariables.set(\"_schedulingPreferences\", JSON.stringify(thePreferences));", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{{_schedulingPreferences}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/schedulingOptions", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "schedulingOptions" ] }, "description": "We can manipulate most aspcects of user preferences. Here we will add or subtract a 5 minutes to the `joinBeforeHostMinutes` preference" }, "response": [] }, { "name": "Get Site List", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/sites", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "sites" ] } }, "response": [] }, { "name": "Update Default Site", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "{\n \"siteUrl\": \"example.webex.com\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingPreferences/sites", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingPreferences", "sites" ] } }, "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": [] } ], "description": "Exercise the /meetingPreferences endpoint" }, { "name": "Meeting Join", "item": [ { "name": "SetUp", "item": [ { "name": "Create a Meeting for Join a Meeting", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_joinMeetingId\", theMeeting.id);", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Meeting Join Title\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "Join a Meeting", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"meetingId\": \"{{_joinMeetingId}}\",\n \"joinDirectly\": false\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/join", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "join" ] } }, "response": [] } ], "description": "Exercise the /meetings/join endpoint" }, { "name": "Meeting Chats", "item": [ { "name": "List Meeting Chats", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/postMeetingChats?meetingId={{SAMPLE_MEETING_ID}}&max=100&offset=0", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "postMeetingChats" ], "query": [ { "key": "meetingId", "value": "{{SAMPLE_MEETING_ID}}" }, { "key": "max", "value": "100" }, { "key": "offset", "value": "0" } ] } }, "response": [] }, { "name": "Delete Meeting Chats", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/postMeetingChats?meetingId={{SAMPLE_MEETING_ID}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "postMeetingChats" ], "query": [ { "key": "meetingId", "value": "{{SAMPLE_MEETING_ID}}" } ] } }, "response": [] } ], "description": "Exercise the /meetings/postMeetingChats endpoint" }, { "name": "Meeting Closed Captions", "item": [ { "name": "List Meeting Closed Captions", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "pm.test(\"Response is valid and has an id\", function () {", " var _closedCaptionId = json.items[0].id;", " pm.collectionVariables.set(\"_closedCaptionId\", _closedCaptionId);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingClosedCaptions?meetingId={{SAMPLE_MEETING_ID}}&max=100&offset=0", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingClosedCaptions" ], "query": [ { "key": "meetingId", "value": "{{SAMPLE_MEETING_ID}}" }, { "key": "max", "value": "100" }, { "key": "offset", "value": "0" } ] } }, "response": [] }, { "name": "List Meeting Closed Caption Snippets", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingClosedCaptions/{{_closedCaptionId}}/snippets", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingClosedCaptions", "{{_closedCaptionId}}", "snippets" ] } }, "response": [] }, { "name": "Download Meeting Closed Caption Snippets", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingClosedCaptions/{{_closedCaptionId}}/download", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingClosedCaptions", "{{_closedCaptionId}}", "download" ] } }, "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": [] } ], "description": "Exercise the /meetingClosedCaptions endpoint" }, { "name": "Meeting Participants", "item": [ { "name": "Setup", "item": [ { "name": "Create a Meeting for Meeting Participants", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " console.log(theMeeting.id);", " pm.collectionVariables.set(\"_participantMeetingId\", theMeeting.id);", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{WEBEX_TOKEN}}", "type": "text", "disabled": true } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Meeting Participants Title\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "List Meeting Participants", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "pm.test(\"Response is valid and has an id\", function () {", " var _participantId = json.items[0].id;", " pm.collectionVariables.set(\"_participantId\", _participantId);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingParticipants?meetingId={{_participantMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingParticipants" ], "query": [ { "key": "meetingId", "value": "{{_participantMeetingId}}" } ] } }, "response": [] }, { "name": "Query Meeting Participants with Email", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"emails\": [\n \"test@mailinator.com\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingParticipants/query?meetingId={{_participantMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingParticipants", "query" ], "query": [ { "key": "meetingId", "value": "{{_participantMeetingId}}" } ] } }, "response": [] }, { "name": "Get Meeting Participant Details", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingParticipants/{{_participantId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingParticipants", "{{_participantId}}" ] } }, "response": [] }, { "name": "Update a Participant", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"muted\": true,\n \"admit\": true,\n \"expel\": false\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingParticipants/{{_participantId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingParticipants", "{{_participantId}}" ] } }, "response": [] }, { "name": "Admit Participants", "request": { "method": "POST", "header": [ { "key": "", "value": "", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"items\": [\n {\n \"participantId\": \"{{_participantId}}\"\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetingParticipants/admit", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingParticipants", "admit" ] } }, "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": [] } ], "description": "Exercise the /meetingParticipants endpoint" }, { "name": "Meeting Transcripts", "item": [ { "name": "List Meeting Transcripts", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "pm.test(\"Response is valid and has an id\", function () {", " var _transcriptId = json.items[0].id;", " pm.collectionVariables.set(\"_transcriptId\", _transcriptId);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingTranscripts?meetingId={{SAMPLE_MEETING_ID}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingTranscripts" ], "query": [ { "key": "meetingId", "value": "{{SAMPLE_MEETING_ID}}" } ] } }, "response": [] }, { "name": "Download a meeting transcript", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingTranscripts/{{_transcriptId}}/download", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingTranscripts", "{{_transcriptId}}", "download" ] } }, "response": [] }, { "name": "List Snippets of a Meeting Transcript", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "pm.test(\"Response is valid and has an id\", function () {", " var _snippetId = json.items[0].id;", " pm.collectionVariables.set(\"_snippetId\", _snippetId);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingTranscripts/{{_transcriptId}}/snippets", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingTranscripts", "{{_transcriptId}}", "snippets" ] } }, "response": [] }, { "name": "Get a Transcript Snippet", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingTranscripts/{{_transcriptId}}/snippets/{{_snippetId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingTranscripts", "{{_transcriptId}}", "snippets", "{{_snippetId}}" ] } }, "response": [] }, { "name": "Update a Transcript Snippet", "request": { "method": "PUT", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetingTranscripts/{{_transcriptId}}/snippets/{{_snippetId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetingTranscripts", "{{_transcriptId}}", "snippets", "{{_snippetId}}" ] } }, "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": [] } ], "description": "Exercise the /meetingTranscripts endpoint" }, { "name": "Meeting Control", "item": [ { "name": "SetUp", "item": [ { "name": "Create a Meeting for Meeting Control", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_controlMeetingId\", theMeeting.id);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Meeting Control Title\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "Get Meeting Control Status", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/controls?meetingId={{_controlMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "controls" ], "query": [ { "key": "meetingId", "value": "{{_controlMeetingId}}" } ] } }, "response": [] }, { "name": "Update Meeting Control Status", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"recordingStarted\": true,\n \"recordingPaused\": true,\n \"locked\": false\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/controls?meetingId={{_controlMeetingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "controls" ], "query": [ { "key": "meetingId", "value": "{{_controlMeetingId}}" } ] } }, "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": [] } ], "description": "Exercise the /meetingTranscripts endpoint" }, { "name": "Meeting Registration", "item": [ { "name": "SetUp", "item": [ { "name": "Create a Meeting for Meeting Registration", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_registrationMeetingId\", theMeeting.id);", "});", "", "pm.test(\"Response has webLink\", function () {", " pm.expect(theMeeting.webLink).to.be.a(\"string\");", "});", "", "pm.test(\"Recurrance is single\", function () {", " pm.expect(theMeeting.meetingType).to.equal(\"meetingSeries\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Meeting Registration Title\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\",\n \"registration\": {\n \"autoAcceptRequest\": false,\n \"requireFirstName\": true,\n \"requireLastName\": true,\n \"requireEmail\": true,\n \"requireCompanyName\": true,\n \"requireWorkPhone\": true,\n \"maxRegisterNum\": 50\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "Get registration form for a meeting", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registration", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registration" ] } }, "response": [] }, { "name": "Update Meeting Registration Form", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"requireFirstName\": \"true\",\n \"requireLastName\": \"true\",\n \"requireEmail\": \"true\",\n \"requireCompanyName\": \"true\",\n \"requireCountryRegion\": \"true\",\n \"requireWorkPhone\": \"true\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registration", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registration" ] } }, "response": [] }, { "name": "Delete Meeting Registration Form", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registration", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registration" ] } }, "response": [] }, { "name": "Register a Meeting Registrant", "event": [ { "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", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"firstName\": \"bob\",\n \"lastName\": \"Lee\",\n \"email\": \"bob2@mailinator.com\",\n \"jobTitle\": \"manager\",\n \"companyName\": \"cisco\",\n \"address1\": \"address1 string\",\n \"address2\": \"address2 string\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"zipCode\": 123456,\n \"countryRegion\": \"United States\",\n \"workPhone\": \"+1 123456\",\n \"fax\": \"123456\",\n \"customizedQuestions\": [\n {\n \"questionId\": 1104483677,\n \"answers\": [\n {\n \"optionId\": 4,\n \"answer\": \"red\"\n }\n ]\n }\n ]\n}" }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants" ] } }, "response": [] }, { "name": "Batch register Meeting Registrants", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "[\n {\n \"firstName\": \"bob\",\n \"lastName\": \"Lee\",\n \"email\": \"bob21@mailinator.com\",\n \"jobTitle\": \"manager\",\n \"companyName\": \"cisco\",\n \"address1\": \"address1 string\",\n \"address2\": \"address2 string\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"zipCode\": 123456,\n \"countryRegion\": \"United States\",\n \"workPhone\": \"+1 123456\",\n \"fax\": \"123456\",\n \"customizedQuestions\": [\n {\n \"questionId\": 1104483677,\n \"answers\": [\n {\n \"optionId\": 4,\n \"answer\": \"red\"\n }\n ]\n }\n ]\n },\n {\n \"firstName\": \"bob\",\n \"lastName\": \"Lee\",\n \"email\": \"bob22@mailinator.com\",\n \"jobTitle\": \"manager\",\n \"companyName\": \"cisco\",\n \"address1\": \"address1 string\",\n \"address2\": \"address2 string\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"zipCode\": 123456,\n \"countryRegion\": \"United States\",\n \"workPhone\": \"+1 123456\",\n \"fax\": \"123456\",\n \"customizedQuestions\": [\n {\n \"questionId\": 1104483677,\n \"answers\": [\n {\n \"optionId\": 4,\n \"answer\": \"red\"\n }\n ]\n }\n ]\n }\n]", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants/bulkInsert", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants", "bulkInsert" ] } }, "response": [] }, { "name": "List Meeting Registrants", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(json.items[0].id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_registrantId\", json.id);", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants" ] } }, "response": [] }, { "name": "Get a meeting registrant's detail information", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants/{{_registrantId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants", "{{_registrantId}}" ] } }, "response": [] }, { "name": "Query Meeting Registrants", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"status\": \"pending\",\n \"orderType\": \"DESC\",\n \"orderBy\": \"registrationTime\",\n \"emails\": [\n \"bob2@mailinator.com\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants/query", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants", "query" ] } }, "response": [] }, { "name": "Batch Update Meeting Registrants status", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"registrants\": [\n {\n \"id\": \"d9a2541e-c050-491b-a038-7dbee7f50900\"\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants/approve", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants", "approve" ] } }, "response": [] }, { "name": "Delete a Meeting Registrant", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_registrationMeetingId}}/registrants/{{_registrantId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_registrationMeetingId}}", "registrants", "{{_registrantId}}" ] } }, "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": [] } ], "description": "Exercise Meeting Registration APIs" }, { "name": "Meeting Simultaneous interpretation", "item": [ { "name": "Setup", "item": [ { "name": "Create a Meeting for Simultaneous Interpretation", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_simultaneousMeetingId\", theMeeting.id);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"test-test Title\",\n \"agenda\": \"Sample Agenda\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\",\n \"enabledAutoRecordMeeting\": false,\n \"allowAnyUserToBeAlternateHost\": false,\n \"enabledJoinBeforeHost\": false\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "Update Meeting Simultaneous interpretation", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"enabled\": true\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_simultaneousMeetingId}}/simultaneousInterpretation", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_simultaneousMeetingId}}", "simultaneousInterpretation" ] } }, "response": [] }, { "name": "Create a Meeting Interpreter", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(json.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_interpreterId\", json.id);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"languageCode1\": \"en\",\n \"languageCode2\": \"de\",\n \"email\": \"test@example.com\",\n \"displayName\": \"Hoffmann\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_simultaneousMeetingId}}/interpreters", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_simultaneousMeetingId}}", "interpreters" ] } }, "response": [] }, { "name": "Get a Meeting Interpreter", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(json.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_interpreterId\", json.id);", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_simultaneousMeetingId}}/interpreters/{{_interpreterId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_simultaneousMeetingId}}", "interpreters", "{{_interpreterId}}" ] } }, "response": [] }, { "name": "List Meeting Interpreters", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_simultaneousMeetingId}}/interpreters", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_simultaneousMeetingId}}", "interpreters" ] } }, "response": [] }, { "name": "Update a Meeting Interpreter", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"languageCode1\": \"en\",\n \"languageCode2\": \"de\",\n \"email\": \"test@example.com\",\n \"displayName\": \"test\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_simultaneousMeetingId}}/interpreters/{{_interpreterId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_simultaneousMeetingId}}", "interpreters", "{{_interpreterId}}" ] } }, "response": [] }, { "name": "Delete a Meeting Interpreter", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_simultaneousMeetingId}}/interpreters/{{_interpreterId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_simultaneousMeetingId}}", "interpreters", "{{_interpreterId}}" ] } }, "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": [] } ], "description": "Exercise Meeting Simultaneous interpretation APIs" }, { "name": "Meeting Breakout Sessions", "item": [ { "name": "SetUp", "item": [ { "name": "Create a Meeting for Breakout Session", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_boMeetingId\", theMeeting.id);", "});", "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Meeting Breakout Session Title\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "Update Meeting Breakout Sessions", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"sendEmail\": true,\n \"items\": [\n {\n \"name\": \"Breakout Session 1\",\n \"invitees\": [\n \"rachel.green@example.com\",\n \"monica.geller@example.com\"\n ]\n },\n {\n \"name\": \"Breakout Session N\",\n \"invitees\": [\n \"ross.geller@example.com\",\n \"chandler.bing@example.com\"\n ]\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_boMeetingId}}/breakoutSessions", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_boMeetingId}}", "breakoutSessions" ] } }, "response": [] }, { "name": "Get Meeting Breakout Sessions", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_boMeetingId}}/breakoutSessions", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_boMeetingId}}", "breakoutSessions" ] } }, "response": [] }, { "name": "Delete Meeting Breakout Sessions", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_boMeetingId}}/breakoutSessions", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_boMeetingId}}", "breakoutSessions" ] } }, "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": [] } ], "description": "Exercise Meeting Breakout Sessions APIs" }, { "name": "Meeting Survey", "item": [ { "name": "SetUp", "item": [ { "name": "Create a Webinar for Survey", "event": [ { "listen": "prerequest", "script": { "exec": [ "", "var moment = require('moment');", "// If the \"timezone\" field is set, then the start/end time must match", "// If you are comfortable scheduling everything in UTC times", "// simply omit the timezone field from the request body", "", "// We will use the UTCOFFSET and TIMEZONE_STRING environment variables", "// The API will return an error if these don't match", "var utcoffset = pm.variables.get(\"UTCOFFSET\");", "// Start tommorow at noon", "let start_time = moment().startOf(\"day\");", "start_time = start_time.add(1, \"day\");", "start_time = start_time.add(12, \"hours\");", "// Format to our timezone, note that milliseconds are not required", "let _start_time = start_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_start_time\", _start_time);", "//pm.collectionVariables.set(\"_start_time\", start_time);", "", "// End at 12:30", "let end_time = start_time;", "end_time = end_time.add(30, 'minutes');", "let _end_time = end_time.utcOffset(utcoffset).format('YYYY-MM-DDTHH:mm:ssZ');", "pm.collectionVariables.set(\"_end_time\", _end_time);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var theMeeting = pm.response.json();", "", "pm.test(\"Response is valid and has an id\", function () {", " pm.expect(theMeeting.id).to.be.a(\"string\");", " pm.collectionVariables.set(\"_surveyMeetingId\", theMeeting.id);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Meeting Survey Title\",\n \"password\": \"A@ssword123\",\n \"start\": \"{{_start_time}}\",\n \"end\": \"{{_end_time}}\",\n \"timezone\": \"{{TIMEZONE_STRING}}\",\n \"scheduledType\": \"webinar\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{MEETINGS_API_URL}}/meetings", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings" ] } }, "response": [] } ] }, { "name": "Get a Meeting Survey", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_surveyMeetingId}}/survey", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_surveyMeetingId}}", "survey" ] } }, "response": [] }, { "name": "List Meeting Survey Results", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/meetings/{{_surveyMeetingId}}/surveyResults", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "meetings", "{{_surveyMeetingId}}", "surveyResults" ] } }, "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": [] } ], "description": "Exercise Meeting Survey APIs" }, { "name": "Recording Report", "item": [ { "name": "List of Recording Audit Report Summaries", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "var json = pm.response.json();", "pm.test(\"Response is valid and has an id\", function () {", " var _recordingId = json.items[0].recordingId;", " pm.collectionVariables.set(\"_recordingId\", _recordingId);", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/recordingReport/accessSummary?max=100&from=2022-07-01&to=2022-08-01&hostEmail=test@example.webex.com", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "recordingReport", "accessSummary" ], "query": [ { "key": "max", "value": "100" }, { "key": "from", "value": "2022-07-01" }, { "key": "to", "value": "2022-08-01" }, { "key": "hostEmail", "value": "test@example.webex.com" } ] } }, "response": [] }, { "name": "Get Recording Audit Report Details", "request": { "method": "GET", "header": [], "url": { "raw": "{{MEETINGS_API_URL}}/recordingReport/accessDetail?recordingId={{_recordingId}}", "host": [ "{{MEETINGS_API_URL}}" ], "path": [ "recordingReport", "accessDetail" ], "query": [ { "key": "recordingId", "value": "{{_recordingId}}" } ] } }, "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": [] } ] } ], "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": "OAuth token for a user configured for meetings in the test environment", "type": "string" }, { "key": "OTHER_USERS_EMAIL", "value": "an email of another Webex registerd user to invite to a meeting", "type": "string" }, { "key": "MEETINGS_API_URL", "value": "https://webexapis.com/v1/", "type": "string" }, { "key": "UTCOFFSET", "value": "-04:00", "type": "string" }, { "key": "TIMEZONE_STRING", "value": "America/New_York", "type": "string" }, { "key": "MAX_RESULTS", "value": "2", "type": "string" }, { "key": "SAMPLE_MEETING_ID", "value": "A unique identifier for the meeting instance which you can use in the scripts" } ] }