Cisco Webex Programmability Explained
1. Webex REST API
The Webex REST API allows developers to interact with Webex services programmatically. It provides a set of HTTP endpoints that can be used to create, read, update, and delete resources such as meetings, messages, and teams. The API uses standard HTTP methods like GET, POST, PUT, and DELETE to perform these operations.
Example: Imagine you are building a custom dashboard for your organization that displays upcoming meetings. You can use the Webex REST API to fetch the list of meetings and display them on your dashboard. The API call might look something like this:
GET https://api.ciscospark.com/v1/meetings Authorization: Bearer YOUR_ACCESS_TOKEN
2. Webex Webhooks
Webex Webhooks are a way to receive real-time notifications about events that occur in your Webex organization. Instead of polling the API for changes, you can set up webhooks to receive notifications when specific events happen, such as a new message being posted in a room or a meeting being scheduled. Webhooks are triggered by events and send HTTP POST requests to a specified URL with the event details.
Example: Suppose you want to be notified whenever a new message is posted in a specific Webex room. You can create a webhook that listens for the "created" event on messages and sends a notification to your server. The webhook configuration might look like this:
POST https://api.ciscospark.com/v1/webhooks Content-Type: application/json Authorization: Bearer YOUR_ACCESS_TOKEN { "name": "New Message Webhook", "targetUrl": "https://yourserver.com/webhook", "resource": "messages", "event": "created" }