Mais conteúdo relacionado Semelhante a Webex APIs for Administrators - CL20B - DEVNET-2610 (20) Mais de Cisco DevNet (20) Webex APIs for Administrators - CL20B - DEVNET-26102. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
/Cisco/DevNet/SteveSfartz
• API Architect at Cisco DevNet
• Working to deliver the greatest API Experience for Cisco’s
developer community
• Lead for Cisco’s API Style Guide aiming for simplicity and
consistency
• Webex Teams & Devices APIs
• Contributor to DevNet Code & Automation Exchange
• postman collections forWebexTeams & DevicesAPIs
• awesome-webex, awesome-xapi
• code samples & dev tools
“vision without
execution is
hallucination”
webex: stsfartz@cisco.com
github: ObjectIsAdvantag
twitter: @SteveSfartz
DEVNET-2610 2
3. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
• RESTAPI forWebex Administrators
• OAuth deep dive forWebex Administrators
• Cloud xAPI for Webex Devices
• CustomizingWebex Devices
Agenda
DEVNET-2610 3
5. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
https://admin.webex.com
DEVNET-2610 5
6. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Webex Admin Sandbox
• Send an email to devsupport@webex.com
from aWebexTrial account: this email address should not have been previously used forWebex.Your home
email address or a web email service is recommended.
Developer support will add your account to the AdminSandbox organization
As your new admin account is created, you will receive an email inviting you to administer the Sandbox
organization. Follow the instructions to complete the activation.
• You are now an admin of the ‘Sandbox’ organization, along with others developers who’ve
been granted access
https://developer.webex.com/docs/api/guides/admin-api/administration-sandbox
DEVNET-2610 6
7. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Webex API for Administrators
/people
/organizations
s
/roles /licenses /policies
/adminaudit/e
events
/events
List People List Organizations List Roles List Licenses List Policies List Events List Events
Create a Person Create a Policy
Get details Get details Get details Get details Get Details Get Event Details
Update aPerson Update a Policy
Delete a Person Delete a Policy
GET GET GET GET
GET GET GETGET
POST
DELETE
PUT
GET
GET
POST
DELETE
PUT
GET
including Partner Organizations
GET
GET
EFT
compliance
officers
DEVNET-2610 7
10. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Terminology of a REST API query
GET /../repos?page=1 HTTP/1.1 accept: application/json
HTTP 200 OK
browser api.github.com:443
method path protocol
status code
https://api.github.com/users/CiscoDevNet/repos?page=1&per_page=2
headers
URL:
response body
HTTP
request
HTTP
response
api endpoint
JSON payload
parameters
DEVNET-2610 10
11. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
method url
status codecontent-type
response body
DEVNET-2610 11
12. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Postman collections forWebex
API Network - postman-webex on DevNet CodeExchange
CHECK all collections for Cisco APIs:
https://explore.postman.com/team/ciscodevnet
DEVNET-2610 12
14. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
curl - assigning Licenses toWebex users
• Pick a Person id, Licenses, update the Person with a PUT /people/<id>
DEVNET-2610 14
16. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
All set ?
https://developer.webex.com/docs/api/v1/licenses/list-licenses
DEVNET-2610 16
17. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
All set ?
https://developer.webex.com/docs/api/v1/licenses/list-licenses
DEVNET-2610 17
19. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Testing
Thanks to your developer token, you can invoke
Webex APIs under your own identity
Webex API AccessTokens
lasts 12 hours
embeds all your scopes
/!
DEVNET-2610 19
20. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Admin Roles
• As an administrator, you can assign
roles to individual users
• The same set of permissions applies
when these users invoke the Webex
Admin APIs
DEVNET-2610 20
21. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Administrator privileges…. to OAuth scopes
DEVNET-2610 21
22. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Guest Account
For non-Webex users to use Webex Messaging,
Calling and Meeting services
Bot Account
Your code behaves under a machine identity,
identifiable from standard Webex users
Testing
Thanks to your developer token, you can invoke
Webex APIs under your own identity
Integration
Request permissions (OAuth) to invoke Webex APIs
on behalf of another’s user identity
Webex API AccessTokens
DEVNET-2610 22
23. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco PublicDEVNET-2610 23
25. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
OAuth Flow Summary
duittenb
1. Application requests an auth code
redirecting user to Webex Login allow access
with a set of OAuth scopes
4. Application receives access token
and refresh token
2. Webex returns the auth code
redirecting user to the Application
3. Request an API access token
from the authorization code, with the granted scopes
Your App
Webex cloud
DEVNET-2610 25
26. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Register Application: Create
duittenb@cisco.com
duittenb@cisco.com
1
2
3
https://developer.webex.com/apps.html
DEVNET-2610 26
27. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
duittenb@cisco.com
Register Application: Access Scope
Scopes define the level of
access that your app requires.
This is the list of scopes and
their user-facing descriptions
as shown in the permission
dialog.
4
DEVNET-2610 27
28. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Register Application: Registered!
duittenb@cisco.com
5
DEVNET-2610 28
29. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
https://developer.cisco.com/learning/tracks/collab-cloud
DEVNET-2610 29
31. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
‘Device’ Admin Role at Control Hub
• Manage Places & Devices
DEVNET-2610 31
32. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
CE and RoomOS
CE
on-premises specific
features
versionned
(ex: 9.6.4, 9.7.1, 9.10…)
RoomOS
cloud-registered devices
specific features
continuous delivery
(via channels)
Cisco Collaboration Endpoint Software
version freeze
DEVNET-2610 32
33. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
CE and RoomOS
CE
on-premises specific
features
versionned
(ex: 9.6.4, 9.7.1, 9.10…)
RoomOS
cloud-registered devices
specific features
continuous delivery
(via channels)
Cisco Collaboration Endpoint Software
version freeze
xAPI over LAN
for all devices (HTTP,
ssh, websockets)
/xapi RESTAPI
for cloud-registered &
cloud-linked devices
DEVNET-2610 33
34. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cloud APIs for Webex Devices
/devices /places /xapi
List Devices List Places Query Status
Activation code Create a Place Execute Command
Get details Get Place details
Update a Place
Delete a Device Delete a Place
GET GET GET
GET
POST
DELETE
POST
PUT
DELETE
GET
POST
Associated scopes for Webex
administrators:
• spark-admin:devices_read
• spark-admin:devices_write
• spark-admin:places_read
• spark-admin:places_write
• spark:xapi_statuses
• spark:xapi_commands
DEVNET-2610 34
35. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Collaboration Devices Programmability
Available on all devices running CE & RoomOS
Room Kit standard, pro, mini
*no Macros on SX10
Complete programmability
DX, Desk Pro
DEVNET-2610 35
36. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
CE Programmability at a glance
• Automate your devices from
code
• initiate calls, fetch history
• update branding
• room analytics
• Add In-Room Controls to the
Touch10 (or DX) interface
• Enhanced user Experience for your
meetings
• Interact with IoT devices
DEVNET-2610 36
37. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Personalization via Postman
DEVNET-2610 37
38. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Personalization: Brand logo (awake) via Postman
Your logo
272x272
Example:
https://www.base64-image.de/
Turn your image (PNG, 272px272p) to base64 bytes
Remove heading string (such as ‘data:image/png;base64’)
Forge XML PUT request in Postman
544523454353
BVHhe7d2/WuJ
MH8b…x4T0W
sNjLI4hCYII=
DEVNET-2610 38
39. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
CHECK all collections for Cisco APIs:
https://explore.postman.com/team/ciscodevnet
DEVNET-2610 39
40. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
CE Programmability (xAPI)
configure events
Macros
(JavaScript)
status
command
over ssh,
Websocket,
serial, or
HTTP*
deploy
UI Extensions Editor
Standalone
(JavaScript, Python…)
Touch Interfaces
Detailed in
DEVNET-2071
DEVNET-2610 40
41. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Deployment strategies
Inject topology and secrets along the CI/CD pipeline
CE device
UI Extensions
Macros
Manifest as ‘admin’
Macro
UIExtensions
DeployInject
Scripts (curl,
python, JS…)
UI Customizations
(panel names, colors, I18N)
MacroConfiguration
(secrets, topology)
Device Configuration
(HttpClient Mode:On)
Git Commit
Devices DB
User Preferences
Secrets
DB &Vault
1 2
/! static
re-run CI/CD as
changes are
needed.
Detailed in
BRKDEV-3244
DEVNET-2610 41
42. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
CE Programmability &Webex Devices APIs
• Tuesday, 10:00 – ‘Meet DevNet’ podium - DEVNET-3010.f
• Learn how to make Network Automation Simple with theCommunity
• Wednesday, 12:15 – Hall 8, C128 - BRKDEV-3244
• Advanced coding for CiscoVideo devices
• Wednesday, 15:00 – ClassRoom 3 - DEVNET-2071
• CustomizingCisco Collaboration Devices
• Thursday, 10:00 – DevNet Theater - DEVNET-1462
• Webex Room Device APIs (latest features)
• Friday, 11:30 - Hall 8, A103 - BRKCOL-3008
• Customization and Integrations of CiscoVideo Room Devices
DEVNET-2610 42
43. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
xAPI module at DevNet
https://learninglabs.cisco.com/modules/xapi-intro
DEVNET-2610 43
44. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
https://developer.cisco.com/site/sandbox/
DEVNET-2610 44
45. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
DevNet Sandboxes
DVNET-2610 45
46. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
https://github.com/CiscoDevNet/awesome-xapi
Join the ‘xAPI Devs’Teams
Space
http://bit.ly/join-xapi-devs
DEVNET-2610 46
47. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Join the #webex4devs
Teams Space
developer.webex.com/support
https://github.com/CiscoDevNet/awesome-webex
DEVNET-2610 47
48. Learn more about the new DevNet Certifications
and how you can prepare now!
Specialist LevelAssociate Level Professional Level Expert Level
Engineering
Software
Future
Offering