├── .gitignore
├── docs
├── img
│ ├── generate-button.png
│ ├── collection-import.png
│ ├── environment-create.png
│ ├── generate-languages.png
│ ├── environment-configure.png
│ ├── admin-scripted-collection.png
│ ├── cards-scripted-collection.png
│ ├── direct-space-collection.png
│ ├── environment-create-icon.png
│ ├── generate-nodejs-request.png
│ ├── collection-import-from-link.png
│ ├── admin-scripted-collection-people.png
│ ├── scripted-collection-memberships.png
│ ├── scripted-collection-all-resources.png
│ └── generate-nodejs-request-no-postman-header.png
├── GenerateCode.md
└── ImportAndConfigure.md
├── CONTRIBUTING.md
├── env
├── webex.json
└── emulator.json
├── CHANGELOG.md
├── LICENSE
├── README.md
└── admin-scripted.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # postman environments for newman
2 | .env/
3 |
--------------------------------------------------------------------------------
/docs/img/generate-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/generate-button.png
--------------------------------------------------------------------------------
/docs/img/collection-import.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/collection-import.png
--------------------------------------------------------------------------------
/docs/img/environment-create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/environment-create.png
--------------------------------------------------------------------------------
/docs/img/generate-languages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/generate-languages.png
--------------------------------------------------------------------------------
/docs/img/environment-configure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/environment-configure.png
--------------------------------------------------------------------------------
/docs/img/admin-scripted-collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/admin-scripted-collection.png
--------------------------------------------------------------------------------
/docs/img/cards-scripted-collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/cards-scripted-collection.png
--------------------------------------------------------------------------------
/docs/img/direct-space-collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/direct-space-collection.png
--------------------------------------------------------------------------------
/docs/img/environment-create-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/environment-create-icon.png
--------------------------------------------------------------------------------
/docs/img/generate-nodejs-request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/generate-nodejs-request.png
--------------------------------------------------------------------------------
/docs/img/collection-import-from-link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/collection-import-from-link.png
--------------------------------------------------------------------------------
/docs/img/admin-scripted-collection-people.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/admin-scripted-collection-people.png
--------------------------------------------------------------------------------
/docs/img/scripted-collection-memberships.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/scripted-collection-memberships.png
--------------------------------------------------------------------------------
/docs/img/scripted-collection-all-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/scripted-collection-all-resources.png
--------------------------------------------------------------------------------
/docs/img/generate-nodejs-request-no-postman-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WebexSamples/postman-webex/HEAD/docs/img/generate-nodejs-request-no-postman-header.png
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 | We welcome pull requests for enhancements of existing collections, as well as contributions of collections that proved to be handy for you.
3 |
4 | When submitting a new collection, please ensure it leverages an {{access_token}} variable to ease environments sharing among collections.
5 |
6 | We appreciate and recognize [all contributors](https://github.com/CiscoDevNet/postman-webex/graphs/contributors).
7 |
8 | Thanks everyone!
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/env/webex.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "591baacf-8a4e-44bb-9142-52354051bec7",
3 | "name": "Postman Environment for Webex Cloud",
4 | "values": [
5 | {
6 | "key": "webex_api",
7 | "value": "https://webexapi.com/v1",
8 | "enabled": true
9 | },
10 | {
11 | "key": "access_token",
12 | "value": "A USER TOKEN",
13 | "enabled": true
14 | },
15 | {
16 | "key": "bot_token",
17 | "value": "A BOT TOKEN",
18 | "enabled": true
19 | },
20 | {
21 | "key": "target_url",
22 | "value": "https://en712ain34omv.x.pipedream.net/",
23 | "enabled": true
24 | }
25 | ],
26 | "_postman_variable_scope": "environment",
27 | "_postman_exported_at": "2019-09-03T22:21:55.065Z",
28 | "_postman_exported_using": "Postman/7.6.0"
29 | }
--------------------------------------------------------------------------------
/env/emulator.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "591baacf-8a4e-44bb-9142-52354051bec7",
3 | "name": "Postman Environment for Webex API Emulator",
4 | "values": [
5 | {
6 | "key": "webex_api",
7 | "value": "http://localhost:3210",
8 | "enabled": true
9 | },
10 | {
11 | "key": "access_token",
12 | "value": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
13 | "enabled": true
14 | },
15 | {
16 | "key": "bot_token",
17 | "value": "ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210",
18 | "enabled": true
19 | },
20 | {
21 | "key": "target_url",
22 | "value": "https://en712ain34omv.x.pipedream.net/",
23 | "enabled": true
24 | }
25 | ],
26 | "_postman_variable_scope": "environment",
27 | "_postman_exported_at": "2019-09-03T22:21:55.065Z",
28 | "_postman_exported_using": "Postman/7.6.0"
29 | }
--------------------------------------------------------------------------------
/docs/GenerateCode.md:
--------------------------------------------------------------------------------
1 | # Code generation with Postman
2 |
3 | Postman lets you [generate code](https://www.getpostman.com/docs/code_snippets) in up to 15 languages.
4 |
5 | Simply select a REST request in your collection, and click on the **Code** link, right under the Save button.
6 |
7 | 
8 |
9 | As the code generation popup opens, pick your favorite language from the combo.
10 |
11 | 
12 |
13 | Check the code generated by postman.
14 |
15 | As an example:
16 | - import the "all-resources-scripted" collection,
17 | - expand the Rooms resource folder,
18 | - select the List Rooms request,
19 | - click the Code link
20 |
21 | Here is the code you'll get if you ask postman to generate a nodejs/request code snippet:
22 |
23 | 
24 |
25 | Note that if you look at it carefully, you'll notice the extra header "postman-token".
26 | This header you need to remove manually as you'll copy paste into your application code.
27 |
28 |
29 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changes
2 |
3 | **2020-08-26**
4 | - updated domain to https://webaxapi.com
5 | - turned static api domain to a collection variable: {{WEBEXAPI}}
6 | - updated collection names, prefer Messaging over Teams
7 | - updated Webex Admin collection with new Device Configuration API and xAPI
8 |
9 | **2020-01-27**
10 | - new folder for 'Admin Audit Events'
11 | - removed EFT tags for /devices and /places
12 | - re-published on Postman API Network
13 |
14 | **2019-09-04**
15 | - updates to the Webex Admin API collection: removed /place/services, added (EFT) tags
16 |
17 | **2019-09-03**
18 | - updates to the Webex Teams API (user) collection: support for Cards & AttachmentActions, exported as v2.1 format, various scripts enhancements
19 | - updates to the Webex Admin API collection: support for Devices & Places, exported as v2.1 format, various scripts enhancements
20 | - NEW Webex Cards collection: experiment with Cards with a bot posting cards, and a user submitting data, several card examples
21 | - removed the 'direct-space' collection (not enough value compared to the maintenance cost)
22 |
23 | **2018-05-30**
24 | - updated to {{spark_token} to {{access_token}
25 | - republished JSON for updated collections
26 |
27 | **2018-05-22**
28 | - reflect Webex Teams rebrand in documentation (removed Spark mentions)
29 | - no updates to the postman collections
30 | - renamed use case `direct-room` to `direct-space`, fixes broken link
31 |
--------------------------------------------------------------------------------
/docs/ImportAndConfigure.md:
--------------------------------------------------------------------------------
1 | # Import and configure a collection
2 |
3 | ## Not a Postman user yet ?
4 |
5 | The tool comes with a free basic plan.
6 |
7 | [Download](https://www.getpostman.com/) as a Chrome or Desktop application.
8 |
9 |
10 | ## How to import a collection into postman
11 |
12 | Click on the import button on the top left corner
13 |
14 | 
15 |
16 |
17 | Select "Import from link" and specify the URL of the collection to import.
18 | For example, paste the [link to the all-resources-scripted collection](https://raw.githubusercontent.com/CiscoDevNet/postman-webex/master/all-resources-scripted.json).
19 |
20 | 
21 |
22 | To pick any collection listed in this repo:
23 | - go to the collection you want to import,
24 | - click raw
25 | - paste the link from your browser URL
26 |
27 |
28 | ## Configure your execution environement
29 |
30 | Postman lets you define [environment variables](https://www.getpostman.com/docs/environments) to easilly abstract your execution contexts.
31 |
32 | This is where we'll specify the token used to access the Webex Teams REST API.
33 |
34 | > Tip:
35 | > create [several environments to switch](https://www.getpostman.com/docs/test_multi_environments) from one Webex account to another.
36 | > As for instance, to jump back and forth from your personal account to one or several of your bot accounts.
37 |
38 | To create a new environment, click on the  icon in the upper right corner, and select "Manage environments".
39 |
40 | 
41 |
42 |
43 | In the "Manage environments" dialog, add the `{{access_token}}` variable, and paste your personal access token, or a Bot access token - **without the Bearer prefix**.
44 |
45 | Note that you can retrieve your personal access token from the [Webex for Developers Getting Started](https://developer.webex.com/getting-started.html#authentication) page.
46 |
47 | 
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | CISCO SAMPLE CODE LICENSE
2 | Version 1.1
3 | Copyright (c) 2018 Cisco and/or its affiliates
4 |
5 | These terms govern this Cisco Systems, Inc. ("Cisco"), example or demo
6 | source code and its associated documentation (together, the "Sample
7 | Code"). By downloading, copying, modifying, compiling, or redistributing
8 | the Sample Code, you accept and agree to be bound by the following terms
9 | and conditions (the "License"). If you are accepting the License on
10 | behalf of an entity, you represent that you have the authority to do so
11 | (either you or the entity, "you"). Sample Code is not supported by Cisco
12 | TAC and is not tested for quality or performance. This is your only
13 | license to the Sample Code and all rights not expressly granted are
14 | reserved.
15 |
16 | 1. LICENSE GRANT: Subject to the terms and conditions of this License,
17 | Cisco hereby grants to you a perpetual, worldwide, non-exclusive, non-
18 | transferable, non-sublicensable, royalty-free license to copy and
19 | modify the Sample Code in source code form, and compile and
20 | redistribute the Sample Code in binary/object code or other executable
21 | forms, in whole or in part, solely for use with Cisco products and
22 | services. For interpreted languages like Java and Python, the
23 | executable form of the software may include source code and
24 | compilation is not required.
25 |
26 | 2. CONDITIONS: You shall not use the Sample Code independent of, or to
27 | replicate or compete with, a Cisco product or service. Cisco products
28 | and services are licensed under their own separate terms and you shall
29 | not use the Sample Code in any way that violates or is inconsistent
30 | with those terms (for more information, please visit:
31 | www.cisco.com/go/terms).
32 |
33 | 3. OWNERSHIP: Cisco retains sole and exclusive ownership of the Sample
34 | Code, including all intellectual property rights therein, except with
35 | respect to any third-party material that may be used in or by the
36 | Sample Code. Any such third-party material is licensed under its own
37 | separate terms (such as an open source license) and all use must be in
38 | full accordance with the applicable license. This License does not
39 | grant you permission to use any trade names, trademarks, service
40 | marks, or product names of Cisco. If you provide any feedback to Cisco
41 | regarding the Sample Code, you agree that Cisco, its partners, and its
42 | customers shall be free to use and incorporate such feedback into the
43 | Sample Code, and Cisco products and services, for any purpose, and
44 | without restriction, payment, or additional consideration of any kind.
45 | If you initiate or participate in any litigation against Cisco, its
46 | partners, or its customers (including cross-claims and counter-claims)
47 | alleging that the Sample Code and/or its use infringe any patent,
48 | copyright, or other intellectual property right, then all rights
49 | granted to you under this License shall terminate immediately without
50 | notice.
51 |
52 | 4. LIMITATION OF LIABILITY: CISCO SHALL HAVE NO LIABILITY IN CONNECTION
53 | WITH OR RELATING TO THIS LICENSE OR USE OF THE SAMPLE CODE, FOR
54 | DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO DIRECT, INCIDENTAL,
55 | AND CONSEQUENTIAL DAMAGES, OR FOR ANY LOSS OF USE, DATA, INFORMATION,
56 | PROFITS, BUSINESS, OR GOODWILL, HOWEVER CAUSED, EVEN IF ADVISED OF THE
57 | POSSIBILITY OF SUCH DAMAGES.
58 |
59 | 5. DISCLAIMER OF WARRANTY: SAMPLE CODE IS INTENDED FOR EXAMPLE PURPOSES
60 | ONLY AND IS PROVIDED BY CISCO "AS IS" WITH ALL FAULTS AND WITHOUT
61 | WARRANTY OR SUPPORT OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY
62 | LAW, ALL EXPRESS AND IMPLIED CONDITIONS, REPRESENTATIONS, AND
63 | WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OR
64 | CONDITION OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-
65 | INFRINGEMENT, SATISFACTORY QUALITY, NON-INTERFERENCE, AND ACCURACY,
66 | ARE HEREBY EXCLUDED AND EXPRESSLY DISCLAIMED BY CISCO. CISCO DOES NOT
67 | WARRANT THAT THE SAMPLE CODE IS SUITABLE FOR PRODUCTION OR COMMERCIAL
68 | USE, WILL OPERATE PROPERLY, IS ACCURATE OR COMPLETE, OR IS WITHOUT
69 | ERROR OR DEFECT.
70 |
71 | 6. GENERAL: This License shall be governed by and interpreted in
72 | accordance with the laws of the State of California, excluding its
73 | conflict of laws provisions. You agree to comply with all applicable
74 | United States export laws, rules, and regulations. If any provision of
75 | this License is judged illegal, invalid, or otherwise unenforceable,
76 | that provision shall be severed and the rest of the License shall
77 | remain in full force and effect. No failure by Cisco to enforce any of
78 | its rights related to the Sample Code or to a breach of this License
79 | in a particular situation will act as a waiver of such rights. In the
80 | event of any inconsistencies with any other terms, this License shall
81 | take precedence.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Postman for Webex Messaging and Admin APIs
2 |
3 | This repo gathers Postman collections for **[Webex Messaging and Admin APIs](https://developer.webex.com/quick-reference.html)**.
4 | - [Webex Messaging API](#webex-messaging-api): Messages, Rooms, Teams, People, Webhooks, AttachmentActions... all Webex resources accessible from an access token, with no admin priviledges.
5 | - [Webex Admin API](#webex-admin-api): Organizations, People creation and updates, Roles, Licenses, Events, Devices, Places and xAPI. These admin related features are accessible only with an access token with admin priviledges.
6 | - [Webex Cards](#webex-cards): Messages (with Card attachments), AttachmentActions and Card examples.
7 |
8 | Looking for other postman collections, check:
9 | - [postman-xapi](https://github.com/CiscoDevNet/postman-xapi) if looking for collections for **Webex Devices Cloud API**.
10 | - [postman-webex-calling](https://github.com/webex/postman-webex-calling) if looking for collections for **Webex Calling API**.
11 | - [postman-webex-meeting](https://github.com/webex/postman-webex-meetings) if looking for collections for **Webex Meeting REST API**.
12 |
13 | If you're new to Postman, you're only a few steps away from getting the full benefits of the collections:
14 | 1. [import and configure](docs/ImportAndConfigure.md) a collection
15 | 2. [generate code](docs/GenerateCode.md) for your favorite language
16 | 3. [run collections as part of your CI/CD process](https://www.getpostman.com/docs/newman_intro) via the newman command
17 | 4. [publish documentation via documenter](https://www.getpostman.com/docs/creating_documentation).
18 |
19 | **We welcome pull requests for enhancements of existing collections, as well as contributions of collections that proved to be handy for you.
20 | When submitting a new collection, please ensure it leverages a {{access_token}} variable to ease environments sharing among collections. Thank you!**
21 |
22 |
23 | ## [Webex Messaging API](https://raw.githubusercontent.com/CiscoDevNet/postman-webex/master/all-resources-scripted.json)
24 |
25 | [](https://app.getpostman.com/run-collection/1f5e101d8290a5303c90)
26 |
27 | The collection regroups public resources for the Webex Messaging REST API, with direct links to the official API documentation.
28 | The collection a simple user account, no need admin priviledges are required.
29 |
30 | 
31 |
32 | Worth mentionning that the collection is scripted so that you can run REST calls in a row for any given resource:
33 | - as you run REST queries from top to bottom, newly created resource identifiers are automatically retreived and injected into your postman environment as temporary variables,
34 | - so that the next REST query will look from the postman environment, and execute in the context of the previous query. For example, you'll add a message into the space you just created in the previous step.
35 | - at the end of each scenario (embedded in individual collection folders), we've added requests to free newly created resources so that you'll end up in the same state as before running the queries in postman.
36 |
37 | Enough talk, let's practice:
38 | - [import the all-resources-scripted collection](docs/ImportAndConfigure.md),
39 | - create or select a postman environment that contains a {{access_token}} variable,
40 | - now, you're ready to invoke the API: for example, go to the Messages folder, and run the requests from top to bottom.
41 |
42 | 
43 |
44 | Now, what about generating some code for your favorite language ?
45 |
46 | Take the [Generate Code Guide](docs/GenerateCode.md) and have this Node.js code snippet automatically generated for the API Resource "List spaces":
47 |
48 | 
49 |
50 | Note that the collection is also rendered in HTML for [quick browsing via Postman Documenter](https://documenter.getpostman.com/view/30210/71CYsEp).
51 |
52 |
53 | ## [Webex Cards](https://raw.githubusercontent.com/CiscoDevNet/postman-webex/master/cards-scripted.json)
54 |
55 | [](https://app.getpostman.com/run-collection/0b1f13e0bb8cabd8b84c)
56 |
57 | This collection lets you experiment [Webex Cards and Buttons](https://developer.webex.com/docs/api/guides/cards).
58 |
59 | You'll need to create an environment with the following variables:
60 | - `access_token`: a Webex API access token
61 | - `bot_token`: the token of a Webex Bot account
62 |
63 | 
64 |
65 | Note that the collection is also rendered in HTML for [quick browsing via Postman Documenter](https://documenter.getpostman.com/view/30210/SVfTPTQ4).
66 |
67 |
68 | ## [Webex Admin API](https://raw.githubusercontent.com/CiscoDevNet/postman-webex/master/admin-scripted.json)
69 |
70 | [](https://app.getpostman.com/run-collection/0aa22af74405f82086d4)
71 |
72 | The collection illustrates the REST API **Administration Resources**, with direct link to the [Admin API documentation](https://developer.webex.com/docs/api/guides/admin-api).
73 |
74 | Note that the collection is also rendered in HTML for [quick browsing via Postman Documenter](https://documenter.getpostman.com/view/30210/2PMC7h).
75 |
76 | 
77 |
78 | The People folder is populated with pre-request and post-request scripts in order to ease the creation of random accounts.
79 |
80 | 
81 |
82 |
--------------------------------------------------------------------------------
/admin-scripted.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "_postman_id": "beba6b1c-a834-f8a3-951c-29678666d198",
4 | "name": "Webex Admin API",
5 | "description": "Cisco Webex includes administration APIs that allow administrators to perform actions such as provisioning a user and managing devices. \n\nBy automating administration, user management and provisioning can be centralized in an existing tool, rather than using the Webex Control Hub. For example, a partner selling multiple Collaboration tools to customers can use these APIs to enable Webex Teams provisioning through a centralized portal.\n\n## What's possible with Admin APIs?\n\nCurrently, administration is focused on User Provisioning. Using these APIs, an admin can:\n\n- Create a user\n- Update a user\n- View license usage of an organization\n- View available roles of an organization\n- Manage Hybrid Services licenses and users\n\nMore information available at:\nhttps://developer.webex.com/docs/api/guides/admin-api\n",
6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
7 | },
8 | "item": [
9 | {
10 | "name": "AdminAudit Events",
11 | "item": [
12 | {
13 | "name": "List Organizations",
14 | "event": [
15 | {
16 | "listen": "test",
17 | "script": {
18 | "id": "03ef7ae1-9057-42ce-8ff2-e807b1acf159",
19 | "exec": [
20 | "if (responseCode.code != 200) {",
21 | " tests[\"List organizations : failed\"] = false;",
22 | "}",
23 | "else {",
24 | " tests[\"List organizations: success\"] = true;",
25 | " ",
26 | " var jsonData = JSON.parse(responseBody);",
27 | " if (jsonData.items === undefined) {",
28 | " tests[\"List organizations: cannot retreive result\"] = false",
29 | " }",
30 | " else {",
31 | " var orgId = jsonData.items[0].id;",
32 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
33 | " tests[\"List organizations: retreived one with id:\" + orgId] = true",
34 | " }",
35 | "}"
36 | ],
37 | "type": "text/javascript"
38 | }
39 | }
40 | ],
41 | "request": {
42 | "method": "GET",
43 | "header": [
44 | {
45 | "key": "Authorization",
46 | "value": "Bearer {{access_token}}"
47 | }
48 | ],
49 | "url": {
50 | "raw": "{{WEBEXAPI}}/organizations",
51 | "host": [
52 | "{{WEBEXAPI}}"
53 | ],
54 | "path": [
55 | "organizations"
56 | ]
57 | },
58 | "description": "List all organizations visible by your account.\n\nhttps://developer.webex.com/endpoint-organizations-get.html\n\nExample Response:\n``` json\n{\n 'items' : [ {\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'displayName' : 'Acme, Inc.',\n 'created' : '2015-10-18T14:26:16+00:00'\n } ]\n}\n```"
59 | },
60 | "response": []
61 | },
62 | {
63 | "name": "List Admin Audit Events",
64 | "event": [
65 | {
66 | "listen": "test",
67 | "script": {
68 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
69 | "exec": [
70 | "if (responseCode.code != 200) {",
71 | " tests[\"List devices : failed\"] = false;",
72 | "}",
73 | "else {",
74 | " tests[\"List devices: success\"] = true;",
75 | " ",
76 | " var jsonData = JSON.parse(responseBody);",
77 | " if (jsonData.items === undefined) {",
78 | " tests[\"List devices: cannot retreive result\"] = false",
79 | " }",
80 | " else {",
81 | " var deviceId = jsonData.items[0].id;",
82 | " postman.setEnvironmentVariable(\"_device\", deviceId);",
83 | " tests[\"List devices: retreived one device with id:\" + deviceId] = true",
84 | " }",
85 | "}",
86 | ""
87 | ],
88 | "type": "text/javascript"
89 | }
90 | },
91 | {
92 | "listen": "prerequest",
93 | "script": {
94 | "id": "67190aaf-64ee-4f4e-a637-35497c28ed40",
95 | "exec": [
96 | "var now = new Date(Date.now());",
97 | "postman.setEnvironmentVariable(\"_now\", now.toISOString());",
98 | "",
99 | "var yesterday = now;",
100 | "yesterday.setHours(now.getHours()-24);",
101 | "postman.setEnvironmentVariable(\"_yesterday\", yesterday.toISOString());"
102 | ],
103 | "type": "text/javascript"
104 | }
105 | }
106 | ],
107 | "request": {
108 | "method": "GET",
109 | "header": [
110 | {
111 | "key": "Authorization",
112 | "value": "Bearer {{access_token}}"
113 | }
114 | ],
115 | "url": {
116 | "raw": "{{WEBEXAPI}}/adminAudit/events?orgId={{_organization}}&from={{_yesterday}}&to={{_now}}",
117 | "host": [
118 | "{{WEBEXAPI}}"
119 | ],
120 | "path": [
121 | "adminAudit",
122 | "events"
123 | ],
124 | "query": [
125 | {
126 | "key": "orgId",
127 | "value": "{{_organization}}"
128 | },
129 | {
130 | "key": "from",
131 | "value": "{{_yesterday}}"
132 | },
133 | {
134 | "key": "to",
135 | "value": "{{_now}}"
136 | }
137 | ]
138 | },
139 | "description": "List admin audit events in your organization. Several query parameters are available to filter the response.\r\n\r\nLong result sets will be split into pages.\r\n\r\nhttps://developer.webex.com/docs/api/v1/admin-audit-events/list-admin-audit-events"
140 | },
141 | "response": []
142 | },
143 | {
144 | "name": "List Admin Audit Events (max)",
145 | "event": [
146 | {
147 | "listen": "test",
148 | "script": {
149 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
150 | "exec": [
151 | "if (responseCode.code != 200) {",
152 | " tests[\"List devices : failed\"] = false;",
153 | "}",
154 | "else {",
155 | " tests[\"List devices: success\"] = true;",
156 | " ",
157 | " var jsonData = JSON.parse(responseBody);",
158 | " if (jsonData.items === undefined) {",
159 | " tests[\"List devices: cannot retreive result\"] = false",
160 | " }",
161 | " else {",
162 | " var deviceId = jsonData.items[0].id;",
163 | " postman.setEnvironmentVariable(\"_device\", deviceId);",
164 | " tests[\"List devices: retreived one device with id:\" + deviceId] = true",
165 | " }",
166 | "}",
167 | ""
168 | ],
169 | "type": "text/javascript"
170 | }
171 | },
172 | {
173 | "listen": "prerequest",
174 | "script": {
175 | "id": "67190aaf-64ee-4f4e-a637-35497c28ed40",
176 | "exec": [
177 | "var now = new Date(Date.now());",
178 | "postman.setEnvironmentVariable(\"_now\", now.toISOString());",
179 | "",
180 | "var yesterday = now;",
181 | "yesterday.setHours(now.getHours()-24);",
182 | "postman.setEnvironmentVariable(\"_yesterday\", yesterday.toISOString());"
183 | ],
184 | "type": "text/javascript"
185 | }
186 | }
187 | ],
188 | "request": {
189 | "method": "GET",
190 | "header": [
191 | {
192 | "key": "Authorization",
193 | "value": "Bearer {{access_token}}"
194 | }
195 | ],
196 | "url": {
197 | "raw": "{{WEBEXAPI}}/adminAudit/events?orgId={{_organization}}&from={{_yesterday}}&to={{_now}}&max=5",
198 | "host": [
199 | "{{WEBEXAPI}}"
200 | ],
201 | "path": [
202 | "adminAudit",
203 | "events"
204 | ],
205 | "query": [
206 | {
207 | "key": "orgId",
208 | "value": "{{_organization}}"
209 | },
210 | {
211 | "key": "from",
212 | "value": "{{_yesterday}}"
213 | },
214 | {
215 | "key": "to",
216 | "value": "{{_now}}"
217 | },
218 | {
219 | "key": "max",
220 | "value": "5"
221 | }
222 | ]
223 | },
224 | "description": "List admin audit events in your organization. Several query parameters are available to filter the response.\r\n\r\nLong result sets will be split into pages.\r\n\r\nhttps://developer.webex.com/docs/api/v1/admin-audit-events/list-admin-audit-events"
225 | },
226 | "response": []
227 | }
228 | ],
229 | "description": "Admin Audit Events are available to full administrators for certain events performed in Webex Control Hub.\r\n\r\nAdministrators with accounts created before 2019 will need to log into Webex Control Hub before using this API.\r\n\r\nhttps://developer.webex.com/docs/api/v1/admin-audit-events\r\n",
230 | "event": [
231 | {
232 | "listen": "prerequest",
233 | "script": {
234 | "id": "9a9d749e-1bc2-419c-9048-9879fda6a8fd",
235 | "type": "text/javascript",
236 | "exec": [
237 | ""
238 | ]
239 | }
240 | },
241 | {
242 | "listen": "test",
243 | "script": {
244 | "id": "af2980bf-9922-47ed-a092-e594300f5dd4",
245 | "type": "text/javascript",
246 | "exec": [
247 | ""
248 | ]
249 | }
250 | }
251 | ],
252 | "protocolProfileBehavior": {}
253 | },
254 | {
255 | "name": "DeviceConfigurations",
256 | "item": [
257 | {
258 | "name": "List Devices",
259 | "event": [
260 | {
261 | "listen": "test",
262 | "script": {
263 | "id": "176d227b-7a46-4752-b30a-aea11a55e078",
264 | "exec": [
265 | "",
266 | "if (responseCode.code != 200) {",
267 | " tests[\"List devices : failed\"] = false;",
268 | "}",
269 | "else {",
270 | " tests[\"List devices: success\"] = true;",
271 | " ",
272 | " var jsonData = JSON.parse(responseBody);",
273 | " if (jsonData.items === undefined) {",
274 | " tests[\"List devices: cannot retreive result\"] = false",
275 | " }",
276 | " else {",
277 | " var deviceId = jsonData.items[0].id;",
278 | " postman.setEnvironmentVariable(\"_device\", deviceId);",
279 | " tests[\"List devices: retreived one device with id:\" + deviceId] = true",
280 | "",
281 | " visualize(jsonData.items);",
282 | " }",
283 | "}",
284 | "",
285 | "function visualize(devices) {",
286 | " ",
287 | " // Configure the template",
288 | " var template = `",
289 | " ",
290 | "",
291 | " ",
292 | "",
293 | " `;",
346 | "",
347 | " // Set the visualizer template",
348 | " pm.visualizer.set(template, { ",
349 | " labels: [ ",
350 | " \"count\", ",
351 | " \"connected\", ",
352 | " \"connected_with_issues\", ",
353 | " \"disconnected\"],",
354 | " data: [ ",
355 | " devices.length, ",
356 | " devices.filter((device) => { return (device.connectionStatus === \"connected\") }).length,",
357 | " devices.filter((device) => { return (device.connectionStatus === \"connected_with_issues\") }).length,",
358 | " devices.filter((device) => { return (device.connectionStatus === \"disconnected\") }).length]",
359 | " });",
360 | "}",
361 | "",
362 | "",
363 | ""
364 | ],
365 | "type": "text/javascript"
366 | }
367 | }
368 | ],
369 | "request": {
370 | "method": "GET",
371 | "header": [
372 | {
373 | "key": "Authorization",
374 | "value": "Bearer {{access_token}}"
375 | }
376 | ],
377 | "url": {
378 | "raw": "{{WEBEXAPI}}/devices",
379 | "host": [
380 | "{{WEBEXAPI}}"
381 | ],
382 | "path": [
383 | "devices"
384 | ]
385 | },
386 | "description": "Lists all active Webex devices associated with the authenticated user, such as devices activated in personal mode, or devices to which the user is actively paired or using. Administrators can list all devices within an organization.\n\nhttps://developer.webex.com/docs/api/v1/devices/list-devices"
387 | },
388 | "response": []
389 | },
390 | {
391 | "name": "Get Device Details",
392 | "event": [
393 | {
394 | "listen": "test",
395 | "script": {
396 | "id": "f4c489f2-1daa-4550-9e86-658da0352dce",
397 | "exec": [
398 | "if (responseCode.code != 200) {",
399 | " tests[\"Get device details: failed\"] = false;",
400 | "}",
401 | "else {",
402 | " tests[\"Get device details: success\"] = true;",
403 | "}",
404 | "",
405 | "",
406 | " "
407 | ],
408 | "type": "text/javascript"
409 | }
410 | }
411 | ],
412 | "request": {
413 | "method": "GET",
414 | "header": [
415 | {
416 | "key": "Authorization",
417 | "value": "Bearer {{access_token}}"
418 | }
419 | ],
420 | "url": {
421 | "raw": "{{WEBEXAPI}}/devices/{{_device}}",
422 | "host": [
423 | "{{WEBEXAPI}}"
424 | ],
425 | "path": [
426 | "devices",
427 | "{{_device}}"
428 | ]
429 | },
430 | "description": "Shows details for a device, by ID.\r\nSpecify the device ID in the deviceId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/devices/get-device-details"
431 | },
432 | "response": []
433 | },
434 | {
435 | "name": "Get Device Configurations Details",
436 | "event": [
437 | {
438 | "listen": "test",
439 | "script": {
440 | "id": "a4801557-52db-40da-b000-e12f4b1af230",
441 | "exec": [
442 | "if (responseCode.code != 200) {",
443 | " tests[\"Get Devices Configurations Details: failed\"] = false;",
444 | "}",
445 | "else {",
446 | " tests[\"Get Devices Configurations Details: success\"] = true;",
447 | "}",
448 | "",
449 | "",
450 | " "
451 | ],
452 | "type": "text/javascript"
453 | }
454 | }
455 | ],
456 | "request": {
457 | "method": "GET",
458 | "header": [
459 | {
460 | "key": "Authorization",
461 | "value": "Bearer {{access_token}}"
462 | }
463 | ],
464 | "url": {
465 | "raw": "{{WEBEXAPI}}/deviceConfigurations?deviceId={{_device}}",
466 | "host": [
467 | "{{WEBEXAPI}}"
468 | ],
469 | "path": [
470 | "deviceConfigurations"
471 | ],
472 | "query": [
473 | {
474 | "key": "deviceId",
475 | "value": "{{_device}}"
476 | }
477 | ]
478 | },
479 | "description": "Lists all device configurations associated with the given device ID. Administrators can list configurations for all devices within an organization.\r\n\r\nhttps://developer.webex.com/docs/api/v1/device-configurations/list-device-configurations-for-device"
480 | },
481 | "response": []
482 | },
483 | {
484 | "name": "Get Device Configurations Details (with key)",
485 | "event": [
486 | {
487 | "listen": "test",
488 | "script": {
489 | "id": "bdeaaa14-116b-48b2-86a0-a531224183bb",
490 | "exec": [
491 | "if (responseCode.code != 200) {",
492 | " tests[\"Get Devices Configurations Details: failed\"] = false;",
493 | "}",
494 | "else {",
495 | " tests[\"Get Devices Configurations Details: success\"] = true;",
496 | "}",
497 | "",
498 | "",
499 | " "
500 | ],
501 | "type": "text/javascript"
502 | }
503 | }
504 | ],
505 | "request": {
506 | "method": "GET",
507 | "header": [
508 | {
509 | "key": "Authorization",
510 | "value": "Bearer {{access_token}}"
511 | }
512 | ],
513 | "url": {
514 | "raw": "{{WEBEXAPI}}/deviceConfigurations?deviceId={{_device}}&key=Audio.Ultrasound.*",
515 | "host": [
516 | "{{WEBEXAPI}}"
517 | ],
518 | "path": [
519 | "deviceConfigurations"
520 | ],
521 | "query": [
522 | {
523 | "key": "deviceId",
524 | "value": "{{_device}}"
525 | },
526 | {
527 | "key": "key",
528 | "value": "Audio.Ultrasound.*"
529 | }
530 | ]
531 | },
532 | "description": "Lists all device configurations associated with the given device ID. Administrators can list configurations for all devices within an organization.\r\n\r\nhttps://developer.webex.com/docs/api/v1/device-configurations/list-device-configurations-for-device"
533 | },
534 | "response": []
535 | },
536 | {
537 | "name": "Update Device Configurations",
538 | "event": [
539 | {
540 | "listen": "test",
541 | "script": {
542 | "id": "333a7503-0e3b-4a17-a30c-fe5dff927221",
543 | "exec": [
544 | "if (responseCode.code != 200) {",
545 | " tests[\"Update Device Configurations: failed\"] = false;",
546 | "}",
547 | "else {",
548 | " tests[\"Update Device Configurations: success\"] = true;",
549 | "}",
550 | "",
551 | "",
552 | " "
553 | ],
554 | "type": "text/javascript"
555 | }
556 | }
557 | ],
558 | "request": {
559 | "method": "PATCH",
560 | "header": [
561 | {
562 | "key": "Authorization",
563 | "value": "Bearer {{access_token}}"
564 | },
565 | {
566 | "key": "Content-Type",
567 | "value": "application/json-patch+json",
568 | "type": "text"
569 | }
570 | ],
571 | "body": {
572 | "mode": "raw",
573 | "raw": "[\r\n {\r\n \"op\" : \"replace\",\r\n \"path\" : \"Audio.Ultrasound.MaxVolume/sources/configured/value\",\r\n \"value\" : 70\r\n }\r\n]",
574 | "options": {
575 | "raw": {
576 | "language": "json"
577 | }
578 | }
579 | },
580 | "url": {
581 | "raw": "{{WEBEXAPI}}/deviceConfigurations?deviceId={{_device}}",
582 | "host": [
583 | "{{WEBEXAPI}}"
584 | ],
585 | "path": [
586 | "deviceConfigurations"
587 | ],
588 | "query": [
589 | {
590 | "key": "deviceId",
591 | "value": "{{_device}}"
592 | }
593 | ]
594 | },
595 | "description": "Update device configurations by device ID. Update requests use [JSON Patch](https://tools.ietf.org/html/rfc6902) syntax.\r\n\r\nhttps://developer.webex.com/docs/api/v1/device-configurations/update-device-configurations"
596 | },
597 | "response": []
598 | }
599 | ],
600 | "event": [
601 | {
602 | "listen": "prerequest",
603 | "script": {
604 | "id": "76e09291-8dc1-411c-afff-90759a76dbea",
605 | "type": "text/javascript",
606 | "exec": [
607 | ""
608 | ]
609 | }
610 | },
611 | {
612 | "listen": "test",
613 | "script": {
614 | "id": "a90ac3cc-801b-4f24-a32e-437a3379c5ed",
615 | "type": "text/javascript",
616 | "exec": [
617 | ""
618 | ]
619 | }
620 | }
621 | ],
622 | "protocolProfileBehavior": {}
623 | },
624 | {
625 | "name": "Devices",
626 | "item": [
627 | {
628 | "name": "List Devices",
629 | "event": [
630 | {
631 | "listen": "test",
632 | "script": {
633 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
634 | "exec": [
635 | "",
636 | "if (responseCode.code != 200) {",
637 | " tests[\"List devices : failed\"] = false;",
638 | "}",
639 | "else {",
640 | " tests[\"List devices: success\"] = true;",
641 | " ",
642 | " var jsonData = JSON.parse(responseBody);",
643 | " if (jsonData.items === undefined) {",
644 | " tests[\"List devices: cannot retreive result\"] = false",
645 | " }",
646 | " else {",
647 | " var deviceId = jsonData.items[0].id;",
648 | " postman.setEnvironmentVariable(\"_device\", deviceId);",
649 | " tests[\"List devices: retreived one device with id:\" + deviceId] = true",
650 | "",
651 | " visualize(jsonData.items);",
652 | " }",
653 | "}",
654 | "",
655 | "function visualize(devices) {",
656 | " ",
657 | " // Configure the template",
658 | " var template = `",
659 | " ",
660 | "",
661 | " ",
662 | "",
663 | " `;",
716 | "",
717 | " // Set the visualizer template",
718 | " pm.visualizer.set(template, { ",
719 | " labels: [ ",
720 | " \"count\", ",
721 | " \"connected\", ",
722 | " \"connected_with_issues\", ",
723 | " \"disconnected\"],",
724 | " data: [ ",
725 | " devices.length, ",
726 | " devices.filter((device) => { return (device.connectionStatus === \"connected\") }).length,",
727 | " devices.filter((device) => { return (device.connectionStatus === \"connected_with_issues\") }).length,",
728 | " devices.filter((device) => { return (device.connectionStatus === \"disconnected\") }).length]",
729 | " });",
730 | "}",
731 | "",
732 | "",
733 | ""
734 | ],
735 | "type": "text/javascript"
736 | }
737 | }
738 | ],
739 | "request": {
740 | "method": "GET",
741 | "header": [
742 | {
743 | "key": "Authorization",
744 | "value": "Bearer {{access_token}}"
745 | }
746 | ],
747 | "url": {
748 | "raw": "{{WEBEXAPI}}/devices",
749 | "host": [
750 | "{{WEBEXAPI}}"
751 | ],
752 | "path": [
753 | "devices"
754 | ]
755 | },
756 | "description": "Lists all active Webex devices associated with the authenticated user, such as devices activated in personal mode, or devices to which the user is actively paired or using. Administrators can list all devices within an organization.\n\nhttps://developer.webex.com/docs/api/v1/devices/list-devices"
757 | },
758 | "response": []
759 | },
760 | {
761 | "name": "Get Device Details",
762 | "event": [
763 | {
764 | "listen": "test",
765 | "script": {
766 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
767 | "exec": [
768 | "if (responseCode.code != 200) {",
769 | " tests[\"Get device details: failed\"] = false;",
770 | "}",
771 | "else {",
772 | " tests[\"Get device details: success\"] = true;",
773 | "}",
774 | "",
775 | "",
776 | " "
777 | ],
778 | "type": "text/javascript"
779 | }
780 | }
781 | ],
782 | "request": {
783 | "method": "GET",
784 | "header": [
785 | {
786 | "key": "Authorization",
787 | "value": "Bearer {{access_token}}"
788 | }
789 | ],
790 | "url": {
791 | "raw": "{{WEBEXAPI}}/devices/{{_device}}",
792 | "host": [
793 | "{{WEBEXAPI}}"
794 | ],
795 | "path": [
796 | "devices",
797 | "{{_device}}"
798 | ]
799 | },
800 | "description": "Shows details for a device, by ID.\r\nSpecify the device ID in the deviceId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/devices/get-device-details"
801 | },
802 | "response": []
803 | },
804 | {
805 | "name": "Delete a Device",
806 | "event": [
807 | {
808 | "listen": "test",
809 | "script": {
810 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
811 | "exec": [
812 | "if (responseCode.code != 204) {",
813 | " tests[\"Delete device: failed\"] = false;",
814 | "}",
815 | "else {",
816 | " tests[\"Delete device: success\"] = true;",
817 | "}"
818 | ],
819 | "type": "text/javascript"
820 | }
821 | }
822 | ],
823 | "request": {
824 | "method": "DELETE",
825 | "header": [
826 | {
827 | "key": "Authorization",
828 | "value": "Bearer {{access_token}}"
829 | }
830 | ],
831 | "url": {
832 | "raw": "{{WEBEXAPI}}/devices/{{_device}}",
833 | "host": [
834 | "{{WEBEXAPI}}"
835 | ],
836 | "path": [
837 | "devices",
838 | "{{_device}}"
839 | ]
840 | },
841 | "description": "Deletes a device, by ID.\r\nSpecify the device ID in the deviceId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/devices/delete-a-device"
842 | },
843 | "response": []
844 | }
845 | ],
846 | "description": "Devices represent cloud-registered Webex RoomOS devices, as well as actively-connected Webex soft clients on mobile or desktop. Devices may be associated with Places.\r\n\r\nSearching and viewing details for your devices requires an auth token with the spark:devices_read scope. Updating or deleting your devices requires an auth token with the spark:devices_write scope. Viewing the list of all devices in an organization requires an administrator auth token with the spark-admin:devices_read scope. Adding, updating, or deleting all devices in an organization requires an administrator auth token with the spark-admin:devices_write scope.\r\n\r\nhttps://developer.webex.com/docs/api/v1/devices",
847 | "event": [
848 | {
849 | "listen": "prerequest",
850 | "script": {
851 | "id": "88297cc6-7660-4dd4-b6c1-c24df125a102",
852 | "type": "text/javascript",
853 | "exec": [
854 | ""
855 | ]
856 | }
857 | },
858 | {
859 | "listen": "test",
860 | "script": {
861 | "id": "6f19bcb6-6a75-4f6c-a8fe-2cfc52a7a319",
862 | "type": "text/javascript",
863 | "exec": [
864 | ""
865 | ]
866 | }
867 | }
868 | ],
869 | "protocolProfileBehavior": {}
870 | },
871 | {
872 | "name": "Events",
873 | "item": [
874 | {
875 | "name": "List Events",
876 | "event": [
877 | {
878 | "listen": "test",
879 | "script": {
880 | "id": "395bcbd0-de24-4e34-9bdf-839f203a4a7f",
881 | "exec": [
882 | "if (responseCode.code != 200) {",
883 | " tests[\"List events: failed\"] = false;",
884 | "}",
885 | "else {",
886 | " tests[\"List events: success\"] = true;",
887 | "}"
888 | ],
889 | "type": "text/javascript"
890 | }
891 | }
892 | ],
893 | "request": {
894 | "method": "GET",
895 | "header": [
896 | {
897 | "key": "Authorization",
898 | "value": "Bearer {{access_token}}"
899 | }
900 | ],
901 | "url": {
902 | "raw": "{{WEBEXAPI}}/events?max=10",
903 | "host": [
904 | "{{WEBEXAPI}}"
905 | ],
906 | "path": [
907 | "events"
908 | ],
909 | "query": [
910 | {
911 | "key": "max",
912 | "value": "10"
913 | }
914 | ]
915 | },
916 | "description": "List events in your organization. Several query parameters are available to filter the response.\nLong result sets will be split into pages.\n\nhttps://developer.webex.com/endpoint-events-get.html"
917 | },
918 | "response": []
919 | },
920 | {
921 | "name": "List Events (new messages)",
922 | "event": [
923 | {
924 | "listen": "test",
925 | "script": {
926 | "id": "4057ff95-f27c-4174-b376-91faf6802cdf",
927 | "exec": [
928 | "if (responseCode.code != 200) {",
929 | " tests[\"List events (new messages): failed\"] = false;",
930 | "}",
931 | "else {",
932 | " tests[\"List events (new messages): success\"] = true;",
933 | "}"
934 | ],
935 | "type": "text/javascript"
936 | }
937 | }
938 | ],
939 | "request": {
940 | "method": "GET",
941 | "header": [
942 | {
943 | "key": "Authorization",
944 | "value": "Bearer {{access_token}}"
945 | }
946 | ],
947 | "url": {
948 | "raw": "{{WEBEXAPI}}/events?resource=messages&type=created",
949 | "host": [
950 | "{{WEBEXAPI}}"
951 | ],
952 | "path": [
953 | "events"
954 | ],
955 | "query": [
956 | {
957 | "key": "resource",
958 | "value": "messages"
959 | },
960 | {
961 | "key": "type",
962 | "value": "created"
963 | }
964 | ]
965 | },
966 | "description": "List events in your organization. Several query parameters are available to filter the response.\nLong result sets will be split into pages.\n\nhttps://developer.webex.com/endpoint-events-get.html"
967 | },
968 | "response": []
969 | },
970 | {
971 | "name": "List Events (last hour)",
972 | "event": [
973 | {
974 | "listen": "prerequest",
975 | "script": {
976 | "id": "11a52960-9773-49b6-bff6-00cde3614fa7",
977 | "exec": [
978 | "var now = new Date(Date.now());",
979 | "postman.setEnvironmentVariable(\"_now\", now.toISOString());",
980 | "",
981 | "var one_hour_ago = now;",
982 | "one_hour_ago.setHours(one_hour_ago.getHours()-1);",
983 | "postman.setEnvironmentVariable(\"_one_hour_ago\", one_hour_ago.toISOString());",
984 | "",
985 | "",
986 | "",
987 | "",
988 | "",
989 | ""
990 | ],
991 | "type": "text/javascript"
992 | }
993 | },
994 | {
995 | "listen": "test",
996 | "script": {
997 | "id": "a5e0ec03-aa99-469f-9f7a-ad9bec9b315a",
998 | "exec": [
999 | "if (responseCode.code != 200) {",
1000 | " tests[\"List events (last hour): failed\"] = false;",
1001 | "}",
1002 | "else {",
1003 | " tests[\"List events (last hour): success\"] = true;",
1004 | "}"
1005 | ],
1006 | "type": "text/javascript"
1007 | }
1008 | }
1009 | ],
1010 | "request": {
1011 | "method": "GET",
1012 | "header": [
1013 | {
1014 | "key": "Authorization",
1015 | "value": "Bearer {{access_token}}"
1016 | }
1017 | ],
1018 | "url": {
1019 | "raw": "{{WEBEXAPI}}/events?from={{_one_hour_ago}}&to={{_now}}",
1020 | "host": [
1021 | "{{WEBEXAPI}}"
1022 | ],
1023 | "path": [
1024 | "events"
1025 | ],
1026 | "query": [
1027 | {
1028 | "key": "from",
1029 | "value": "{{_one_hour_ago}}"
1030 | },
1031 | {
1032 | "key": "to",
1033 | "value": "{{_now}}"
1034 | }
1035 | ]
1036 | },
1037 | "description": "List events in your organization. Several query parameters are available to filter the response.\nLong result sets will be split into pages.\n\nhttps://developer.webex.com/endpoint-events-get.html"
1038 | },
1039 | "response": []
1040 | },
1041 | {
1042 | "name": "List Events (new messages last hour)",
1043 | "event": [
1044 | {
1045 | "listen": "prerequest",
1046 | "script": {
1047 | "id": "2eb89e7a-3b92-4e43-aa38-e67b12bdd2f0",
1048 | "exec": [
1049 | "var now = new Date(Date.now());",
1050 | "postman.setEnvironmentVariable(\"_now\", now.toISOString());",
1051 | "",
1052 | "var one_hour_ago = now;",
1053 | "one_hour_ago.setHours(one_hour_ago.getHours()-1);",
1054 | "postman.setEnvironmentVariable(\"_one_hour_ago\", one_hour_ago.toISOString());",
1055 | "",
1056 | "",
1057 | "",
1058 | "",
1059 | "",
1060 | ""
1061 | ],
1062 | "type": "text/javascript"
1063 | }
1064 | },
1065 | {
1066 | "listen": "test",
1067 | "script": {
1068 | "id": "0a7cf68f-fb8f-4352-a25d-df21fe9e2f04",
1069 | "exec": [
1070 | "if (responseCode.code != 200) {",
1071 | " tests[\"List events (new messages last hour): failed\"] = false;",
1072 | "}",
1073 | "else {",
1074 | " tests[\"List events (new messages last hour): success\"] = true;",
1075 | "",
1076 | " var jsonData = JSON.parse(responseBody);",
1077 | " if (jsonData.items.length === 0) {",
1078 | " tests[\"List events (new messages last hour): no new messages\"] = true",
1079 | " }",
1080 | " else {",
1081 | " var pickedEvent = jsonData.items[0];",
1082 | " postman.setEnvironmentVariable(\"_event\", pickedEvent.id);",
1083 | " tests[\"List events (new messages last hour): stored event:\" + pickedEvent.id] = true",
1084 | " }",
1085 | "}"
1086 | ],
1087 | "type": "text/javascript"
1088 | }
1089 | }
1090 | ],
1091 | "request": {
1092 | "method": "GET",
1093 | "header": [
1094 | {
1095 | "key": "Authorization",
1096 | "value": "Bearer {{access_token}}"
1097 | }
1098 | ],
1099 | "url": {
1100 | "raw": "{{WEBEXAPI}}/events?resource=messages&type=created&from={{_one_hour_ago}}&to={{_now}}",
1101 | "host": [
1102 | "{{WEBEXAPI}}"
1103 | ],
1104 | "path": [
1105 | "events"
1106 | ],
1107 | "query": [
1108 | {
1109 | "key": "resource",
1110 | "value": "messages"
1111 | },
1112 | {
1113 | "key": "type",
1114 | "value": "created"
1115 | },
1116 | {
1117 | "key": "from",
1118 | "value": "{{_one_hour_ago}}"
1119 | },
1120 | {
1121 | "key": "to",
1122 | "value": "{{_now}}"
1123 | }
1124 | ]
1125 | },
1126 | "description": "List events in your organization. Several query parameters are available to filter the response.\nLong result sets will be split into pages.\n\nhttps://developer.webex.com/endpoint-events-get.html"
1127 | },
1128 | "response": []
1129 | },
1130 | {
1131 | "name": "Get Events Details",
1132 | "event": [
1133 | {
1134 | "listen": "test",
1135 | "script": {
1136 | "id": "4909694c-00ab-46d8-9aef-3a322cb851ef",
1137 | "exec": [
1138 | "if (responseCode.code != 200) {",
1139 | " tests[\"Get event details: failed\"] = false;",
1140 | "}",
1141 | "else {",
1142 | " tests[\"Get event details: success\"] = true;",
1143 | "}"
1144 | ],
1145 | "type": "text/javascript"
1146 | }
1147 | }
1148 | ],
1149 | "request": {
1150 | "method": "GET",
1151 | "header": [
1152 | {
1153 | "key": "Authorization",
1154 | "value": "Bearer {{access_token}}"
1155 | }
1156 | ],
1157 | "url": {
1158 | "raw": "{{WEBEXAPI}}/events/{{_event}}",
1159 | "host": [
1160 | "{{WEBEXAPI}}"
1161 | ],
1162 | "path": [
1163 | "events",
1164 | "{{_event}}"
1165 | ]
1166 | },
1167 | "description": "Shows details for an event, by event ID.\r\nSpecify the event ID in the eventId parameter in the URI.\r\n\r\nhttps://developer.webex.com/endpoint-events-eventId-get.html"
1168 | },
1169 | "response": []
1170 | }
1171 | ],
1172 | "description": "Events are generated when actions take place within Cisco Spark, such as when someone creates or deletes a message. Use the Events API to retrieve events related to your account. Compliance Officers may retrieve events for all users within an organization. See the Compliance Guide for more information.\nhttps://developer.ciscospark.com/docs/api/guides/compliance.html\n\nThe resource endpoints such as /rooms, /messages, /memberships, etc. represent the current state of data in Spark. The /events resource represents the log of state changes which led to the current state of these resources; it details when a resource changed and who made the change.\n\nFor example, when a user posts a message in a room, this will result in a new message, available via the /messages resource. It will also result in a new event, available on the /events resource. If the user then deletes their message, this will result in the message no longer being returned on the /messages resource but it will result in a new event for the message deletion on the /events resource.\n\nEvents are available for the following resources when they are created, updated, or deleted:\n- messages\n- memberships\n\nhttps://developer.ciscospark.com/resource-events.html",
1173 | "protocolProfileBehavior": {}
1174 | },
1175 | {
1176 | "name": "Licenses",
1177 | "item": [
1178 | {
1179 | "name": "List Licenses",
1180 | "event": [
1181 | {
1182 | "listen": "test",
1183 | "script": {
1184 | "id": "dbad80d1-ea20-4b4b-a01c-4c6c52afadd0",
1185 | "exec": [
1186 | "if (responseCode.code != 200) {",
1187 | " tests[\"List licenses : failed\"] = false;",
1188 | "}",
1189 | "else {",
1190 | " tests[\"List licenses: success\"] = true;",
1191 | " ",
1192 | " var jsonData = JSON.parse(responseBody);",
1193 | " if (jsonData.items === undefined) {",
1194 | " tests[\"List licenses: cannot retreive result\"] = false",
1195 | " }",
1196 | " else {",
1197 | " var licenseId = jsonData.items[0].id;",
1198 | " postman.setEnvironmentVariable(\"_license\", licenseId);",
1199 | " tests[\"List licenses: retreived one with id:\" + licenseId] = true",
1200 | " }",
1201 | "}"
1202 | ],
1203 | "type": "text/javascript"
1204 | }
1205 | }
1206 | ],
1207 | "request": {
1208 | "method": "GET",
1209 | "header": [
1210 | {
1211 | "key": "Authorization",
1212 | "value": "Bearer {{access_token}}"
1213 | }
1214 | ],
1215 | "url": {
1216 | "raw": "{{WEBEXAPI}}/licenses",
1217 | "host": [
1218 | "{{WEBEXAPI}}"
1219 | ],
1220 | "path": [
1221 | "licenses"
1222 | ]
1223 | },
1224 | "description": "List all licenses for a given organization. If no orgId is specified, the default is the organization of the authenticated user.\n\nhttps://developer.webex.com/endpoint-licenses-get.html\n\nExample of a response:\n``` json\n{\n 'items' : [ {\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'displayName' : 'Spark Calling',\n 'totalUnits' : '42',\n 'consumedUnits' : '8'\n } ]\n}\n```"
1225 | },
1226 | "response": []
1227 | },
1228 | {
1229 | "name": "Get License Details",
1230 | "event": [
1231 | {
1232 | "listen": "test",
1233 | "script": {
1234 | "id": "600884ce-c64f-4776-8fcb-9787eaa1165f",
1235 | "exec": [
1236 | "if (responseCode.code != 200) {",
1237 | " tests[\"Get license details: failed\"] = false;",
1238 | "}",
1239 | "else {",
1240 | " tests[\"Get license details: success\"] = true;",
1241 | "}",
1242 | ""
1243 | ],
1244 | "type": "text/javascript"
1245 | }
1246 | }
1247 | ],
1248 | "request": {
1249 | "method": "GET",
1250 | "header": [
1251 | {
1252 | "key": "Authorization",
1253 | "value": "Bearer {{access_token}}"
1254 | }
1255 | ],
1256 | "url": {
1257 | "raw": "{{WEBEXAPI}}/licenses/{{_license}}",
1258 | "host": [
1259 | "{{WEBEXAPI}}"
1260 | ],
1261 | "path": [
1262 | "licenses",
1263 | "{{_license}}"
1264 | ]
1265 | },
1266 | "description": "Shows details for a license, by ID.\r\n\r\nSpecify the license ID in the licenseId parameter in the URI.\r\n\r\nhttps://developer.webex.com/endpoint-licenses-licenseId-get.html\r\n\r\nExample Response:\r\n``` json\r\n{\r\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\r\n 'displayName' : 'Spark Calling',\r\n 'totalUnits' : '42',\r\n 'consumedUnits' : \"8'\r\n}\r\n```"
1267 | },
1268 | "response": []
1269 | },
1270 | {
1271 | "name": "Create a Person (random)",
1272 | "event": [
1273 | {
1274 | "listen": "prerequest",
1275 | "script": {
1276 | "id": "85612fb5-76aa-4f84-a676-6bf6c11b49e1",
1277 | "exec": [
1278 | "var random = Math.round(Math.random()*1000);",
1279 | "",
1280 | "postman.setEnvironmentVariable(\"_random\", random);"
1281 | ],
1282 | "type": "text/javascript"
1283 | }
1284 | },
1285 | {
1286 | "listen": "test",
1287 | "script": {
1288 | "id": "e589a71e-b11f-432c-92f1-7a8b596d08fc",
1289 | "exec": [
1290 | "if (responseCode.code != 200) {",
1291 | " tests[\"Create a person: failed\"] = false;",
1292 | "}",
1293 | "else {",
1294 | " tests[\"Create a person: success\"] = true;",
1295 | "",
1296 | " var jsonData = JSON.parse(responseBody);",
1297 | " if (jsonData.id === undefined) {",
1298 | " tests[\"Create a person: cannot retreive result\"] = false",
1299 | " }",
1300 | " else {",
1301 | " var personID = jsonData.id;",
1302 | " postman.setEnvironmentVariable(\"_person\", personID);",
1303 | " tests[\"Create a person: retreived with id:\" + personID] = true",
1304 | " ",
1305 | " var orgId = jsonData.orgId;",
1306 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
1307 | " tests[\"Create a person: retreived org with id:\" + orgId] = true",
1308 | " ",
1309 | " var email = jsonData.emails[0];",
1310 | " postman.setEnvironmentVariable(\"_email\", email);",
1311 | " tests[\"Create a person: retreived email:\" + email] = true",
1312 | " }",
1313 | " ",
1314 | "}",
1315 | " ",
1316 | " "
1317 | ],
1318 | "type": "text/javascript"
1319 | }
1320 | }
1321 | ],
1322 | "request": {
1323 | "method": "POST",
1324 | "header": [
1325 | {
1326 | "key": "Authorization",
1327 | "value": "Bearer {{access_token}}"
1328 | },
1329 | {
1330 | "key": "Content-Type",
1331 | "value": "application/json"
1332 | }
1333 | ],
1334 | "body": {
1335 | "mode": "raw",
1336 | "raw": "{\r\n \"emails\": [\r\n \"{{_random}}@{{_domain}}\"\r\n ],\r\n \"firstName\": \"User\",\r\n \"lastName\": \"FromPostman\"\r\n}"
1337 | },
1338 | "url": {
1339 | "raw": "{{WEBEXAPI}}/people",
1340 | "host": [
1341 | "{{WEBEXAPI}}"
1342 | ],
1343 | "path": [
1344 | "people"
1345 | ]
1346 | },
1347 | "description": "Create a new user account for a given organization. Only an admin can create a new user account.\n\nhttps://developer.webex.com/endpoint-people-post.html\n\nExample Request:\n``` json\n{\n 'emails' : [ 'johnny.chang@foomail.com', 'jchang@barmail.com' ],\n 'displayName' : 'John Andersen',\n 'firstName' : 'John',\n 'lastName' : 'Andersen',\n 'avatar' : 'https://1efa7a94ed21783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~54c844c89e678e5a7b16a306bc2897b9~wx29yGtlTpilEFlYzqPKag==~1600',\n 'orgId' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'roles' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\n 'licenses' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ]\n}\n\nExample Response:\n{\n 'id' : 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY',\n 'emails' : [ 'johnny.chang@foomail.com', 'jchang@barmail.com' ],\n 'displayName' : 'John Andersen',\n 'firstName' : 'John',\n 'lastName' : 'Andersen',\n 'avatar' : 'https://1efa7a94ed21783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~54c844c89e678e5a7b16a306bc2897b9~wx29yGtlTpilEFlYzqPKag==~1600',\n 'orgId' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'roles' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\n 'licenses' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\n 'created' : '2015-10-18T14:26:16+00:00',\n 'timezone' : 'America/Denver'\n}\n```"
1348 | },
1349 | "response": []
1350 | },
1351 | {
1352 | "name": "Get Person Details (fetch displayName & orgId)",
1353 | "event": [
1354 | {
1355 | "listen": "test",
1356 | "script": {
1357 | "id": "7046ca1a-128d-4d14-8619-d3edaeb5bebf",
1358 | "exec": [
1359 | "if (responseCode.code != 200) {",
1360 | " tests[\"Get person details: failed\"] = false;",
1361 | "}",
1362 | "else {",
1363 | " tests[\"Get person details: success\"] = true;",
1364 | " ",
1365 | " var jsonData = JSON.parse(responseBody);",
1366 | " if (jsonData.id === undefined) {",
1367 | " tests[\"Get person details: cannot retreive result\"] = false",
1368 | " }",
1369 | " else {",
1370 | " ",
1371 | " var orgId = jsonData.orgId;",
1372 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
1373 | " tests[\"Get person details: retreived org with id:\" + orgId] = true",
1374 | "",
1375 | " var displayName = jsonData.displayName;",
1376 | " postman.setEnvironmentVariable(\"_displayName\", displayName);",
1377 | " tests[\"Get person details: retreived displayName:\" + displayName] = true",
1378 | "",
1379 | " var email = jsonData.emails[0];",
1380 | " postman.setEnvironmentVariable(\"_email\", email);",
1381 | " tests[\"Get person details: retreived email:\" + email] = true",
1382 | " }",
1383 | "}",
1384 | "",
1385 | "",
1386 | " "
1387 | ],
1388 | "type": "text/javascript"
1389 | }
1390 | }
1391 | ],
1392 | "request": {
1393 | "method": "GET",
1394 | "header": [
1395 | {
1396 | "key": "Authorization",
1397 | "value": "Bearer {{access_token}}"
1398 | }
1399 | ],
1400 | "url": {
1401 | "raw": "{{WEBEXAPI}}/people/{{_person}}",
1402 | "host": [
1403 | "{{WEBEXAPI}}"
1404 | ],
1405 | "path": [
1406 | "people",
1407 | "{{_person}}"
1408 | ]
1409 | },
1410 | "description": "Shows details for a person, by ID.\nSpecify the person ID in the personId parameter in the URI.\n\nhttps://developer.webex.com/endpoint-people-personId-get.html"
1411 | },
1412 | "response": []
1413 | },
1414 | {
1415 | "name": "Update a Person (set license)",
1416 | "event": [
1417 | {
1418 | "listen": "test",
1419 | "script": {
1420 | "id": "8a48a3ba-8fa8-4232-a798-e9121b1ad631",
1421 | "exec": [
1422 | "if (responseCode.code != 200) {",
1423 | " tests[\"Update person: failed\"] = false;",
1424 | "}",
1425 | "else {",
1426 | " tests[\"Update person: success\"] = true;",
1427 | "}"
1428 | ],
1429 | "type": "text/javascript"
1430 | }
1431 | }
1432 | ],
1433 | "request": {
1434 | "method": "PUT",
1435 | "header": [
1436 | {
1437 | "key": "Authorization",
1438 | "value": "Bearer {{access_token}}"
1439 | },
1440 | {
1441 | "key": "Content-Type",
1442 | "value": "application/json"
1443 | }
1444 | ],
1445 | "body": {
1446 | "mode": "raw",
1447 | "raw": "{\r\n \"orgId\" : \"{{_organization}}\",\r\n \"displayName\" : \"{{_displayName}}\",\r\n \"licenses\": [ \"{{_license}}\" ]\r\n}\r\n\r\n\r\n "
1448 | },
1449 | "url": {
1450 | "raw": "{{WEBEXAPI}}/people/{{_person}}",
1451 | "host": [
1452 | "{{WEBEXAPI}}"
1453 | ],
1454 | "path": [
1455 | "people",
1456 | "{{_person}}"
1457 | ]
1458 | },
1459 | "description": "Update details for a person, by ID.\r\n\r\nSpecify the person ID in the personId parameter in the URI. Only an admin can update a person details.\r\n\r\nhttps://developer.webex.com/endpoint-people-personId-put.html\r\n\r\nExample Request:\r\n``` json\r\n{\r\n 'emails\" : [ 'johnny.chang@foomail.com', 'jchang@barmail.com' ],\r\n 'displayName' : 'John Andersen',\r\n 'firstName' : 'John',\r\n 'lastName' : 'Andersen',\r\n 'avatar' : 'https://1efa7a94ed21783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~54c844c89e678e5a7b16a306bc2897b9~wx29yGtlTpilEFlYzqPKag==~1600',\r\n 'orgId' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\r\n 'roles' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\r\n 'licenses' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ]\r\n}\r\n```"
1460 | },
1461 | "response": []
1462 | }
1463 | ],
1464 | "description": "An allowance for features and services that are provided to users on a Webex Teams services subscription. Cisco and its partners manage the amount of licenses provided to administrators and users. This license resource can be accessed only by an admin.\n\nTo learn about how to allocate Hybrid Services licenses, see the Managing Hybrid Services guide.\n\nhttps://developer.webex.com/resource-licenses.html",
1465 | "event": [
1466 | {
1467 | "listen": "prerequest",
1468 | "script": {
1469 | "id": "22b12f22-89d8-42d9-9dc3-e937edb67908",
1470 | "type": "text/javascript",
1471 | "exec": [
1472 | ""
1473 | ]
1474 | }
1475 | },
1476 | {
1477 | "listen": "test",
1478 | "script": {
1479 | "id": "ba43e23c-74ce-40a5-9fd8-f8e1246d56dc",
1480 | "type": "text/javascript",
1481 | "exec": [
1482 | ""
1483 | ]
1484 | }
1485 | }
1486 | ],
1487 | "protocolProfileBehavior": {}
1488 | },
1489 | {
1490 | "name": "Organizations",
1491 | "item": [
1492 | {
1493 | "name": "List Organizations",
1494 | "event": [
1495 | {
1496 | "listen": "test",
1497 | "script": {
1498 | "id": "05f98352-2cf6-43b7-aa63-854c009aed49",
1499 | "exec": [
1500 | "if (responseCode.code != 200) {",
1501 | " tests[\"List organizations : failed\"] = false;",
1502 | "}",
1503 | "else {",
1504 | " tests[\"List organizations: success\"] = true;",
1505 | " ",
1506 | " var jsonData = JSON.parse(responseBody);",
1507 | " if (jsonData.items === undefined) {",
1508 | " tests[\"List organizations: cannot retreive result\"] = false",
1509 | " }",
1510 | " else {",
1511 | " var orgId = jsonData.items[0].id;",
1512 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
1513 | " tests[\"List organizations: retreived one with id:\" + orgId] = true",
1514 | " }",
1515 | "}"
1516 | ],
1517 | "type": "text/javascript"
1518 | }
1519 | }
1520 | ],
1521 | "request": {
1522 | "method": "GET",
1523 | "header": [
1524 | {
1525 | "key": "Authorization",
1526 | "value": "Bearer {{access_token}}"
1527 | }
1528 | ],
1529 | "url": {
1530 | "raw": "{{WEBEXAPI}}/organizations",
1531 | "host": [
1532 | "{{WEBEXAPI}}"
1533 | ],
1534 | "path": [
1535 | "organizations"
1536 | ]
1537 | },
1538 | "description": "List all organizations visible by your account.\n\nhttps://developer.webex.com/endpoint-organizations-get.html\n\nExample Response:\n``` json\n{\n 'items' : [ {\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'displayName' : 'Acme, Inc.',\n 'created' : '2015-10-18T14:26:16+00:00'\n } ]\n}\n```"
1539 | },
1540 | "response": []
1541 | },
1542 | {
1543 | "name": "Get Organization Details",
1544 | "event": [
1545 | {
1546 | "listen": "test",
1547 | "script": {
1548 | "id": "99746113-4e28-4286-9237-60cfc210abac",
1549 | "exec": [
1550 | "if (responseCode.code != 200) {",
1551 | " tests[\"Get organization details: failed\"] = false;",
1552 | "}",
1553 | "else {",
1554 | " tests[\"Get organization details: success\"] = true;",
1555 | "}"
1556 | ],
1557 | "type": "text/javascript"
1558 | }
1559 | }
1560 | ],
1561 | "request": {
1562 | "method": "GET",
1563 | "header": [
1564 | {
1565 | "key": "Authorization",
1566 | "value": "Bearer {{access_token}}"
1567 | }
1568 | ],
1569 | "url": {
1570 | "raw": "{{WEBEXAPI}}/organizations/{{_organization}}",
1571 | "host": [
1572 | "{{WEBEXAPI}}"
1573 | ],
1574 | "path": [
1575 | "organizations",
1576 | "{{_organization}}"
1577 | ]
1578 | },
1579 | "description": "Shows details for an organization, by ID.\r\n\r\nSpecify the org ID in the orgId parameter in the URI.\r\n\r\nhttps://developer.webex.com/endpoint-organizations-orgId-get.html\r\n\r\nExample Response:\r\n``` json\r\n{\r\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\r\n 'displayName' : 'Acme, Inc.',\r\n 'created' : '2015-10-18T14:26:16+00:00'\r\n}\r\n```"
1580 | },
1581 | "response": []
1582 | }
1583 | ],
1584 | "description": "A set of people in Webex Teams. Organizations may manage other organizations or be managed themselves. This organizations resource can be accessed only by an admin.\n\nhttps://developer.webex.com/resource-organizations.html\n\n",
1585 | "event": [
1586 | {
1587 | "listen": "prerequest",
1588 | "script": {
1589 | "id": "75b5851d-579d-4562-a2a7-4ed4a9420a85",
1590 | "type": "text/javascript",
1591 | "exec": [
1592 | ""
1593 | ]
1594 | }
1595 | },
1596 | {
1597 | "listen": "test",
1598 | "script": {
1599 | "id": "eab9171a-374c-4260-a774-532a75dc2eb8",
1600 | "type": "text/javascript",
1601 | "exec": [
1602 | ""
1603 | ]
1604 | }
1605 | }
1606 | ],
1607 | "protocolProfileBehavior": {}
1608 | },
1609 | {
1610 | "name": "People",
1611 | "item": [
1612 | {
1613 | "name": "Get Person Details (me)",
1614 | "event": [
1615 | {
1616 | "listen": "test",
1617 | "script": {
1618 | "id": "74bc245f-0686-4669-ac38-4bad3a1dc927",
1619 | "exec": [
1620 | "if (responseCode.code != 200) {",
1621 | " tests[\"Get person details: failed\"] = false;",
1622 | "}",
1623 | "else {",
1624 | " tests[\"Get person details: success\"] = true;",
1625 | " ",
1626 | " var jsonData = JSON.parse(responseBody);",
1627 | " if (jsonData.id === undefined) {",
1628 | " tests[\"Create a person: cannot retreive result\"] = false",
1629 | " }",
1630 | " else {",
1631 | " var email = jsonData.emails[0];",
1632 | " var parsed = email.match(/\\@(.*)$/);",
1633 | " var domain = parsed[1];",
1634 | " postman.setEnvironmentVariable(\"_domain\", domain);",
1635 | " tests[\"Create a person: retreived domain: \" + domain] = true",
1636 | " }",
1637 | "}",
1638 | "",
1639 | "",
1640 | " "
1641 | ],
1642 | "type": "text/javascript"
1643 | }
1644 | },
1645 | {
1646 | "listen": "prerequest",
1647 | "script": {
1648 | "id": "263d0744-ec80-4b24-a3ad-2e2bc62bca25",
1649 | "exec": [
1650 | ""
1651 | ],
1652 | "type": "text/javascript"
1653 | }
1654 | }
1655 | ],
1656 | "request": {
1657 | "method": "GET",
1658 | "header": [
1659 | {
1660 | "key": "Authorization",
1661 | "value": "Bearer {{access_token}}"
1662 | },
1663 | {
1664 | "key": "Content-Type",
1665 | "value": "application/json"
1666 | }
1667 | ],
1668 | "url": {
1669 | "raw": "{{WEBEXAPI}}/people/me",
1670 | "host": [
1671 | "{{WEBEXAPI}}"
1672 | ],
1673 | "path": [
1674 | "people",
1675 | "me"
1676 | ]
1677 | },
1678 | "description": "Show the profile for the authenticated user.\n\nhttps://developer.webex.com/endpoint-people-me-get.html"
1679 | },
1680 | "response": []
1681 | },
1682 | {
1683 | "name": "List People",
1684 | "event": [
1685 | {
1686 | "listen": "test",
1687 | "script": {
1688 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
1689 | "exec": [
1690 | "if (responseCode.code != 200) {",
1691 | " tests[\"Get person details: failed\"] = false;",
1692 | "}",
1693 | "else {",
1694 | " tests[\"Get person details: success\"] = true;",
1695 | " ",
1696 | " var jsonData = JSON.parse(responseBody);",
1697 | " if (jsonData.id === undefined) {",
1698 | " tests[\"Get person details: cannot retreive result\"] = false",
1699 | " }",
1700 | " else {",
1701 | " ",
1702 | " var orgId = jsonData.orgId;",
1703 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
1704 | " tests[\"Get person details: retreived org with id:\" + orgId] = true",
1705 | " ",
1706 | " var email = jsonData.emails[0];",
1707 | " postman.setEnvironmentVariable(\"_email\", email);",
1708 | " tests[\"Get person details: retreived email:\" + email] = true",
1709 | " }",
1710 | "}",
1711 | "",
1712 | "",
1713 | " "
1714 | ],
1715 | "type": "text/javascript"
1716 | }
1717 | }
1718 | ],
1719 | "request": {
1720 | "method": "GET",
1721 | "header": [
1722 | {
1723 | "key": "Authorization",
1724 | "value": "Bearer {{access_token}}"
1725 | }
1726 | ],
1727 | "url": {
1728 | "raw": "{{WEBEXAPI}}/people",
1729 | "host": [
1730 | "{{WEBEXAPI}}"
1731 | ],
1732 | "path": [
1733 | "people"
1734 | ]
1735 | }
1736 | },
1737 | "response": []
1738 | },
1739 | {
1740 | "name": "Create a Person (random)",
1741 | "event": [
1742 | {
1743 | "listen": "prerequest",
1744 | "script": {
1745 | "id": "74bab97c-c127-4085-9172-f9546d963d96",
1746 | "exec": [
1747 | "var random = Math.round(Math.random()*1000);",
1748 | "",
1749 | "postman.setEnvironmentVariable(\"_random\", random);"
1750 | ],
1751 | "type": "text/javascript"
1752 | }
1753 | },
1754 | {
1755 | "listen": "test",
1756 | "script": {
1757 | "id": "70b33ad3-d860-45c7-ba45-1d3eead960bd",
1758 | "exec": [
1759 | "if (responseCode.code != 200) {",
1760 | " tests[\"Create a person: failed\"] = false;",
1761 | "}",
1762 | "else {",
1763 | " tests[\"Create a person: success\"] = true;",
1764 | "",
1765 | " var jsonData = JSON.parse(responseBody);",
1766 | " if (jsonData.id === undefined) {",
1767 | " tests[\"Create a person: cannot retreive result\"] = false",
1768 | " }",
1769 | " else {",
1770 | " var personID = jsonData.id;",
1771 | " postman.setEnvironmentVariable(\"_person\", personID);",
1772 | " tests[\"Create a person: retreived with id:\" + personID] = true",
1773 | " ",
1774 | " var orgId = jsonData.orgId;",
1775 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
1776 | " tests[\"Create a person: retreived org with id:\" + orgId] = true",
1777 | " ",
1778 | " var email = jsonData.emails[0];",
1779 | " postman.setEnvironmentVariable(\"_email\", email);",
1780 | " tests[\"Create a person: retreived email:\" + email] = true",
1781 | " }",
1782 | " ",
1783 | "}",
1784 | " ",
1785 | " "
1786 | ],
1787 | "type": "text/javascript"
1788 | }
1789 | }
1790 | ],
1791 | "request": {
1792 | "method": "POST",
1793 | "header": [
1794 | {
1795 | "key": "Authorization",
1796 | "value": "Bearer {{access_token}}"
1797 | },
1798 | {
1799 | "key": "Content-Type",
1800 | "value": "application/json"
1801 | }
1802 | ],
1803 | "body": {
1804 | "mode": "raw",
1805 | "raw": "{\r\n \"emails\": [\r\n \"{{_random}}@{{_domain}}\"\r\n ],\r\n \"firstName\": \"User\",\r\n \"lastName\": \"FromPostman\"\r\n}"
1806 | },
1807 | "url": {
1808 | "raw": "{{WEBEXAPI}}/people",
1809 | "host": [
1810 | "{{WEBEXAPI}}"
1811 | ],
1812 | "path": [
1813 | "people"
1814 | ]
1815 | },
1816 | "description": "Create a new user account for a given organization. Only an admin can create a new user account.\n\nhttps://developer.webex.com/endpoint-people-post.html\n\nExample Request:\n``` json\n{\n 'emails' : [ 'johnny.chang@foomail.com', 'jchang@barmail.com' ],\n 'displayName' : 'John Andersen',\n 'firstName' : 'John',\n 'lastName' : 'Andersen',\n 'avatar' : 'https://1efa7a94ed21783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~54c844c89e678e5a7b16a306bc2897b9~wx29yGtlTpilEFlYzqPKag==~1600',\n 'orgId' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'roles' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\n 'licenses' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ]\n}\n\nExample Response:\n{\n 'id' : 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY',\n 'emails' : [ 'johnny.chang@foomail.com', 'jchang@barmail.com' ],\n 'displayName' : 'John Andersen',\n 'firstName' : 'John',\n 'lastName' : 'Andersen',\n 'avatar' : 'https://1efa7a94ed21783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~54c844c89e678e5a7b16a306bc2897b9~wx29yGtlTpilEFlYzqPKag==~1600',\n 'orgId' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'roles' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\n 'licenses' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\n 'created' : '2015-10-18T14:26:16+00:00',\n 'timezone' : 'America/Denver'\n}\n```"
1817 | },
1818 | "response": []
1819 | },
1820 | {
1821 | "name": "Get Person Details",
1822 | "event": [
1823 | {
1824 | "listen": "test",
1825 | "script": {
1826 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
1827 | "exec": [
1828 | "if (responseCode.code != 200) {",
1829 | " tests[\"Get person details: failed\"] = false;",
1830 | "}",
1831 | "else {",
1832 | " tests[\"Get person details: success\"] = true;",
1833 | " ",
1834 | " var jsonData = JSON.parse(responseBody);",
1835 | " if (jsonData.id === undefined) {",
1836 | " tests[\"Get person details: cannot retreive result\"] = false",
1837 | " }",
1838 | " else {",
1839 | " ",
1840 | " var orgId = jsonData.orgId;",
1841 | " postman.setEnvironmentVariable(\"_organization\", orgId);",
1842 | " tests[\"Get person details: retreived org with id:\" + orgId] = true",
1843 | " ",
1844 | " var email = jsonData.emails[0];",
1845 | " postman.setEnvironmentVariable(\"_email\", email);",
1846 | " tests[\"Get person details: retreived email:\" + email] = true",
1847 | " }",
1848 | "}",
1849 | "",
1850 | "",
1851 | " "
1852 | ],
1853 | "type": "text/javascript"
1854 | }
1855 | }
1856 | ],
1857 | "request": {
1858 | "method": "GET",
1859 | "header": [
1860 | {
1861 | "key": "Authorization",
1862 | "value": "Bearer {{access_token}}"
1863 | }
1864 | ],
1865 | "url": {
1866 | "raw": "{{WEBEXAPI}}/people/{{_person}}",
1867 | "host": [
1868 | "{{WEBEXAPI}}"
1869 | ],
1870 | "path": [
1871 | "people",
1872 | "{{_person}}"
1873 | ]
1874 | },
1875 | "description": "Shows details for a person, by ID.\nSpecify the person ID in the personId parameter in the URI.\n\nhttps://developer.webex.com/endpoint-people-personId-get.html"
1876 | },
1877 | "response": []
1878 | },
1879 | {
1880 | "name": "List people (with exact email)",
1881 | "event": [
1882 | {
1883 | "listen": "test",
1884 | "script": {
1885 | "id": "70aaa3a3-77f3-4630-887e-4a04fa43d55f",
1886 | "exec": [
1887 | "if (responseCode.code != 200) {",
1888 | " tests[\"List people (exact email): failed\"] = false;",
1889 | "}",
1890 | "else {",
1891 | " tests[\"List people (exact email): success\"] = true;",
1892 | "}",
1893 | "",
1894 | ""
1895 | ],
1896 | "type": "text/javascript"
1897 | }
1898 | }
1899 | ],
1900 | "request": {
1901 | "method": "GET",
1902 | "header": [
1903 | {
1904 | "key": "Authorization",
1905 | "value": "Bearer {{access_token}}"
1906 | }
1907 | ],
1908 | "url": {
1909 | "raw": "{{WEBEXAPI}}/people?email={{_email}}",
1910 | "host": [
1911 | "{{WEBEXAPI}}"
1912 | ],
1913 | "path": [
1914 | "people"
1915 | ],
1916 | "query": [
1917 | {
1918 | "key": "email",
1919 | "value": "{{_email}}"
1920 | }
1921 | ]
1922 | },
1923 | "description": "List people in your organization.\n\nhttps://developer.webex.com/endpoint-people-get.html"
1924 | },
1925 | "response": []
1926 | },
1927 | {
1928 | "name": "Get roles (to fetch a role id)",
1929 | "event": [
1930 | {
1931 | "listen": "test",
1932 | "script": {
1933 | "id": "434540e2-b696-4518-8a92-562e5ee8f4a2",
1934 | "exec": [
1935 | "if (responseCode.code != 200) {",
1936 | " tests[\"List roles: failed\"] = false;",
1937 | "}",
1938 | "else {",
1939 | " tests[\"List roles: success\"] = true;",
1940 | " ",
1941 | " var jsonData = JSON.parse(responseBody);",
1942 | " if (jsonData.items === undefined) {",
1943 | " tests[\"List roles: cannot retreive result\"] = false",
1944 | " }",
1945 | " else {",
1946 | " var roleId = jsonData.items[0].id;",
1947 | " postman.setEnvironmentVariable(\"_role\", roleId);",
1948 | " tests[\"List roles: retreived with id:\" + roleId] = true",
1949 | " }",
1950 | "}"
1951 | ],
1952 | "type": "text/javascript"
1953 | }
1954 | }
1955 | ],
1956 | "request": {
1957 | "method": "GET",
1958 | "header": [
1959 | {
1960 | "key": "Authorization",
1961 | "value": "Bearer {{access_token}}"
1962 | }
1963 | ],
1964 | "url": {
1965 | "raw": "{{WEBEXAPI}}/roles",
1966 | "host": [
1967 | "{{WEBEXAPI}}"
1968 | ],
1969 | "path": [
1970 | "roles"
1971 | ]
1972 | },
1973 | "description": "List all roles.\n\nhttps://developer.webex.com/endpoint-roles-get.html\n\nExample Response:\n``` json\n{\n 'items' : [ {\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'displayName' : 'Full Administrator'\n } ]\n}\n```"
1974 | },
1975 | "response": []
1976 | },
1977 | {
1978 | "name": "Update a Person",
1979 | "event": [
1980 | {
1981 | "listen": "test",
1982 | "script": {
1983 | "id": "797a6d18-77fc-49f1-b019-7703a7cbf5b0",
1984 | "exec": [
1985 | "if (responseCode.code != 200) {",
1986 | " tests[\"Update person: failed\"] = false;",
1987 | "}",
1988 | "else {",
1989 | " tests[\"Update person: success\"] = true;",
1990 | "}"
1991 | ],
1992 | "type": "text/javascript"
1993 | }
1994 | }
1995 | ],
1996 | "request": {
1997 | "method": "PUT",
1998 | "header": [
1999 | {
2000 | "key": "Authorization",
2001 | "value": "Bearer {{access_token}}"
2002 | },
2003 | {
2004 | "key": "Content-Type",
2005 | "value": "application/json"
2006 | }
2007 | ],
2008 | "body": {
2009 | "mode": "raw",
2010 | "raw": "{\r\n \"orgId\":\"{{_organization}}\",\r\n \"emails\": [\r\n \"{{_email}}\"\r\n ],\r\n \"displayName\": \"User updated\",\r\n \"roles\": [\"{{_role}}\"]\r\n}\r\n\r\n\r\n "
2011 | },
2012 | "url": {
2013 | "raw": "{{WEBEXAPI}}/people/{{_person}}",
2014 | "host": [
2015 | "{{WEBEXAPI}}"
2016 | ],
2017 | "path": [
2018 | "people",
2019 | "{{_person}}"
2020 | ]
2021 | },
2022 | "description": "Update details for a person, by ID.\r\n\r\nSpecify the person ID in the personId parameter in the URI. Only an admin can update a person details.\r\n\r\nhttps://developer.webex.com/endpoint-people-personId-put.html\r\n\r\nExample Request:\r\n``` json\r\n{\r\n 'emails\" : [ 'johnny.chang@foomail.com', 'jchang@barmail.com' ],\r\n 'displayName' : 'John Andersen',\r\n 'firstName' : 'John',\r\n 'lastName' : 'Andersen',\r\n 'avatar' : 'https://1efa7a94ed21783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~54c844c89e678e5a7b16a306bc2897b9~wx29yGtlTpilEFlYzqPKag==~1600',\r\n 'orgId' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\r\n 'roles' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ],\r\n 'licenses' : [ 'Y2lzY29zcGFyazovL3VzL1JPT00vOGNkYzQwYzQtZjA5ZS0zY2JhLThjMjYtZGQwZTcwYWRlY2Iy', 'Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mMDZkNzFhNS0wODMzLTRmYTUtYTcyYS1jYzg5YjI1ZWVlMmX' ]\r\n}\r\n```"
2023 | },
2024 | "response": []
2025 | },
2026 | {
2027 | "name": "Get Person Details",
2028 | "event": [
2029 | {
2030 | "listen": "test",
2031 | "script": {
2032 | "id": "1130c12d-ebae-4a68-8b82-71ba86cb778a",
2033 | "exec": [
2034 | "if (responseCode.code != 200) {",
2035 | " tests[\"Get person details: failed\"] = false;",
2036 | "}",
2037 | "else {",
2038 | " tests[\"Get person details: success\"] = true;",
2039 | "}",
2040 | "",
2041 | "",
2042 | " "
2043 | ],
2044 | "type": "text/javascript"
2045 | }
2046 | }
2047 | ],
2048 | "request": {
2049 | "method": "GET",
2050 | "header": [
2051 | {
2052 | "key": "Authorization",
2053 | "value": "Bearer {{access_token}}"
2054 | }
2055 | ],
2056 | "url": {
2057 | "raw": "{{WEBEXAPI}}/people/{{_person}}",
2058 | "host": [
2059 | "{{WEBEXAPI}}"
2060 | ],
2061 | "path": [
2062 | "people",
2063 | "{{_person}}"
2064 | ]
2065 | },
2066 | "description": "Shows details for a person, by ID.\nSpecify the person ID in the personId parameter in the URI.\n\nhttps://developer.webex.com/endpoint-people-personId-get.html"
2067 | },
2068 | "response": [
2069 | {
2070 | "name": "person details (Stève)",
2071 | "originalRequest": {
2072 | "method": "GET",
2073 | "header": [
2074 | {
2075 | "key": "Authorization",
2076 | "value": "Bearer {{spark_token}}",
2077 | "enabled": true
2078 | },
2079 | {
2080 | "key": "Content-Type",
2081 | "value": "application/json",
2082 | "enabled": true,
2083 | "description": "The mime type of this content"
2084 | }
2085 | ],
2086 | "url": {
2087 | "raw": "https://api.ciscospark.com/v1/people/me",
2088 | "protocol": "https",
2089 | "host": [
2090 | "api",
2091 | "ciscospark",
2092 | "com"
2093 | ],
2094 | "path": [
2095 | "v1",
2096 | "people",
2097 | "me"
2098 | ]
2099 | }
2100 | },
2101 | "status": "OK",
2102 | "code": 200,
2103 | "_postman_previewlanguage": "javascript",
2104 | "header": [
2105 | {
2106 | "key": "Cache-Control",
2107 | "value": "no-cache",
2108 | "name": "Cache-Control",
2109 | "description": ""
2110 | },
2111 | {
2112 | "key": "Content-Encoding",
2113 | "value": "gzip",
2114 | "name": "Content-Encoding",
2115 | "description": ""
2116 | },
2117 | {
2118 | "key": "Content-Length",
2119 | "value": "540",
2120 | "name": "Content-Length",
2121 | "description": ""
2122 | },
2123 | {
2124 | "key": "Content-Type",
2125 | "value": "application/json;charset=UTF-8",
2126 | "name": "Content-Type",
2127 | "description": ""
2128 | },
2129 | {
2130 | "key": "Date",
2131 | "value": "Wed, 09 Nov 2016 12:39:38 GMT",
2132 | "name": "Date",
2133 | "description": ""
2134 | },
2135 | {
2136 | "key": "Server",
2137 | "value": "Redacted",
2138 | "name": "Server",
2139 | "description": ""
2140 | },
2141 | {
2142 | "key": "Trackingid",
2143 | "value": "NA_e996fd8b-5abe-46f8-867b-a26732771b1e",
2144 | "name": "Trackingid",
2145 | "description": ""
2146 | },
2147 | {
2148 | "key": "Vary",
2149 | "value": "Accept-Encoding",
2150 | "name": "Vary",
2151 | "description": ""
2152 | },
2153 | {
2154 | "key": "X-Cf-Requestid",
2155 | "value": "512dc7ed-54dd-41f3-4338-2815604cd323",
2156 | "name": "X-Cf-Requestid",
2157 | "description": ""
2158 | }
2159 | ],
2160 | "cookie": [
2161 | {
2162 | "expires": "Fri Sep 18 2026 14:34:17 GMT+0200 (Central European Summer Time)",
2163 | "hostOnly": false,
2164 | "httpOnly": false,
2165 | "domain": ".ciscospark.com",
2166 | "path": "/",
2167 | "secure": false,
2168 | "session": false,
2169 | "value": "oeu1474374857983r0.14725724747852298",
2170 | "key": "optimizelyEndUserId"
2171 | },
2172 | {
2173 | "expires": "Tue Sep 21 2021 17:16:39 GMT+0200 (Central European Summer Time)",
2174 | "hostOnly": false,
2175 | "httpOnly": false,
2176 | "domain": ".ciscospark.com",
2177 | "path": "/",
2178 | "secure": false,
2179 | "session": false,
2180 | "value": "7FADA00A51DA6DC2-19EB0A83469897EF",
2181 | "key": "s_fid"
2182 | },
2183 | {
2184 | "expires": "Invalid Date",
2185 | "hostOnly": false,
2186 | "httpOnly": false,
2187 | "domain": ".ciscospark.com",
2188 | "path": "/",
2189 | "secure": false,
2190 | "session": true,
2191 | "value": "1",
2192 | "key": "AMCVS_5C0A123F5245AEEA0A490D45%40AdobeOrg"
2193 | },
2194 | {
2195 | "expires": "Sat Nov 26 2016 20:09:32 GMT+0100 (Central European Standard Time)",
2196 | "hostOnly": false,
2197 | "httpOnly": false,
2198 | "domain": ".ciscospark.com",
2199 | "path": "/",
2200 | "secure": false,
2201 | "session": false,
2202 | "value": "Prospect",
2203 | "key": "user_segment"
2204 | },
2205 | {
2206 | "expires": "Invalid Date",
2207 | "hostOnly": false,
2208 | "httpOnly": false,
2209 | "domain": ".ciscospark.com",
2210 | "path": "/",
2211 | "secure": false,
2212 | "session": true,
2213 | "value": "direct",
2214 | "key": "offerFlag"
2215 | },
2216 | {
2217 | "expires": "Invalid Date",
2218 | "hostOnly": false,
2219 | "httpOnly": false,
2220 | "domain": ".ciscospark.com",
2221 | "path": "/",
2222 | "secure": false,
2223 | "session": true,
2224 | "value": "rsp%3Dmatch%26cData%3D864409%253ACisco%2520Systems%2520Inc%253ATelecommunications%253AEquipment%2520%2526%2520Services%253AEnterprise%253AGreater%2520th%253AEnterprise%2520Business%253ATelecommunications%26cDataCustom%3DAdUpgrades%253ASan%2520Jose%253ACA%253A%255Bn%2Fa%255D%253A%255Bn%2Fa%255D%253A%255Bn%2Fa%255D%253A%255Bn%2Fa%255D%253A%255Bn%2Fa%255D%26sentAA%3DT%26sentAT%3DT",
2225 | "key": "s_dmdbase"
2226 | },
2227 | {
2228 | "expires": "Invalid Date",
2229 | "hostOnly": false,
2230 | "httpOnly": false,
2231 | "domain": ".ciscospark.com",
2232 | "path": "/",
2233 | "secure": false,
2234 | "session": true,
2235 | "value": "offer-page",
2236 | "key": "TrialFlag"
2237 | },
2238 | {
2239 | "expires": "Tue Nov 09 2021 09:41:52 GMT+0100 (Central European Standard Time)",
2240 | "hostOnly": false,
2241 | "httpOnly": false,
2242 | "domain": ".ciscospark.com",
2243 | "path": "/",
2244 | "secure": false,
2245 | "session": false,
2246 | "value": "%5B%5B%27other%27%2C%271474797461486%27%5D%2C%5B%27direct%27%2C%271478680912377%27%5D%5D",
2247 | "key": "spark_lst3"
2248 | },
2249 | {
2250 | "expires": "Thu Nov 09 2017 10:55:00 GMT+0100 (Central European Standard Time)",
2251 | "hostOnly": false,
2252 | "httpOnly": false,
2253 | "domain": ".ciscospark.com",
2254 | "path": "/",
2255 | "secure": false,
2256 | "session": false,
2257 | "value": "%7B%22distinct_id%22%3A%20%226b856818bc3ccf2b0c09fa74a2eb8ab84016c085e681428df4faadf8017a504a%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%2C%22__mps%22%3A%20%7B%7D%2C%22__mpso%22%3A%20%7B%7D%2C%22__mpa%22%3A%20%7B%7D%2C%22__mpu%22%3A%20%7B%7D%2C%22__mpap%22%3A%20%5B%5D%7D",
2258 | "key": "mp_87246332384760c6f27c021cf964be46_mixpanel"
2259 | },
2260 | {
2261 | "expires": "Thu Nov 10 2016 10:55:00 GMT+0100 (Central European Standard Time)",
2262 | "hostOnly": false,
2263 | "httpOnly": false,
2264 | "domain": ".ciscospark.com",
2265 | "path": "/",
2266 | "secure": false,
2267 | "session": false,
2268 | "value": "0",
2269 | "key": "mp_mixpanel__c"
2270 | },
2271 | {
2272 | "expires": "Fri Nov 09 2018 13:03:28 GMT+0100 (Central European Standard Time)",
2273 | "hostOnly": false,
2274 | "httpOnly": false,
2275 | "domain": ".ciscospark.com",
2276 | "path": "/",
2277 | "secure": false,
2278 | "session": false,
2279 | "value": "-1176276602%7CMCIDTS%7C17114%7CMCMID%7C69089778980261905934220490212596711080%7CMCAAMLH-1478858364%7C6%7CMCAAMB-1479297808%7CNRX38WO0n5BH8Th-nqAG_A%7CMCOPTOUT-1478700208s%7CNONE%7CMCAID%7C2B6C2745050120E0-400001136000C2AA",
2280 | "key": "AMCV_5C0A123F5245AEEA0A490D45%40AdobeOrg"
2281 | },
2282 | {
2283 | "expires": "Fri Dec 09 2016 13:04:21 GMT+0100 (Central European Standard Time)",
2284 | "hostOnly": false,
2285 | "httpOnly": false,
2286 | "domain": ".ciscospark.com",
2287 | "path": "/",
2288 | "secure": false,
2289 | "session": false,
2290 | "value": "1478693061363-Repeat",
2291 | "key": "s_nr"
2292 | },
2293 | {
2294 | "expires": "Sat Nov 09 2019 13:04:21 GMT+0100 (Central European Standard Time)",
2295 | "hostOnly": false,
2296 | "httpOnly": false,
2297 | "domain": ".ciscospark.com",
2298 | "path": "/",
2299 | "secure": false,
2300 | "session": false,
2301 | "value": "1478693061364",
2302 | "key": "s_lv"
2303 | },
2304 | {
2305 | "expires": "Thu Dec 01 2016 00:00:00 GMT+0100 (Central European Standard Time)",
2306 | "hostOnly": false,
2307 | "httpOnly": false,
2308 | "domain": ".ciscospark.com",
2309 | "path": "/",
2310 | "secure": false,
2311 | "session": false,
2312 | "value": "1480546800357%26vn%3D2",
2313 | "key": "s_vnum"
2314 | },
2315 | {
2316 | "expires": "Invalid Date",
2317 | "hostOnly": false,
2318 | "httpOnly": false,
2319 | "domain": ".ciscospark.com",
2320 | "path": "/",
2321 | "secure": false,
2322 | "session": true,
2323 | "value": "1",
2324 | "key": "siteEntry"
2325 | },
2326 | {
2327 | "expires": "Invalid Date",
2328 | "hostOnly": false,
2329 | "httpOnly": false,
2330 | "domain": ".ciscospark.com",
2331 | "path": "/",
2332 | "secure": false,
2333 | "session": true,
2334 | "value": "%5B%5BB%5D%5D",
2335 | "key": "SC_LINKS"
2336 | },
2337 | {
2338 | "expires": "Invalid Date",
2339 | "hostOnly": false,
2340 | "httpOnly": false,
2341 | "domain": ".ciscospark.com",
2342 | "path": "/",
2343 | "secure": false,
2344 | "session": true,
2345 | "value": "%3A",
2346 | "key": "v76"
2347 | },
2348 | {
2349 | "expires": "Invalid Date",
2350 | "hostOnly": false,
2351 | "httpOnly": false,
2352 | "domain": ".ciscospark.com",
2353 | "path": "/",
2354 | "secure": false,
2355 | "session": true,
2356 | "value": "wx%253Aus%253Aen_US%253ADisplayAccountOrderListPage%2C100%2C100%2C253%2C0%2C253%2C1920%2C1080%2C1%2CL",
2357 | "key": "s_ppvl"
2358 | },
2359 | {
2360 | "expires": "Invalid Date",
2361 | "hostOnly": false,
2362 | "httpOnly": false,
2363 | "domain": ".ciscospark.com",
2364 | "path": "/",
2365 | "secure": false,
2366 | "session": true,
2367 | "value": "wx%253Aus%253Aen_US%253ADisplayAccountOrderListPage%2C100%2C100%2C792%2C1714%2C792%2C1920%2C1080%2C1%2CP",
2368 | "key": "s_ppv"
2369 | },
2370 | {
2371 | "expires": "Wed Nov 09 2016 14:04:26 GMT+0100 (Central European Standard Time)",
2372 | "hostOnly": false,
2373 | "httpOnly": false,
2374 | "domain": ".ciscospark.com",
2375 | "path": "/",
2376 | "secure": false,
2377 | "session": false,
2378 | "value": "\"9lky1LUlDaAk0wNMLGQZDqeHijTSbknr3ey//5I8xq16T2VW4m8APfMKvlUTPoCvC71CJU31GeI901eE/eg=\"",
2379 | "key": "webexToken"
2380 | },
2381 | {
2382 | "expires": "Tue Feb 07 2017 13:04:27 GMT+0100 (Central European Standard Time)",
2383 | "hostOnly": false,
2384 | "httpOnly": false,
2385 | "domain": ".ciscospark.com",
2386 | "path": "/",
2387 | "secure": false,
2388 | "session": false,
2389 | "value": "PC#1456324639084-656899.28_28#1486469067|check#true#1478693127|session#1478693060450-425931#1478694927",
2390 | "key": "mbox"
2391 | },
2392 | {
2393 | "expires": "Fri Nov 09 2018 13:28:19 GMT+0100 (Central European Standard Time)",
2394 | "hostOnly": false,
2395 | "httpOnly": false,
2396 | "domain": ".ciscospark.com",
2397 | "path": "/",
2398 | "secure": false,
2399 | "session": false,
2400 | "value": "GA1.2.354628933.1456392661",
2401 | "key": "_ga"
2402 | },
2403 | {
2404 | "expires": "Thu Nov 09 2017 13:28:20 GMT+0100 (Central European Standard Time)",
2405 | "hostOnly": false,
2406 | "httpOnly": false,
2407 | "domain": ".ciscospark.com",
2408 | "path": "/",
2409 | "secure": false,
2410 | "session": false,
2411 | "value": "25019306.1308965199.1458575275042.1478693238438",
2412 | "key": "_actmu"
2413 | },
2414 | {
2415 | "expires": "Wed Nov 09 2016 13:58:20 GMT+0100 (Central European Standard Time)",
2416 | "hostOnly": false,
2417 | "httpOnly": false,
2418 | "domain": ".ciscospark.com",
2419 | "path": "/",
2420 | "secure": false,
2421 | "session": false,
2422 | "value": "1478693238438",
2423 | "key": "_actms"
2424 | },
2425 | {
2426 | "expires": "Sat Nov 07 2026 13:32:40 GMT+0100 (Central European Standard Time)",
2427 | "hostOnly": false,
2428 | "httpOnly": false,
2429 | "domain": ".ciscospark.com",
2430 | "path": "/",
2431 | "secure": false,
2432 | "session": false,
2433 | "value": "%7B%226148830417%22%3A%22gc%22%2C%226176172291%22%3A%22none%22%2C%226153610436%22%3A%22referral%22%2C%226132590950%22%3A%22false%22%7D",
2434 | "key": "optimizelySegments"
2435 | },
2436 | {
2437 | "expires": "Sat Nov 07 2026 13:32:43 GMT+0100 (Central European Standard Time)",
2438 | "hostOnly": false,
2439 | "httpOnly": false,
2440 | "domain": ".ciscospark.com",
2441 | "path": "/",
2442 | "secure": false,
2443 | "session": false,
2444 | "value": "%7B%227495520894%22%3A%227475976205%22%2C%227548736597%22%3A%227574622917%22%2C%227717362716%22%3A%227714322794%22%7D",
2445 | "key": "optimizelyBuckets"
2446 | },
2447 | {
2448 | "expires": "Invalid Date",
2449 | "hostOnly": false,
2450 | "httpOnly": false,
2451 | "domain": ".ciscospark.com",
2452 | "path": "/",
2453 | "secure": false,
2454 | "session": true,
2455 | "value": "true",
2456 | "key": "s_cc"
2457 | },
2458 | {
2459 | "expires": "Invalid Date",
2460 | "hostOnly": false,
2461 | "httpOnly": false,
2462 | "domain": ".ciscospark.com",
2463 | "path": "/",
2464 | "secure": false,
2465 | "session": true,
2466 | "value": "%5B%5BB%5D%5D",
2467 | "key": "s_sq"
2468 | }
2469 | ],
2470 | "body": "{\"id\":\"Y2lzY29zcGFyazovL3VzL1BFT1BMRS8wM2ZiZTEwOS0yM2Y2LTQ1OWItODFlNS02YzYxM2JhMWNhZTE\",\"emails\":[\"steve.sfartz@gmail.com\"],\"displayName\":\"Stève Sfartz\",\"firstName\":\"Stève\",\"lastName\":\"Sfartz\",\"avatar\":\"https://c74213ddaf67eb02dabb-04de5163e3f90393a9f7bb6f7f0967f1.ssl.cf1.rackcdn.com/V1~efa32f72522b5f61176ce069d9163a43~ZOzopPn4Q3edMJrRLI-FMA==~1600\",\"orgId\":\"Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi82NWQ0N2MzNS1lNzg1LTRjZTMtOWM0NC1hNGM0OGViZTQyYmE\",\"roles\":[\"Y2lzY29zcGFyazovL3VzL1JPTEUvaWRfZnVsbF9hZG1pbg\"],\"licenses\":[\"Y2lzY29zcGFyazovL3VzL0xJQ0VOU0UvNjVkNDdjMzUtZTc4NS00Y2UzLTljNDQtYTRjNDhlYmU0MmJhOk1TXzA3NTMwNzAxLTlkM2YtNDFmOC04Y2NkLTY4YzY1NmU2ZGMwMQ\"],\"created\":\"2015-12-22T10:36:52.660Z\",\"timeZone\":\"Europe/Paris\"}"
2471 | }
2472 | ]
2473 | },
2474 | {
2475 | "name": "Delete a Person",
2476 | "event": [
2477 | {
2478 | "listen": "test",
2479 | "script": {
2480 | "id": "22817ba7-fd97-4e57-b266-7967133398e7",
2481 | "exec": [
2482 | "if (responseCode.code != 204) {",
2483 | " tests[\"Delete person: failed\"] = false;",
2484 | "}",
2485 | "else {",
2486 | " tests[\"Delete person: success\"] = true;",
2487 | "}",
2488 | " ",
2489 | " "
2490 | ],
2491 | "type": "text/javascript"
2492 | }
2493 | }
2494 | ],
2495 | "request": {
2496 | "method": "DELETE",
2497 | "header": [
2498 | {
2499 | "key": "Authorization",
2500 | "value": "Bearer {{access_token}}"
2501 | }
2502 | ],
2503 | "url": {
2504 | "raw": "{{WEBEXAPI}}/people/{{_person}}",
2505 | "host": [
2506 | "{{WEBEXAPI}}"
2507 | ],
2508 | "path": [
2509 | "people",
2510 | "{{_person}}"
2511 | ]
2512 | },
2513 | "description": "Remove a person from the system. Only an admin can remove a person.\n\nSpecify the person ID in the personId parameter in the URI.\n\nhttps://developer.webex.com/endpoint-people-personId-delete.html"
2514 | },
2515 | "response": []
2516 | }
2517 | ],
2518 | "description": "People are registered users of Webex Teams. Searching and viewing People requires an auth token with a scope of spark:people_read. Viewing the list of all People in your Organization requires an administrator auth token with spark-admin:people_read scope. Adding, updating, and removing People requires an administrator auth token with the spark-admin:people_write scope.\r\n\r\nTo learn more about managing people in a room see the Memberships API. For information about how to allocate Hybrid Services licenses to people, see the Managing Hybrid Services guide.\r\n\r\nhttps://developer.webex.com/resource-people.html",
2519 | "event": [
2520 | {
2521 | "listen": "prerequest",
2522 | "script": {
2523 | "id": "c1e0d80e-1c21-4b2b-90fd-2da78b0539cc",
2524 | "type": "text/javascript",
2525 | "exec": [
2526 | ""
2527 | ]
2528 | }
2529 | },
2530 | {
2531 | "listen": "test",
2532 | "script": {
2533 | "id": "9873f57e-4a14-4d6c-97e9-b1c333c793cd",
2534 | "type": "text/javascript",
2535 | "exec": [
2536 | ""
2537 | ]
2538 | }
2539 | }
2540 | ],
2541 | "protocolProfileBehavior": {}
2542 | },
2543 | {
2544 | "name": "Places",
2545 | "item": [
2546 | {
2547 | "name": "List Places",
2548 | "event": [
2549 | {
2550 | "listen": "test",
2551 | "script": {
2552 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
2553 | "exec": [
2554 | "if (responseCode.code != 200) {",
2555 | " tests[\"List places : failed\"] = false;",
2556 | "}",
2557 | "else {",
2558 | " tests[\"List places: success\"] = true;",
2559 | " ",
2560 | " var jsonData = JSON.parse(responseBody);",
2561 | " if (jsonData.items === undefined) {",
2562 | " tests[\"List places: cannot retreive result\"] = false",
2563 | " }",
2564 | " else {",
2565 | " var placeId = jsonData.items[0].id;",
2566 | " postman.setEnvironmentVariable(\"_place\", placeId);",
2567 | " tests[\"List places: retreived one place with id:\" + placeId] = true",
2568 | " }",
2569 | "}",
2570 | ""
2571 | ],
2572 | "type": "text/javascript"
2573 | }
2574 | }
2575 | ],
2576 | "request": {
2577 | "method": "GET",
2578 | "header": [
2579 | {
2580 | "key": "Authorization",
2581 | "value": "Bearer {{access_token}}"
2582 | }
2583 | ],
2584 | "url": {
2585 | "raw": "{{WEBEXAPI}}/places",
2586 | "host": [
2587 | "{{WEBEXAPI}}"
2588 | ],
2589 | "path": [
2590 | "places"
2591 | ]
2592 | },
2593 | "description": "List places.\nUse query parameters to filter the response.\n\nhttps://developer.webex.com/docs/api/v1/places/list-places"
2594 | },
2595 | "response": []
2596 | },
2597 | {
2598 | "name": "Create a Place",
2599 | "event": [
2600 | {
2601 | "listen": "test",
2602 | "script": {
2603 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
2604 | "exec": [
2605 | "if (responseCode.code != 200) {",
2606 | " tests[\"Create a place: failed\"] = false;",
2607 | "}",
2608 | "else {",
2609 | " tests[\"Create a place: success\"] = true;",
2610 | "",
2611 | " var jsonData = JSON.parse(responseBody);",
2612 | " if (jsonData.id === undefined) {",
2613 | " tests[\"Create a place: cannot retreive result\"] = false",
2614 | " }",
2615 | " else {",
2616 | " var placeId = jsonData.id;",
2617 | " postman.setEnvironmentVariable(\"_place\", placeId);",
2618 | " tests[\"Create a place: created with id:\" + placeId] = true",
2619 | " }",
2620 | " ",
2621 | "}",
2622 | " ",
2623 | " "
2624 | ],
2625 | "type": "text/javascript"
2626 | }
2627 | }
2628 | ],
2629 | "request": {
2630 | "method": "POST",
2631 | "header": [
2632 | {
2633 | "key": "Authorization",
2634 | "value": "Bearer {{access_token}}"
2635 | },
2636 | {
2637 | "key": "Content-Type",
2638 | "name": "Content-Type",
2639 | "value": "application/json",
2640 | "type": "text"
2641 | }
2642 | ],
2643 | "body": {
2644 | "mode": "raw",
2645 | "raw": "{ \r\n\t\"displayName\" : \"DevNetZone\",\r\n\t\"type\" : \"room_device\"\r\n}"
2646 | },
2647 | "url": {
2648 | "raw": "{{WEBEXAPI}}/places",
2649 | "host": [
2650 | "{{WEBEXAPI}}"
2651 | ],
2652 | "path": [
2653 | "places"
2654 | ]
2655 | },
2656 | "description": "Create a place.\n\nhttps://developer.webex.com/docs/api/v1/places/create-a-place"
2657 | },
2658 | "response": []
2659 | },
2660 | {
2661 | "name": "Get Place Details",
2662 | "event": [
2663 | {
2664 | "listen": "test",
2665 | "script": {
2666 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
2667 | "exec": [
2668 | "if (responseCode.code != 200) {",
2669 | " tests[\"Get place details: failed\"] = false;",
2670 | "}",
2671 | "else {",
2672 | " tests[\"Get place details: success\"] = true;",
2673 | "}",
2674 | "",
2675 | "",
2676 | " "
2677 | ],
2678 | "type": "text/javascript"
2679 | }
2680 | }
2681 | ],
2682 | "request": {
2683 | "method": "GET",
2684 | "header": [
2685 | {
2686 | "key": "Authorization",
2687 | "value": "Bearer {{access_token}}"
2688 | }
2689 | ],
2690 | "url": {
2691 | "raw": "{{WEBEXAPI}}/places/{{_place}}",
2692 | "host": [
2693 | "{{WEBEXAPI}}"
2694 | ],
2695 | "path": [
2696 | "places",
2697 | "{{_place}}"
2698 | ]
2699 | },
2700 | "description": "Shows details for a place, by ID.\r\nSpecify the place ID in the placeId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/places/get-place-details"
2701 | },
2702 | "response": []
2703 | },
2704 | {
2705 | "name": "Update a Place",
2706 | "event": [
2707 | {
2708 | "listen": "test",
2709 | "script": {
2710 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
2711 | "exec": [
2712 | "if (responseCode.code != 200) {",
2713 | " tests[\"Update place: failed\"] = false;",
2714 | "}",
2715 | "else {",
2716 | " tests[\"Update place: success\"] = true;",
2717 | "}"
2718 | ],
2719 | "type": "text/javascript"
2720 | }
2721 | }
2722 | ],
2723 | "request": {
2724 | "method": "PUT",
2725 | "header": [
2726 | {
2727 | "key": "Authorization",
2728 | "value": "Bearer {{access_token}}"
2729 | },
2730 | {
2731 | "key": "Content-Type",
2732 | "name": "Content-Type",
2733 | "value": "application/json",
2734 | "type": "text"
2735 | }
2736 | ],
2737 | "body": {
2738 | "mode": "raw",
2739 | "raw": "{ \r\n\t\"displayName\" : \"home\",\r\n\t\"type\" : \"room_device\"\r\n}"
2740 | },
2741 | "url": {
2742 | "raw": "{{WEBEXAPI}}/places/{{_place}}",
2743 | "host": [
2744 | "{{WEBEXAPI}}"
2745 | ],
2746 | "path": [
2747 | "places",
2748 | "{{_place}}"
2749 | ]
2750 | },
2751 | "description": "Updates details for a place, by ID.\r\nSpecify the place ID in the placeId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/places/update-a-place"
2752 | },
2753 | "response": []
2754 | },
2755 | {
2756 | "name": "Create a Device Activation Code",
2757 | "event": [
2758 | {
2759 | "listen": "test",
2760 | "script": {
2761 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
2762 | "exec": [
2763 | "if (responseCode.code != 200) {",
2764 | " tests[\"Create an activation code: failed\"] = false;",
2765 | "}",
2766 | "else {",
2767 | " tests[\"Create an activation code: success\"] = true;",
2768 | "",
2769 | " var jsonData = JSON.parse(responseBody);",
2770 | " if (jsonData.code === undefined) {",
2771 | " tests[\"Create an activation code: cannot retreive result\"] = false",
2772 | " }",
2773 | " else {",
2774 | " var code = jsonData.code;",
2775 | " postman.setEnvironmentVariable(\"_code\", code);",
2776 | " tests[\"Create an activation code: \" + code] = true",
2777 | " }",
2778 | "}",
2779 | " ",
2780 | " "
2781 | ],
2782 | "type": "text/javascript"
2783 | }
2784 | }
2785 | ],
2786 | "request": {
2787 | "method": "POST",
2788 | "header": [
2789 | {
2790 | "key": "Authorization",
2791 | "value": "Bearer {{access_token}}"
2792 | },
2793 | {
2794 | "key": "Content-Type",
2795 | "name": "Content-Type",
2796 | "type": "text",
2797 | "value": "application/json"
2798 | }
2799 | ],
2800 | "body": {
2801 | "mode": "raw",
2802 | "raw": "{\n\t\"placeId\" : \"{{_place}}\"\n}"
2803 | },
2804 | "url": {
2805 | "raw": "{{WEBEXAPI}}/devices/activationCode",
2806 | "host": [
2807 | "{{WEBEXAPI}}"
2808 | ],
2809 | "path": [
2810 | "devices",
2811 | "activationCode"
2812 | ]
2813 | },
2814 | "description": "Generate an activation code for a device in a specific place by placeId. Currently, activation codes may only be generated for shared places--personal mode is not supported.\n\nhttps://developer.webex.com/docs/api/v1/devices/create-a-device-activation-code"
2815 | },
2816 | "response": []
2817 | },
2818 | {
2819 | "name": "Delete a Place",
2820 | "event": [
2821 | {
2822 | "listen": "test",
2823 | "script": {
2824 | "id": "ba7a72b3-768b-47ef-a821-076162ef34c3",
2825 | "exec": [
2826 | "if (responseCode.code != 204) {",
2827 | " tests[\"Delete place: failed\"] = false;",
2828 | "}",
2829 | "else {",
2830 | " tests[\"Delete place: success\"] = true;",
2831 | "}",
2832 | " ",
2833 | " "
2834 | ],
2835 | "type": "text/javascript"
2836 | }
2837 | }
2838 | ],
2839 | "request": {
2840 | "method": "DELETE",
2841 | "header": [
2842 | {
2843 | "key": "Authorization",
2844 | "value": "Bearer {{access_token}}"
2845 | }
2846 | ],
2847 | "url": {
2848 | "raw": "{{WEBEXAPI}}/places/{{_place}}",
2849 | "host": [
2850 | "{{WEBEXAPI}}"
2851 | ],
2852 | "path": [
2853 | "places",
2854 | "{{_place}}"
2855 | ]
2856 | },
2857 | "description": "Deletes a place, by ID. Will also delete all devices associated with the place.\r\nSpecify the place ID in the placeId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/places/delete-a-place"
2858 | },
2859 | "response": []
2860 | }
2861 | ],
2862 | "description": "Places represent where people work, such as conference rooms, meeting spaces, lobbies, and lunch rooms. Devices may be associated with places.\r\n\r\nViewing details for places you have access to requires an auth token with a scope of spark:places_read. Updating or deleting your places requires an auth token with the spark:places_write scope. Viewing the list of all places in an organization requires an administrator auth token with the spark-admin:places_read scope. Adding, updating, or deleting all places in an organization requires an administrator auth token with the spark-admin:places_write scope.\r\n\r\nhttps://developer.webex.com/docs/api/v1/places",
2863 | "event": [
2864 | {
2865 | "listen": "prerequest",
2866 | "script": {
2867 | "id": "4334833c-35d2-4f03-80f3-39e3bd406a1a",
2868 | "type": "text/javascript",
2869 | "exec": [
2870 | ""
2871 | ]
2872 | }
2873 | },
2874 | {
2875 | "listen": "test",
2876 | "script": {
2877 | "id": "d74c7738-c88f-48ba-ba4a-ded1565a8bf4",
2878 | "type": "text/javascript",
2879 | "exec": [
2880 | ""
2881 | ]
2882 | }
2883 | }
2884 | ],
2885 | "protocolProfileBehavior": {}
2886 | },
2887 | {
2888 | "name": "Roles",
2889 | "item": [
2890 | {
2891 | "name": "List Roles",
2892 | "event": [
2893 | {
2894 | "listen": "test",
2895 | "script": {
2896 | "id": "8b97bbb6-93e0-4b7f-9216-7c6b71ec8301",
2897 | "exec": [
2898 | "if (responseCode.code != 200) {",
2899 | " tests[\"List roles: failed\"] = false;",
2900 | "}",
2901 | "else {",
2902 | " tests[\"List roles: success\"] = true;",
2903 | " ",
2904 | " var jsonData = JSON.parse(responseBody);",
2905 | " if (jsonData.items === undefined) {",
2906 | " tests[\"List roles: cannot retreive result\"] = false",
2907 | " }",
2908 | " else {",
2909 | " var roleId = jsonData.items[0].id;",
2910 | " postman.setEnvironmentVariable(\"_role\", roleId);",
2911 | " tests[\"List roles: retreived with id:\" + roleId] = true",
2912 | " }",
2913 | "}"
2914 | ],
2915 | "type": "text/javascript"
2916 | }
2917 | }
2918 | ],
2919 | "request": {
2920 | "method": "GET",
2921 | "header": [
2922 | {
2923 | "key": "Authorization",
2924 | "value": "Bearer {{access_token}}"
2925 | }
2926 | ],
2927 | "url": {
2928 | "raw": "{{WEBEXAPI}}/roles",
2929 | "host": [
2930 | "{{WEBEXAPI}}"
2931 | ],
2932 | "path": [
2933 | "roles"
2934 | ]
2935 | },
2936 | "description": "List all roles.\n\nhttps://developer.webex.com/endpoint-roles-get.html\n\nExample Response:\n``` json\n{\n 'items' : [ {\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'displayName' : 'Full Administrator'\n } ]\n}\n```"
2937 | },
2938 | "response": []
2939 | },
2940 | {
2941 | "name": "Get Role Details",
2942 | "event": [
2943 | {
2944 | "listen": "test",
2945 | "script": {
2946 | "id": "521663b9-91b4-41b3-81b6-e3d7bbc5de6c",
2947 | "exec": [
2948 | "if (responseCode.code != 200) {",
2949 | " tests[\"Get role details: failed\"] = false;",
2950 | "}",
2951 | "else {",
2952 | " tests[\"Get role details: success\"] = true;",
2953 | "}",
2954 | " "
2955 | ],
2956 | "type": "text/javascript"
2957 | }
2958 | }
2959 | ],
2960 | "request": {
2961 | "method": "GET",
2962 | "header": [
2963 | {
2964 | "key": "Authorization",
2965 | "value": "Bearer {{access_token}}"
2966 | }
2967 | ],
2968 | "url": {
2969 | "raw": "{{WEBEXAPI}}/roles/{{_role}}",
2970 | "host": [
2971 | "{{WEBEXAPI}}"
2972 | ],
2973 | "path": [
2974 | "roles",
2975 | "{{_role}}"
2976 | ]
2977 | },
2978 | "description": "Shows details for a role, by ID.\n\nSpecify the role ID in the roleId parameter in the URI.\n\nhttps://developer.webex.com/endpoint-roles-roleId-get.html\n\nExample Response:\n``` json\n{\n 'id' : 'OTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh',\n 'displayName' : 'Full Administrator'\n}\n```"
2979 | },
2980 | "response": []
2981 | }
2982 | ],
2983 | "description": "A persona for an authenticated user, corresponding to a set of privileges within an organization. This roles resource can be accessed only by an admin.\n\nhttps://developer.webex.com/resource-roles.html",
2984 | "event": [
2985 | {
2986 | "listen": "prerequest",
2987 | "script": {
2988 | "id": "b9076309-ce8a-4aba-a089-26b2dd7f8818",
2989 | "type": "text/javascript",
2990 | "exec": [
2991 | ""
2992 | ]
2993 | }
2994 | },
2995 | {
2996 | "listen": "test",
2997 | "script": {
2998 | "id": "66f81f7f-393b-4b26-af9f-1d4eb20e0e6b",
2999 | "type": "text/javascript",
3000 | "exec": [
3001 | ""
3002 | ]
3003 | }
3004 | }
3005 | ],
3006 | "protocolProfileBehavior": {}
3007 | },
3008 | {
3009 | "name": "xAPI",
3010 | "item": [
3011 | {
3012 | "name": "List Devices",
3013 | "event": [
3014 | {
3015 | "listen": "test",
3016 | "script": {
3017 | "id": "ad058baa-277b-4889-9294-2e17a825961d",
3018 | "exec": [
3019 | "",
3020 | "if (responseCode.code != 200) {",
3021 | " tests[\"List devices : failed\"] = false;",
3022 | "}",
3023 | "else {",
3024 | " tests[\"List devices: success\"] = true;",
3025 | " ",
3026 | " var jsonData = JSON.parse(responseBody);",
3027 | " if (jsonData.items === undefined) {",
3028 | " tests[\"List devices: cannot retreive result\"] = false",
3029 | " }",
3030 | " else {",
3031 | " var deviceId = jsonData.items[0].id;",
3032 | " postman.setEnvironmentVariable(\"_device\", deviceId);",
3033 | " tests[\"List devices: retreived one device with id:\" + deviceId] = true",
3034 | "",
3035 | " visualize(jsonData.items);",
3036 | " }",
3037 | "}",
3038 | "",
3039 | "function visualize(devices) {",
3040 | " ",
3041 | " // Configure the template",
3042 | " var template = `",
3043 | " ",
3044 | "",
3045 | " ",
3046 | "",
3047 | " `;",
3100 | "",
3101 | " // Set the visualizer template",
3102 | " pm.visualizer.set(template, { ",
3103 | " labels: [ ",
3104 | " \"count\", ",
3105 | " \"connected\", ",
3106 | " \"connected_with_issues\", ",
3107 | " \"disconnected\"],",
3108 | " data: [ ",
3109 | " devices.length, ",
3110 | " devices.filter((device) => { return (device.connectionStatus === \"connected\") }).length,",
3111 | " devices.filter((device) => { return (device.connectionStatus === \"connected_with_issues\") }).length,",
3112 | " devices.filter((device) => { return (device.connectionStatus === \"disconnected\") }).length]",
3113 | " });",
3114 | "}",
3115 | "",
3116 | "",
3117 | ""
3118 | ],
3119 | "type": "text/javascript"
3120 | }
3121 | }
3122 | ],
3123 | "request": {
3124 | "method": "GET",
3125 | "header": [
3126 | {
3127 | "key": "Authorization",
3128 | "value": "Bearer {{access_token}}"
3129 | }
3130 | ],
3131 | "url": {
3132 | "raw": "{{WEBEXAPI}}/devices",
3133 | "host": [
3134 | "{{WEBEXAPI}}"
3135 | ],
3136 | "path": [
3137 | "devices"
3138 | ]
3139 | },
3140 | "description": "Lists all active Webex devices associated with the authenticated user, such as devices activated in personal mode, or devices to which the user is actively paired or using. Administrators can list all devices within an organization.\n\nhttps://developer.webex.com/docs/api/v1/devices/list-devices"
3141 | },
3142 | "response": []
3143 | },
3144 | {
3145 | "name": "Get Device Details",
3146 | "event": [
3147 | {
3148 | "listen": "test",
3149 | "script": {
3150 | "id": "ac958aca-3823-4460-a6f8-4454b038cdff",
3151 | "exec": [
3152 | "if (responseCode.code != 200) {",
3153 | " tests[\"Get device details: failed\"] = false;",
3154 | "}",
3155 | "else {",
3156 | " tests[\"Get device details: success\"] = true;",
3157 | "}",
3158 | "",
3159 | "",
3160 | " "
3161 | ],
3162 | "type": "text/javascript"
3163 | }
3164 | }
3165 | ],
3166 | "request": {
3167 | "method": "GET",
3168 | "header": [
3169 | {
3170 | "key": "Authorization",
3171 | "value": "Bearer {{access_token}}"
3172 | }
3173 | ],
3174 | "url": {
3175 | "raw": "{{WEBEXAPI}}/devices/{{_device}}",
3176 | "host": [
3177 | "{{WEBEXAPI}}"
3178 | ],
3179 | "path": [
3180 | "devices",
3181 | "{{_device}}"
3182 | ]
3183 | },
3184 | "description": "Shows details for a device, by ID.\r\nSpecify the device ID in the deviceId parameter in the URI.\r\n\r\nhttps://developer.webex.com/docs/api/v1/devices/get-device-details"
3185 | },
3186 | "response": []
3187 | },
3188 | {
3189 | "name": "Query Status (audio.volume)",
3190 | "event": [
3191 | {
3192 | "listen": "test",
3193 | "script": {
3194 | "id": "fff27071-4a37-4a27-ba05-f864cb957117",
3195 | "exec": [
3196 | "if (responseCode.code != 200) {",
3197 | " tests[\"List roles: failed\"] = false;",
3198 | "}",
3199 | "else {",
3200 | " tests[\"List roles: success\"] = true;",
3201 | " ",
3202 | " var jsonData = JSON.parse(responseBody);",
3203 | " if (jsonData.items === undefined) {",
3204 | " tests[\"List roles: cannot retreive result\"] = false",
3205 | " }",
3206 | " else {",
3207 | " var roleId = jsonData.items[0].id;",
3208 | " postman.setEnvironmentVariable(\"_role\", roleId);",
3209 | " tests[\"List roles: retreived with id:\" + roleId] = true",
3210 | " }",
3211 | "}"
3212 | ],
3213 | "type": "text/javascript"
3214 | }
3215 | }
3216 | ],
3217 | "request": {
3218 | "method": "GET",
3219 | "header": [
3220 | {
3221 | "key": "Authorization",
3222 | "value": "Bearer {{access_token}}"
3223 | }
3224 | ],
3225 | "url": {
3226 | "raw": "{{WEBEXAPI}}/xapi/status?deviceId={{_device}}&name=audio.volume",
3227 | "host": [
3228 | "{{WEBEXAPI}}"
3229 | ],
3230 | "path": [
3231 | "xapi",
3232 | "status"
3233 | ],
3234 | "query": [
3235 | {
3236 | "key": "deviceId",
3237 | "value": "{{_device}}"
3238 | },
3239 | {
3240 | "key": "name",
3241 | "value": "audio.volume"
3242 | }
3243 | ]
3244 | },
3245 | "description": "Query the current status of the Webex RoomOS Device.\n\nSpecify the target device in the deviceId parameter in the URI.\n\nThe target device is queried for statuses according to the expression in the name parameter.\n\nSee the xAPI Guide for a description of status expressions.\n\nhttps://developer.webex.com/docs/api/v1/xapi/query-status"
3246 | },
3247 | "response": []
3248 | },
3249 | {
3250 | "name": "Execute Command (standby.deactivate)",
3251 | "event": [
3252 | {
3253 | "listen": "test",
3254 | "script": {
3255 | "id": "25963f6e-8094-448f-bfcf-fb54d1d7d90e",
3256 | "exec": [
3257 | "if (responseCode.code != 200) {",
3258 | " tests[\"List roles: failed\"] = false;",
3259 | "}",
3260 | "else {",
3261 | " tests[\"List roles: success\"] = true;",
3262 | " ",
3263 | " var jsonData = JSON.parse(responseBody);",
3264 | " if (jsonData.items === undefined) {",
3265 | " tests[\"List roles: cannot retreive result\"] = false",
3266 | " }",
3267 | " else {",
3268 | " var roleId = jsonData.items[0].id;",
3269 | " postman.setEnvironmentVariable(\"_role\", roleId);",
3270 | " tests[\"List roles: retreived with id:\" + roleId] = true",
3271 | " }",
3272 | "}"
3273 | ],
3274 | "type": "text/javascript"
3275 | }
3276 | }
3277 | ],
3278 | "request": {
3279 | "method": "POST",
3280 | "header": [
3281 | {
3282 | "key": "Authorization",
3283 | "value": "Bearer {{access_token}}"
3284 | }
3285 | ],
3286 | "body": {
3287 | "mode": "raw",
3288 | "raw": "{\r\n \"deviceId\" : \"{{_device}}\"\r\n}",
3289 | "options": {
3290 | "raw": {
3291 | "language": "json"
3292 | }
3293 | }
3294 | },
3295 | "url": {
3296 | "raw": "{{WEBEXAPI}}/xapi/command/standby.deactivate",
3297 | "host": [
3298 | "{{WEBEXAPI}}"
3299 | ],
3300 | "path": [
3301 | "xapi",
3302 | "command",
3303 | "standby.deactivate"
3304 | ]
3305 | },
3306 | "description": "Execute a command on the Webex RoomOS Device.\n\nSpecify the command to execute in the commandName parameter in the URI.\n\nSee the xAPI Guide for a description of command expressions.\n\nhttps://developer.webex.com/docs/api/v1/xapi/execute-command"
3307 | },
3308 | "response": []
3309 | },
3310 | {
3311 | "name": "Execute Command (message.alert)",
3312 | "event": [
3313 | {
3314 | "listen": "test",
3315 | "script": {
3316 | "id": "6d09dc28-c8af-4894-ac5d-8d2022720f32",
3317 | "exec": [
3318 | "if (responseCode.code != 200) {",
3319 | " tests[\"List roles: failed\"] = false;",
3320 | "}",
3321 | "else {",
3322 | " tests[\"List roles: success\"] = true;",
3323 | " ",
3324 | " var jsonData = JSON.parse(responseBody);",
3325 | " if (jsonData.items === undefined) {",
3326 | " tests[\"List roles: cannot retreive result\"] = false",
3327 | " }",
3328 | " else {",
3329 | " var roleId = jsonData.items[0].id;",
3330 | " postman.setEnvironmentVariable(\"_role\", roleId);",
3331 | " tests[\"List roles: retreived with id:\" + roleId] = true",
3332 | " }",
3333 | "}"
3334 | ],
3335 | "type": "text/javascript"
3336 | }
3337 | }
3338 | ],
3339 | "request": {
3340 | "method": "POST",
3341 | "header": [
3342 | {
3343 | "key": "Authorization",
3344 | "value": "Bearer {{access_token}}"
3345 | },
3346 | {
3347 | "key": "Content-Type",
3348 | "value": "application/json",
3349 | "type": "text"
3350 | }
3351 | ],
3352 | "body": {
3353 | "mode": "raw",
3354 | "raw": "{\r\n \"deviceId\": \"{{_device}}\",\r\n \"arguments\": {\r\n \"Duration\": 10,\r\n \"Title\": \"xAPI Cloud Test\",\r\n \"Text\": \"This is posted from Postman ;-) Change me!\"\r\n }\r\n}",
3355 | "options": {
3356 | "raw": {
3357 | "language": "json"
3358 | }
3359 | }
3360 | },
3361 | "url": {
3362 | "raw": "{{WEBEXAPI}}/xapi/command/userinterface.message.alert.display",
3363 | "host": [
3364 | "{{WEBEXAPI}}"
3365 | ],
3366 | "path": [
3367 | "xapi",
3368 | "command",
3369 | "userinterface.message.alert.display"
3370 | ]
3371 | },
3372 | "description": "Execute a command on the Webex RoomOS Device.\n\nSpecify the command to execute in the commandName parameter in the URI.\n\nSee the xAPI Guide for a description of command expressions.\n\nhttps://developer.webex.com/docs/api/v1/xapi/execute-command"
3373 | },
3374 | "response": []
3375 | }
3376 | ],
3377 | "protocolProfileBehavior": {}
3378 | }
3379 | ],
3380 | "event": [
3381 | {
3382 | "listen": "prerequest",
3383 | "script": {
3384 | "id": "0d3602d6-7436-47d8-a84d-3c1e9f0164c6",
3385 | "type": "text/javascript",
3386 | "exec": [
3387 | ""
3388 | ]
3389 | }
3390 | },
3391 | {
3392 | "listen": "test",
3393 | "script": {
3394 | "id": "4e2d13ee-6ff9-46d7-bc35-97b06d2d31cf",
3395 | "type": "text/javascript",
3396 | "exec": [
3397 | ""
3398 | ]
3399 | }
3400 | }
3401 | ],
3402 | "variable": [
3403 | {
3404 | "id": "60dc6ff1-e95d-4544-8a01-b87d823cc124",
3405 | "key": "WEBEXAPI",
3406 | "value": "https://webexapis.com/v1"
3407 | }
3408 | ],
3409 | "protocolProfileBehavior": {}
3410 | }
--------------------------------------------------------------------------------