APIs - REST API Basics _ Webex for Developers
APIs - REST API Basics _ Webex for Developers
Webex REST
API Basics
While working with the
Webex REST API is easy,
there are a few things we
standardize on throughout
the API, such as pagination of
long result sets or HTTP
response codes.
Pagination
By As
continuing
adoptiontoofuse our website,
Webex you
continues to acknowledge
grow, the use of cookies.
so does the amount of content being
Privacy Statement Change Settings
shared by team members. We've
addressed this in the Webex APIs by
including support for pagination.
Navigating Pages
The Webex APIs implement the RFC5988
(Web Linking)
(http://tools.ietf.org/html/rfc5988)
standard for pagination. When requesting
a list of resources the response may
contain a Link header containing the
URLs to the first, next, and previous page.
Link: <https://webexapis.com/v1/
By Please
continuing
notetothat
useonly
our the
website, you acknowledge the use of cookies.
rel="next"
link header is guaranteed at this time. We
Privacy Statement Change Settings
may include other link types, that are
defined in the RFC5988 (Web Linking)
standard, in the future.
Message Attachments
import requests
from requests_toolbelt.multipart
m = MultipartEncoder({'roomId':
'text': 'e
'files': (
'image/png
r = requests.post('https://webex
headers={'Auth
'Content-Type'
print r.text
curl --request POST \
--header "Authorization: Beare
--header "Content-Type: applic
--data '{"roomId":"Y2lzY2.....
https://webexapis.com/v1/messa
curl -I https://webexapis.com/v1
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Disposition: attachment;
Content-Length: 44752
Content-Type: image/png
curl -H "Authorization: Bearer A
Anti-Malware Scanning
Organizations may enable anti-malware
scanning of files
(https://help.webex.com/yr6g4bb/) in
Webex to protect users from malicious
files.
If a file is subject to evaluation, it will be
quarantined and scanned. While the file is
under evaluation, requests to retrieve the
file will fail with a 423 Locked HTTP
response. A Retry-After header in the
response will indicate when the request
should be attempted again. There is no
guarantee that the malware scan will have
finished during the retry interval and you
may need to retry again. The retry-after
time is aligned with the majority of scans
that are done on an average basis.
Formatting Messages
Paragraph 1\n\nParagraph 2
Line 1 \nLine 2
Bold
**Title:** Add support for multi
**Status:** Closed
This is *the best* launch we've
Links
Should we try the sushi place fo
- [Oh yea!](http://example.com/p
- [Ewww Sushi](http://example.co
- [Not today](http://example.com
Ordered Lists
Use a number, followed by a dot or right
parenthesis and then a space to create an
ordered list entry.
Priorities for the week are:
1. Collect Underpants
2. ???
3. Profit
Unordered Lists
Use a * or - followed by a space to
create an unordered list entry.
Good morning Joe Fu. Here's your
- Review that really important t
- Meet Jason for lunch.
- Buy a new shirt. The one you'r
Joe's to do list:
* Buy ato new
By continuing shirt.
use our website, you acknowledge the use of cookies.
* With buttons.
Privacy Statement Change Settings
* And a collar!
Block Quotes
Alice, last week you said:
> I don't care what it costs. Le
In-Line Code
Mike, I think the issue is with
Hello world in golang:
```
package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}
```
Mentions
Just like in the Webex clients, @mentions
(https://help.webex.com/p5k20o/) can
be used in messages to get someone's
attention in a group room. To @mention
someone, use one of the following
methods to specify the person or group of
people:
Mention by Email
Hi <@personEmail:banderson@examp
By continuing to use our website, you acknowledge the use of cookies.
Mention by Person ID
We should get <@personId:Y2lzY29
Mention by Group
<@all>, we have some exciting ne
Rate Limiting
The Webex API rate limits requests to
maintain appropriate service levels for all
Webex API users. The rate limiting
policies in place are fine-grained and
often overlap and are therefore too
complex to document exactly. The
following provides general information for
handling rate limiting errors, as well as
upper limits for commonly used API use
cases. It also provides recommendations
for running and automating large API
workloads.
HTTP/1.1 429 Too Many Requests\
Content-Type: text/html\
Retry-After: 3600
API Errors
200 OK Successful
request with
body content.
By continuing to use our website, you acknowledge the use of cookies.
201 Created The request
Privacy Statement Change Settings
has succeeded
and has led to
the creation of
a resource.
Privacy
423 Statement
Locked Change
TheSettings
requested
resource is
temporarily
unavailable. A
Retry-After
header may be
present that
specifies how
many seconds
you need to
wait before
attempting the
request again.
Code Status Description
{
"items": [
{
"id": "Y2lzY29zcGFyazovL3V
"title": "Project Unicorn
"type": "group",
"isLocked": true,
"teamId": "Y2lzY29zcGFyazo
"lastActivity": "2016-04-2
"created": "2016-04-21T19:
},
{
"id": "Y2lzY29zcGFyazovL3V
"title": "eyJhbGciOiIiLCJr
"errors": {
"title": {
"code": "kms_failure",
"reason": "Key managem
}
}
}
]
}
Error Codes
By continuing to use our website, you acknowledge the use of cookies.
The following table describes the errors
Privacy
whichStatement Change
may be returned Settings
by the API:
Code Reason Description
Java 1.7
PHP 5.3
Python 2.7.9, Python 3
Ruby (net/http) 2.0
cURL 7.18.1
wget 1.14
©
ﰢ ﴍ
2023
(https://github.com/webex) (https://www.facebook.com/CiscoCollab/) (https://twitter.com/webexdevs) (https://youtube.com/c/webex) (https://www.linkedin.com/compa
Cisco
and/or
its
affiliates.
All rights
reserved.