← Lab 10 | Index | Lab 12 →

Lab 11 - Let's go

Last modified: Mon, 19 Jun 2023

Table of Contents

Topic Lab Type Difficulty Level Estimated length
Introduction to the New Webex CC APIs Practical Lab MID 25 min
Reporting APIs Practical Lab MID 25 min
Call Recording APIs Practical Lab EASY 15 min
Configuration APIs Practical Lab MID 20 min
Search API Practical Lab MID 25 min
Agent Desktop APIs Practical Lab MID 25 min

Introduction

Important: Changes to the API Lab.

All New Webex Contact Center APIs (New Version)


Introduction to the New Webex CC APIs

This is the introduction video. It explains what API we have, what application and authorization mechanisms exist and how to get started.

📺 Introduction Video

1. Walkthrough of Auth Flow

Here is a summary:

API Access — create an Integration

Authorization: Bearer yourAccessToken

By default, the access_token is valid for 12 hours and the refresh token is valid for 60 days. However, using another call for the refresh token will give you a new set of tokens. Maintaining this access is important for perpetual access. One can write a simple scheduler that performs this background refresh activity.

OAuth2 Mechanism — Implications

OAuth2 Access Token Flow

GET https://webexapis.com/v1/authorize?client_id=______&response_type=code&redirect_uri=https://your-app/auth&scope=cjp:config_read&state=set_state_here
GET https://your-app/auth?code=___unique_code_sent
POST https://webexapis.com/v1/access_token
Content-Type: application/x-www-form-urlencoded

Example response:

{
  "access_token": "ZDI3MGEyYzQtNmFlNS00NDNhLWFlNzAtZGVjNjE0MGU1OGZmZWNmZDEwN2ItYTU3",
  "expires_in": 1209600,
  "refresh_token": "MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTEyMzQ1Njc4",
  "refresh_token_expires_in": 7776000
}

Expiry in seconds. Required x-www-form-urlencoded values include:

2. Initial Setup of Sample App


Reporting APIs

In this video we will go through the developer portal and execute your first API calls through Postman.

📺 Reporting APIs Video

1. Executing "Get Tasks" API

The same request can be drafted on Postman using your personal Bearer Token.

Example of a GET Task: https://api.wxcc-us1.cisco.com/v1/tasks

2. Executing "Get Queue Statistics" API

To try this out in Postman follow the steps outlined in the previous example.

3. Executing "Get Agent Activities" API

To try this out in Postman follow the steps outlined in the previous example.

4. Executing "Get Agent Statistics" API

To try this out in Postman follow the steps outlined in the previous example.


Call Recording APIs

In this video we will concentrate on "Captures" API. Captures are audio recordings that can be downloaded through API.

📺 Call Recording APIs Video

Working with "List Captures" API

To try this out in Postman follow the steps outlined in the previous example.


Configuration APIs

This is the bonus section of New WxCC APIs where you will be able to create/change settings in the Webex Contact Center by using the Configuration APIs.

📺 Configuration APIs Video

1. Creating a Site with "Create Sites" API

To try this out in Postman follow the steps outlined in the previous example.

2. Changing the Site name with "Update Site By ID" API

To try this out in Postman follow the steps outlined in the previous example.

3. Practicing with Bulk Upload

Follow the instructions in the video to use Postman and create multiple sites using a CSV file.


Search API

📺 Search API Video

1. Search endpoint in developer portal

2. Forming a GraphQL query

3. Running the query

NOTE: Change filters and aggregation values according to your tenant.


Agent Desktop APIs

📺 Agent Desktop APIs Video

2. Importing Postman collection and setting up OAuth2

3. Establish a WebSocket connection

4. Login an agent

5. Change state of an agent

6. Reload an agent

7. Logout an agent


Quick Reference: Key URLs

Resource URL
Developer Portal https://developer.webex-cx.com
Auth endpoint https://webexapis.com/v1/authorize
Token endpoint https://webexapis.com/v1/access_token
Tasks (US1) https://api.wxcc-us1.cisco.com/v1/tasks
Search API docs https://developer.webex-cx.com/documentation/search
Sample Apps repo https://github.com/CiscoDevNet/webex-contact-center-api-samples
GraphQL Samples https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/reporting-samples/graphql-sample
Desktop Postman Collection https://github.com/CiscoDevNet/webex-contact-center-api-samples/blob/main/desktop-api-sample/WebexCC Desktop APIs - Sample.postman_collection.json
Cisco TechZone — Integration setup https://www.cisco.com/c/en/us/support/docs/contact-center/webex-contact-center/218418-configure-webex-contact-center-apis-with.html
Epoch Converter https://www.epochconverter.com

Congratulations, you have completed this lab! You can continue with the next one.

→ Lab 12 - Digital Channels

Powered by Forestry.md