User API Doc

WebexAPI

The WebexAPI class creates “connection objects” for working with the Webex APIs and hierarchically organizes the Webex APIs and their endpoints underneath these connection objects.

WebexAPI

access_tokens

get() refresh()

admin_audit_events

list()

attachment_actions

create() get()

events

list() get()

guest_issuer

create()

licenses

list() create()

memberships

list() create() get() update() delete()

messages

list() list_direct() create() get() delete()

organizations

list() create()

people

list() create() get() update() me()

roles

list() create()

rooms

list() create() get() get_meeting_info() update() delete()

team_memberships

list() create() get() update() delete()

teams

list() create() get() update() delete()

webhooks

list() create() get() update() delete()

class WebexAPI[source]

Webex API wrapper.

Creates a ‘session’ for all API calls through a created WebexAPI object. The ‘session’ handles authentication, provides the needed headers, and checks all responses for error conditions.

WebexAPI wraps all of the individual Webex APIs and represents them in a simple hierarchical structure.

__init__(access_token=None, base_url='https://webexapis.com/v1/', single_request_timeout=60, wait_on_rate_limit=True, object_factory=<function immutable_data_factory>, client_id=None, client_secret=None, oauth_code=None, redirect_uri=None, proxies=None, be_geo_id=None, caller=None, disable_ssl_verify=False)[source]

Create a new WebexAPI object.

An access token must be used when interacting with the Webex API. This package supports three methods for you to provide that access token:

  1. You may manually specify the access token via the access_token argument, when creating a new WebexAPI object.

  2. If an access_token argument is not supplied, the package checks for a WEBEX_ACCESS_TOKEN environment variable.

  3. Provide the parameters (client_id, client_secret, oauth_code and oauth_redirect_uri) from your oauth flow.

An AccessTokenError is raised if an access token is not provided via one of these two methods.

Parameters:
  • access_token (str) – The access token to be used for API calls to the Webex service. Defaults to checking for a WEBEX_ACCESS_TOKEN environment variable.

  • base_url (str) – The base URL to be prefixed to the individual API endpoint suffixes. Defaults to webexpythonsdk.DEFAULT_BASE_URL.

  • single_request_timeout (int) – Timeout (in seconds) for RESTful HTTP requests. Defaults to webexpythonsdk.config.DEFAULT_SINGLE_REQUEST_TIMEOUT.

  • wait_on_rate_limit (bool) – Enables or disables automatic rate-limit handling. Defaults to webexpythonsdk.config.DEFAULT_WAIT_ON_RATE_LIMIT.

  • object_factory (callable) – The factory function to use to create Python objects from the returned Webex JSON data objects.

  • client_id (str) – The client id of your integration. Provided upon creation in the portal.

  • client_secret (str) – The client secret of your integration. Provided upon creation in the portal.

  • oauth_code (str) – The oauth authorization code provided by the user oauth process.

  • oauth_redirect_uri (str) – The redirect URI used in the user OAuth process.

  • proxies (dict) – Dictionary of proxies passed on to the requests session.

  • be_geo_id (str) – Optional partner identifier for API usage tracking. Defaults to checking for a BE_GEO_ID environment variable.

  • caller (str) – Optional identifier for API usage tracking. Defaults to checking for a WEBEX_PYTHON_SDK_CALLER environment variable.

  • disable_ssl_verify (bool) – Optional boolean flag to disable ssl verification. Defaults to False. If set to True, the requests session won’t verify ssl certs anymore.

Returns:

A new WebexAPI object.

Return type:

WebexAPI

Raises:
  • TypeError – If the parameter types are incorrect.

  • AccessTokenError – If an access token is not provided via the access_token argument or an environment variable.

property single_request_timeout

Timeout (in seconds) for an single HTTP request.

property wait_on_rate_limit

Automatic rate-limit handling enabled / disabled.

access_tokens = <webexpythonsdk.api.access_tokens.AccessTokensAPI object>
classmethod from_oauth_code(client_id, client_secret, code, redirect_uri)[source]

Create a new WebexAPI connection object using an OAuth code.

Exchange an Authorization Code for an Access Token, then use the access token to create a new WebexAPI connection object.

Parameters:
  • client_id (str) – Provided when you created your integration.

  • client_secret (str) – Provided when you created your integration.

  • code (str) – The Authorization Code provided by the user OAuth process.

  • redirect_uri (str) – The redirect URI used in the user OAuth process.

Returns:

A new WebexAPI object initialized with the access token from the OAuth Authentication Code exchange.

Return type:

WebexAPI

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

classmethod from_oauth_refresh(client_id, client_secret, refresh_token)[source]

Create a new WebexAPI connection object using an OAuth refresh.

Exchange a refresh token for an Access Token, then use the access token to create a new WebexAPI connection object.

Parameters:
  • client_id (str) – Provided when you created your integration.

  • client_secret (str) – Provided when you created your integration.

  • refresh_token (str) – Provided when you requested the Access Token.

Returns:

A new WebexAPI object initialized with the access token from the OAuth Refresh Token exchange.

Return type:

WebexAPI

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

access_tokens

class AccessTokensAPI[source]

Webex Access-Tokens API.

Wraps the Webex Access-Tokens API and exposes the API as native Python methods that return native Python objects.

property base_url

The base URL the API endpoints.

property single_request_timeout

Timeout in seconds for the API requests.

get(client_id, client_secret, code, redirect_uri)[source]

Exchange an Authorization Code for an Access Token.

Exchange an Authorization Code for an Access Token that can be used to invoke the APIs.

Parameters:
  • client_id (str) – Provided when you created your integration.

  • client_secret (str) – Provided when you created your integration.

  • code (str) – The Authorization Code provided by the user OAuth process.

  • redirect_uri (str) – The redirect URI used in the user OAuth process.

Returns:

An AccessToken object with the access token provided by the Webex cloud.

Return type:

AccessToken

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

refresh(client_id, client_secret, refresh_token)[source]

Return a refreshed Access Token from the provided refresh_token.

Parameters:
  • client_id (str) – Provided when you created your integration.

  • client_secret (str) – Provided when you created your integration.

  • refresh_token (str) – Provided when you requested the Access Token.

Returns:

With the access token provided by the Webex cloud.

Return type:

AccessToken

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

admin_audit_events

class AdminAuditEventsAPI[source]

Admin Audit Events API.

Wraps the Webex Admin Audit Events API and exposes the API as native Python methods that return native Python objects.

list(orgId, _from, to, actorId=None, max=100, offset=0, **request_parameters)[source]

List Organizations.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all audit events returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • orgId (str) – List events in this organization, by ID.

  • _from (str) – List events which occurred after a specific date and time.

  • to (str) – List events which occurred before a specific date and time.

  • actorId (str) – List events performed by this person, by ID.

  • max (int) – Limit the maximum number of events in the response. The maximum value is 200.

  • offset (int) – Offset from the first result that you want to fetch.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the organizations returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

attachment_actions

class AttachmentActionsAPI[source]

Webex Attachment Actions API.

Wraps the Webex Attachment Actions API and exposes the API as native Python methods that return native Python objects.

create(type, messageId, inputs, **request_parameters)[source]

Create a new attachment action.

Parameters:
  • type (str) – The type of action to perform.

  • messageId (str) – The ID of the message which contains the attachment.

  • inputs (dict) – The attachment action’s inputs.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A attachment action object with the details of the created attachment action.

Return type:

AttachmentAction

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

  • ValueError – If the files parameter is a list of length > 1, or if the string in the list (the only element in the list) does not contain a valid URL or path to a local file.

get(id)[source]

Get the details for a attachment action, by ID.

Parameters:

id (str) – A unique identifier for the attachment action.

Returns:

A Attachment Action object with the details of the requested attachment action.

Return type:

AttachmentAction

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

events

class EventsAPI[source]

Webex Events API.

Wraps the Webex Events API and exposes the API as native Python methods that return native Python objects.

list(resource=None, type=None, actorId=None, _from=None, to=None, max=None, **request_parameters)[source]

List events.

List events in your organization. Several query parameters are available to filter the response.

Note: from is a keyword in Python and may not be used as a variable name, so we had to use _from instead.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all events returned by the query. The generator will automatically request additional ‘pages’ of responses from Wevex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • resource (str) – Limit results to a specific resource type. Possible values: “messages”, “memberships”.

  • type (str) – Limit results to a specific event type. Possible values: “created”, “updated”, “deleted”.

  • actorId (str) – Limit results to events performed by this person, by ID.

  • _from (str) – Limit results to events which occurred after a date and time, in ISO8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ).

  • to (str) – Limit results to events which occurred before a date and time, in ISO8601 format (yyyy-MM-dd’T’HH:mm:ss.SSSZ).

  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the events returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(eventId)[source]

Get the details for an event, by event ID.

Parameters:

eventId (str) – The ID of the event to be retrieved.

Returns:

A event object with the details of the requested room.

Return type:

Event

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

guest_issuer

class GuestIssuerAPI[source]

Webex Guest Issuer API.

Wraps the Webex Guest Issuer API and exposes the API as native methods that return native Python objects.

create(sub, name, iss, exp, secret)[source]

Create a new guest issuer using the provided issuer token.

This function returns a guest issuer with an api access token.

Parameters:
  • sub (str) – The subject of the token. This is your unique and public identifier for the guest user. This claim may contain only letters, numbers, and hyphens.

  • name (str) – The display name of the guest user. This will be the name shown in Webex clients.

  • iss (str) – The issuer of the token. Use the Guest Issuer ID provided in My Webex Apps.

  • exp (str) – The exp time of the token, as a UNIX timestamp in seconds. Use the lowest practical value for the use of the token. This is not the exp time for the guest user’s session.

  • secret (str) – Use the secret Webex provided you when you created your Guest Issuer App. The secret will be used to sign the token request.

Returns:

A Guest Issuer token with a valid access token.

Return type:

GuestIssuerToken

Raises:
  • TypeError – If the parameter types are incorrect

  • ApiError – If the webex teams cloud returns an error.

licenses

class LicensesAPI[source]

Webex Licenses API.

Wraps the Webex Licenses API and exposes the API as native Python methods that return native Python objects.

list(orgId=None, **request_parameters)[source]

List all licenses for a given organization.

If no orgId is specified, the default is the organization of the authenticated user.

Parameters:
  • orgId (str) – Specify the organization, by ID.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the licenses returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(licenseId)[source]

Get the details of a License, by ID.

Parameters:

licenseId (str) – The ID of the License to be retrieved.

Returns:

A License object with the details of the requested License.

Return type:

License

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

memberships

class MembershipsAPI[source]

Webex Memberships API.

Wraps the Webex Memberships API and exposes the API as native Python methods that return native Python objects.

list(roomId=None, personId=None, personEmail=None, max=None, **request_parameters)[source]

List room memberships.

By default, lists memberships for rooms to which the authenticated user belongs.

Use query parameters to filter the response.

Use roomId to list memberships for a room, by ID.

Use either personId or personEmail to filter the results.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • roomId (str) – Limit results to a specific room, by ID.

  • personId (str) – Limit results to a specific person, by ID.

  • personEmail (str) – Limit results to a specific person, by email address.

  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the memberships returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(roomId, personId=None, personEmail=None, isModerator=False, **request_parameters)[source]

Add someone to a room by Person ID or email address.

Add someone to a room by Person ID or email address; optionally making them a moderator.

Parameters:
  • roomId (str) – The room ID.

  • personId (str) – The ID of the person.

  • personEmail (str) – The email address of the person.

  • isModerator (bool) – Set to True to make the person a room moderator.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Membership object with the details of the created membership.

Return type:

Membership

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(membershipId)[source]

Get details for a membership, by ID.

Parameters:

membershipId (str) – The membership ID.

Returns:

A Membership object with the details of the requested membership.

Return type:

Membership

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(membershipId, isModerator=None, **request_parameters)[source]

Update properties for a membership, by ID.

Parameters:
  • membershipId (str) – The membership ID.

  • isModerator (bool) – Set to True to make the person a room moderator.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Membership object with the updated Webex membership details.

Return type:

Membership

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(membershipId)[source]

Delete a membership, by ID.

Parameters:

membershipId (str) – The membership ID.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

messages

class MessagesAPI[source]

Webex Messages API.

Wraps the Webex Messages API and exposes the API as native Python methods that return native Python objects.

list(roomId, parentId=None, mentionedPeople=None, before=None, beforeMessage=None, max=50, **request_parameters)[source]

Lists messages in a room.

Each message will include content attachments if present.

The list API sorts the messages in descending order by creation date.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all messages returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • roomId (str) – List messages for a room, by ID.

  • parentId (str) – List messages with a parent, by ID.

  • mentionedPeople (str) – List messages where the caller is mentioned by specifying “me” or the caller personId.

  • before (str) – List messages sent before a date and time, in ISO8601 format.

  • beforeMessage (str) – List messages sent before a message, by ID.

  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the messages returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

list_direct(personId=None, personEmail=None, parentId=None, **request_parameters)[source]

List all messages in a 1:1 (direct) room.

Use the personId or personEmail query parameter to specify the room.

The list API sorts the messages in descending order by creation date.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all messages returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • personId (str) – List messages in a 1:1 room, by person ID.

  • personEmail (str) – List messages in a 1:1 room, by person email.

  • parentId (str) – List messages with a parent, by ID.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the messages returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(roomId=None, parentId=None, toPersonId=None, toPersonEmail=None, text=None, markdown=None, files=None, attachments=None, **request_parameters)[source]

Post a message to a room.

The files parameter is a list, which accepts multiple values to allow for future expansion, but currently only one file may be included with the message.

Parameters:
  • roomId (str) – The room ID.

  • toPersonId (str) – The ID of the recipient when sending a private 1:1 message.

  • toPersonEmail (str) – The email address of the recipient when sending a private 1:1 message.

  • text (str) – The message, in plain text. If markdown is specified this parameter may be optionally used to provide alternate text for UI clients that do not support rich text.

  • markdown (str) – The message, in markdown format.

  • files (list) – A list of public URL(s) or local path(s) to files to be posted into the room. Only one file is allowed per message.

  • attachments (list) – Content attachments to attach to the message. See the Cards Guide for more information.

  • parentId (str) – The parent message to reply to. This will start or reply to a thread.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Message object with the details of the created message.

Return type:

Message

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

  • ValueError – If the files parameter is a list of length > 1, or if the string in the list (the only element in the list) does not contain a valid URL or path to a local file.

get(messageId)[source]

Get the details of a message, by ID.

Parameters:

messageId (str) – The ID of the message to be retrieved.

Returns:

A Message object with the details of the requested message.

Return type:

Message

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(messageId)[source]

Delete a message.

Parameters:

messageId (str) – The ID of the message to be deleted.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(messageId=None, roomId=None, text=None, markdown=None)[source]

Update (edit) a message.

Parameters:
  • messageId (str) – The ID of the message to be edit.

  • roomId (str) – The room ID.

  • text (str) – The message, in plain text. If markdown is specified this parameter may be optionally used to provide alternate text for UI clients that do not support rich text.

  • markdown (str) – The message, in markdown format.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

edit(messageId=None, roomId=None, text=None, markdown=None)

Update (edit) a message.

Parameters:
  • messageId (str) – The ID of the message to be edit.

  • roomId (str) – The room ID.

  • text (str) – The message, in plain text. If markdown is specified this parameter may be optionally used to provide alternate text for UI clients that do not support rich text.

  • markdown (str) – The message, in markdown format.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

organizations

class OrganizationsAPI[source]

Webex Organizations API.

Wraps the Webex Organizations API and exposes the API as native Python methods that return native Python objects.

list(**request_parameters)[source]

List Organizations.

Parameters:

**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the organizations returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(orgId)[source]

Get the details of an Organization, by ID.

Parameters:

orgId (str) – The ID of the Organization to be retrieved.

Returns:

An Organization object with the details of the requested organization.

Return type:

Organization

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

people

class PeopleAPI[source]

Webex People API.

Wraps the Webex People API and exposes the API as native Python methods that return native Python objects.

list(email=None, displayName=None, id=None, orgId=None, max=None, **request_parameters)[source]

List people in your organization.

For most users, either the email or displayName parameter is required. Admin users can omit these fields and list all users in their organization.

Response properties associated with a user’s presence status, such as status or lastActivity, will only be displayed for people within your organization or an organization you manage. Presence information will not be shown if the authenticated user has disabled status sharing.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all people returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • email (str) – The e-mail address of the person to be found.

  • displayName (str) – The complete or beginning portion of the displayName to be searched.

  • id (str) – List people by ID. Accepts up to 85 person IDs separated by commas.

  • orgId (str) – The organization ID.

  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the people returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(emails, phoneNumbers=None, extension=None, locationId=None, displayName=None, firstName=None, lastName=None, avatar=None, orgId=None, roles=None, licenses=None, department=None, manager=None, managerId=None, title=None, addresses=None, siteUrls=None, callingData=None, minResponse=None, **request_parameters)[source]

Create a new user account for a given organization

Only an admin can create a new user account.

Parameters:
  • emails (list) – Email address(es) of the person (list of strings).

  • phoneNumbers (list) – Phone numbers for the person.

  • extension (str) – Webex Calling extension of the person.

  • locationId (str) – The ID of the location for this person.

  • displayName (str) – Full name of the person.

  • firstName (str) – First name of the person.

  • lastName (str) – Last name of the person.

  • avatar (str) – URL to the person’s avatar in PNG format.

  • orgId (str) – ID of the organization to which this person belongs.

  • roles (list) – Roles of the person (list of strings containing the role IDs to be assigned to the person).

  • licenses (list) – Licenses allocated to the person (list of strings - containing the license IDs to be allocated to the person).

  • department (str) – The business department the user belongs to.

  • manager (str) – A manager identifier.

  • managerId (str) – Person ID of the manager.

  • title (str) – The person’s title.

  • addresses (list) – A person’s addresses.

  • siteUrls (list) – One or several site names where this user has an attendee role.

  • callingData (bool) – Include Webex Calling user details in the response.

  • minResponse (bool) – Set to true to improve performance by omitting person details and returning only the ID in the response when successful.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Person object with the details of the created person.

Return type:

Person

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(personId)[source]

Get a person’s details, by ID.

Parameters:

personId (str) – The ID of the person to be retrieved.

Returns:

A Person object with the details of the requested person.

Return type:

Person

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(personId, emails=None, displayName=None, firstName=None, lastName=None, avatar=None, orgId=None, roles=None, licenses=None, **request_parameters)[source]

Update details for a person, by ID.

Only an admin can update a person’s details.

Email addresses for a person cannot be changed via the Webex API.

Include all details for the person. This action expects all user details to be present in the request. A common approach is to first GET the person’s details, make changes, then PUT both the changed and unchanged values.

Parameters:
  • personId (str) – The person ID.

  • emails (list) – Email address(es) of the person (list of strings).

  • displayName (str) – Full name of the person.

  • firstName (str) – First name of the person.

  • lastName (str) – Last name of the person.

  • avatar (str) – URL to the person’s avatar in PNG format.

  • orgId (str) – ID of the organization to which this person belongs.

  • roles (list) – Roles of the person (list of strings containing the role IDs to be assigned to the person).

  • licenses (list) – Licenses allocated to the person (list of strings - containing the license IDs to be allocated to the person).

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Person object with the updated details.

Return type:

Person

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(personId)[source]

Remove a person from the system.

Only an admin can remove a person.

Parameters:

personId (str) – The ID of the person to be deleted.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

me()[source]

Get the details of the person accessing the API.

Raises:

ApiError – If the Webex cloud returns an error.

roles

class RolesAPI[source]

Webex Roles API.

Wraps the Webex Roles API and exposes the API as native Python methods that return native Python objects.

list(**request_parameters)[source]

List all roles.

Parameters:

**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the roles returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(roleId)[source]

Get the details of a Role, by ID.

Parameters:

roleId (str) – The ID of the Role to be retrieved.

Returns:

A Role object with the details of the requested Role.

Return type:

Role

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

rooms

class RoomsAPI[source]

Webex Rooms API.

Wraps the Webex Rooms API and exposes the API as native Python methods that return native Python objects.

list(teamId=None, type=None, sortBy=None, max=100, **request_parameters)[source]

List rooms.

By default, lists rooms to which the authenticated user belongs.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all rooms returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • teamId (str) – Limit the rooms to those associated with a team, by ID.

  • type (str) – ‘direct’ returns all 1-to-1 rooms. group returns all group rooms. If not specified or values not matched, will return all room types.

  • sortBy (str) – Sort results by room ID (id), most recent activity (lastactivity), or most recently created (created).

  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the rooms returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(title, teamId=None, classificationId=None, isLocked=None, isPublic=None, description=None, isAnnouncementOnly=None, **request_parameters)[source]

Create a room.

The authenticated user is automatically added as a member of the room.

Parameters:
  • title (str) – A user-friendly name for the room.

  • teamId (str) – The team ID with which this room is associated.

  • classificationId (str) – The classification ID for the room.

  • isLocked (bool) – Set the space as locked/moderated and the creator becomes a moderator.

  • isPublic (bool) – The room is public and therefore discoverable within the org. Anyone can find and join that room. When true the description must be filled in.

  • description (str) – The description of the space.

  • isAnnouncementOnly (bool) – Sets the space into Announcement Mode or clears the Announcement Mode (false).

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Room with the details of the created room.

Return type:

Room

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(roomId)[source]

Get the details of a room, by ID.

Parameters:

roomId (str) – The ID of the room to be retrieved.

Returns:

A Room object with the details of the requested room.

Return type:

Room

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get_meeting_info(roomId)[source]

Get the meeting details for a room.

Parameters:

roomId (str) – The unique identifier for the room.

Returns:

A Room Meeting Info object with the meeting details for the room such as the SIP address, meeting URL, toll-free and toll dial-in numbers.

Return type:

RoomMeetingInfo

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(roomId, title, classificationId=None, teamId=None, isLocked=None, isPublic=None, description=None, isAnnouncementOnly=None, isReadOnly=None, **request_parameters)[source]

Update details for a room, by ID.

Parameters:
  • roomId (str) – The room ID.

  • title (str) – A user-friendly name for the room.

  • classificationId (str) – The classification ID for the room.

  • teamId (str) – The teamId to which this space should be assigned. Only unowned spaces can be assigned to a team. Assignment between teams is unsupported.

  • isLocked (bool) – Set the space as locked/moderated and the creator becomes a moderator.

  • isPublic (bool) – The room is public and therefore discoverable within the org. Anyone can find and join that room. When true the description must be filled in.

  • description (str) – The description of the space.

  • isAnnouncementOnly (bool) – Sets the space into Announcement Mode or clears the Announcement Mode (false).

  • isReadOnly (bool) – A compliance officer can set a direct room as read-only, which will disallow any new information exchanges in this space, while maintaining historical data.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Room object with the updated Webex room details.

Return type:

Room

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(roomId)[source]

Delete a room.

Parameters:

roomId (str) – The ID of the room to be deleted.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

teams

class TeamsAPI[source]

Webex Teams API.

Wraps the Webex Teams API and exposes the API as native Python methods that return native Python objects.

list(max=100, **request_parameters)[source]

List teams to which the authenticated user belongs.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all teams returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the teams returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(name, **request_parameters)[source]

Create a team.

The authenticated user is automatically added as a member of the team.

Parameters:
  • name (str) – A user-friendly name for the team.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Team object with the details of the created team.

Return type:

Team

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(teamId)[source]

Get the details of a team, by ID.

Parameters:

teamId (str) – The ID of the team to be retrieved.

Returns:

A Team object with the details of the requested team.

Return type:

Team

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(teamId, name, **request_parameters)[source]

Update details for a team, by ID.

Parameters:
  • teamId (str) – The team ID.

  • name (str) – A user-friendly name for the team.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Team object with the updated Webex team details.

Return type:

Team

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(teamId)[source]

Delete a team.

Parameters:

teamId (str) – The ID of the team to be deleted.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

team_memberships

class TeamMembershipsAPI[source]

Webex Team-Memberships API.

Wraps the Webex Memberships API and exposes the API as native Python methods that return native Python objects.

list(teamId, max=100, **request_parameters)[source]

List team memberships for a team, by ID.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all team memberships returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • teamId (str) – List team memberships for a team, by ID.

  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the team memberships returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(teamId, personId=None, personEmail=None, isModerator=False, **request_parameters)[source]

Add someone to a team by Person ID or email address.

Add someone to a team by Person ID or email address; optionally making them a moderator.

Parameters:
  • teamId (str) – The team ID.

  • personId (str) – The person ID.

  • personEmail (str) – The email address of the person.

  • isModerator (bool) – Set to True to make the person a team moderator.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A TeamMembership object with the details of the created team membership.

Return type:

TeamMembership

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(membershipId)[source]

Get details for a team membership, by ID.

Parameters:

membershipId (str) – The team membership ID.

Returns:

A TeamMembership object with the details of the requested team membership.

Return type:

TeamMembership

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(membershipId, isModerator=None, **request_parameters)[source]

Update a team membership, by ID.

Parameters:
  • membershipId (str) – The team membership ID.

  • isModerator (bool) – Set to True to make the person a team moderator.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A TeamMembership object with the updated Webex team-membership details.

Return type:

TeamMembership

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(membershipId)[source]

Delete a team membership, by ID.

Parameters:

membershipId (str) – The team membership ID.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

webhooks

class WebhooksAPI[source]

Webex Webhooks API.

Wraps the Webex Webhooks API and exposes the API as native Python methods that return native Python objects.

list(max=100, **request_parameters)[source]

List all of the authenticated user’s webhooks.

This method supports Webex’s implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all webhooks returned by the query. The generator will automatically request additional ‘pages’ of responses from Webex as needed until all responses have been returned. The container makes the generator safe for reuse. A new API call will be made, using the same parameters that were specified when the generator was created, every time a new iterator is requested from the container.

Parameters:
  • max (int) – Limit the maximum number of items returned from the Webex service per request.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A GeneratorContainer which, when iterated, yields the webhooks returned by the Webex query.

Return type:

GeneratorContainer

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

create(name, targetUrl, resource, event, filter=None, secret=None, **request_parameters)[source]

Create a webhook.

Parameters:
  • name (str) – A user-friendly name for this webhook.

  • targetUrl (str) – The URL that receives POST requests for each event.

  • resource (str) – The resource type for the webhook.

  • event (str) – The event type for the webhook.

  • filter (str) – The filter that defines the webhook scope.

  • secret (str) – The secret used to generate payload signature.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Webhook object with the details of the created webhook.

Return type:

Webhook

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

get(webhookId)[source]

Get the details of a webhook, by ID.

Parameters:

webhookId (str) – The ID of the webhook to be retrieved.

Returns:

A Webhook object with the details of the requested webhook.

Return type:

Webhook

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

update(webhookId, name=None, targetUrl=None, **request_parameters)[source]

Update a webhook, by ID.

Parameters:
  • webhookId (str) – The webhook ID.

  • name (str) – A user-friendly name for this webhook.

  • targetUrl (str) – The URL that receives POST requests for each event.

  • **request_parameters – Additional request parameters (provides support for parameters that may be added in the future).

Returns:

A Webhook object with the updated Webex webhook

details.

Return type:

Webhook

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

delete(webhookId)[source]

Delete a webhook, by ID.

Parameters:

webhookId (str) – The ID of the webhook to be deleted.

Raises:
  • TypeError – If the parameter types are incorrect.

  • ApiError – If the Webex cloud returns an error.

Webex Data Objects

Access Token

class AccessToken[source]

Webex Access-Token data model.

property access_token

Webex access token.

property expires_in

Access token expiry time (in seconds).

property json_data

A copy of the data object’s JSON data (OrderedDict).

property refresh_token

Refresh token used to request a new/refreshed access token.

property refresh_token_expires_in

Refresh token expiry time (in seconds).

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Admin Audit Event

class AdminAuditEvent[source]

Webex Admin Audit Event data model.

property data

The event resource data.

property actorId

The personId of the person who made the change.

property created

The date and time the event took place.

property id

A unique identifier for the event.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property orgId

The orgId of the person who made the change.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Attachment Action

class AttachmentAction[source]

Webex Attachment Actions data model

property created

The date and time the action was created.

property id

A unique identifier for the action.

property inputs

The attachment action’s inputs

property json_data

A copy of the data object’s JSON data (OrderedDict).

property messageId

The parent message the attachment action was performed on.

property personId

The ID of the person who performed the action.

property roomId

The ID of the room the action was performed within.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property type

The type of action performed.

Attachment action enum:

‘submit’: submit filled in inputs

Event

class Event[source]

Webex Event data model.

property data

The event’s data representation.

This object will contain the event’s resource, such as memberships or messages, at the time the event took place.

property actorId

The ID of the person who performed the action.

property appId

The ID of the application for the event.

property created

The date and time of the event.

property id

The unique identifier for the event.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property orgId

The ID of the organization for the event.

property resource

The type of resource in the event.

Event Resource Enum:

messages memberships

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property type

The action which took place in the event.

Event Type Enum:

created updated deleted

Guest Issuer Token

class GuestIssuerToken[source]

Webex Guest Issuer Token data model

property expiresIn
property json_data

A copy of the data object’s JSON data (OrderedDict).

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property token

License

class License[source]

Webex License data model.

property consumedUnits

Total number of license units consumed.

property id

A unique identifier for the license.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property name

Name of the licensed feature.

property siteType

The type of site associated with this license.

Control Hub managed site the site is managed by Webex Control Hub.

Linked site the site is a linked site

Site Admin managed site the site is managed by Site Administration

property siteUrl

The Webex Meetings site associated with this license.

property subscriptionId

The subscription ID associated with this license.

This ID is used in other systems, such as Webex Control Hub.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property totalUnits

Total number of license units allocated.

Membership

class Membership[source]

Webex Membership data model.

property created

The date and time when the membership was created.

property id

A unique identifier for the membership.

property isModerator

Whether or not the participant is a room moderator.

property isMonitor

Whether or not the participant is a monitoring bot (deprecated).

property json_data

A copy of the data object’s JSON data (OrderedDict).

property personDisplayName

The display name of the person.

property personEmail

The email address of the person.

property personId

The person ID.

property personOrgId

The organization ID of the person.

property roomId

The room ID.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Message

class Message[source]

Webex Message data model.

property attachments

Message content attachments attached to the message.

property created

The date and time the message was created.

property files

Public URLs for files attached to the message.

property html

The text content of the message, in HTML format.

This read-only property is used by the Webex clients.

property id

The unique identifier for the message.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property markdown

The message, in Markdown format.

property mentionedGroups

Group names for the groups mentioned in the message.

property mentionedPeople

People IDs for anyone mentioned in the message.

property parentId

The unique identifier for the parent message.

property personEmail

The email address of the message author.

property personId

The person ID of the message author.

property roomId

The room ID of the message.

property roomType

The type of room.

Room Type Enum:

direct: 1:1 room group: Group room

property text

The message, in plain text.

property toPersonEmail

1 message.

Type:

The email address of the recipient when sending a 1

property toPersonId

1 message.

Type:

The person ID of the recipient when sending a 1

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property updated

The date and time the message was updated.

Organization

class Organization[source]

Webex Organization data model.

property created

The date and time the organization was created.

property displayName

Full name of the organization.

property id

A unique identifier for the organization.

property json_data

A copy of the data object’s JSON data (OrderedDict).

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Person

class Person[source]

Webex Person data model.

property addresses

A person’s addresses.

property avatar

The URL to the person”s avatar in PNG format.

property created

The date and time the person was created.

property department

The business department the user belongs to.

property displayName

The full name of the person.

property emails

The email addresses of the person.

property extension

The Webex Calling extension for the person.

property firstName

The first name of the person.

property id

A unique identifier for the person.

property invitePending

Whether or not an invite is pending for the user to complete account activation.

Person Invite Pending Enum:
true: The person has been invited to Webex but has not

created an account

false: An invite is not pending for this person

property json_data

A copy of the data object’s JSON data (OrderedDict).

property lastActivity

The date and time of the person”s last activity within Webex.

property lastModified

The date and time the person was last changed.

property lastName

The last name of the person.

property licenses

An list of license strings allocated to this person.

property locationId

The location ID for the person.

property loginEnabled

Whether or not the user is allowed to use Webex.

Person Login Enabled Enum:

true: The person can log into Webex

“false”: The person cannot log into Webex

property manager

A manager identifier.

property managerId

Person ID of the manager.

property nickName

The nickname of the person if configured.

If no nickname is configured for the person, this field will not be present.

property orgId

The ID of the organization to which this person belongs.

property phoneNumbers

Phone numbers for the person.

property roles

List of roles for the person.

An list of role strings representing the roles to which this person belongs.

property sipAddresses

The user’s SIP addresses.

property siteUrls

One or several site names where this user has a role.

property status

The current presence status of the person.

Person Status Enum:

active: Active within the last 10 minutes

call: The user is in a call

DoNotDisturb: The user has manually set their status to

“Do Not Disturb”

inactive: Last activity occurred more than 10 minutes ago

meeting: The user is in a meeting

OutOfOffice: The user or a Hybrid Calendar service has indicated

that they are “Out of Office”

pending: The user has never logged in; a status cannot be

determined

presenting: The user is sharing content

unknown: The user’s status could not be determined

property timezone

The time zone of the person if configured.

If no timezone is configured on the account, this field will not be present.

property title

The person’s title.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property type

The type of person account, such as person or bot.

Person Type Enum:

person: Account belongs to a person bot: Account is a bot user appuser: Account is a guest user

property xmppFederationJid

XMPP federation identifier.

Identifier for intra-domain federation with other XMPP based messenger systems.

Role

class Role[source]

Webex Role data model.

property id

A unique identifier for the role.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property name

The name of the role.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Room

class Room[source]

Webex Room data model.

property created

The date and time the room was created.

property creatorId

The ID of the person who created this room.

property id

A unique identifier for the room.

property isLocked

Whether the room is moderated (locked) or not.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property lastActivity

The date and time of the room”s last activity.

property ownerId

The ID of the organization which owns this room.

property teamId

The ID for the team with which this room is associated.

property title

A user-friendly name for the room.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

property type

The room type.

Room Type Enum:

direct: 1:1 room

group: Group room

Room Meeting Info

class RoomMeetingInfo[source]

Webex Room Meeting Info data model.

property callInTollFreeNumber

The toll-free PSTN number for the room.

property callInTollNumber

The toll (local) PSTN number for the room.

property json_data

A copy of the data object’s JSON data (OrderedDict).

The Webex meeting URL for the room.

property meetingNumber

The Webex meeting number for the room.

property roomId

A unique identifier for the room.

property sipAddress

The SIP address for the room.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Team

class Team[source]

Webex Team data model.

property created

The date and time the team was created.

property creatorId

The ID of the person who created the team.

property id

A unique identifier for the team.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property name

A user-friendly name for the team.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Team Membership

class TeamMembership[source]

Webex Team-Membership data model.

property created

The date and time when the team membership was created.

property id

A unique identifier for the team membership.

property isModerator

Whether or not the participant is a team moderator.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property personDisplayName

The display name of the person.

property personEmail

The email address of the person.

property personId

The person ID.

property personOrgId

The organization ID of the person.

property teamId

The team ID.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Webhook

class Webhook[source]

Webex Webhook data model.

property appId

The ID of the application that created the webhook.

property created

The date and time the webhook was created.

property createdBy

The ID of the person that created the webhook.

property event

The event type for the webhook.

Webhook Event Type Enum:

all: Subscribe to all events created: An object was created updated: An object was updated deleted: An object was deleted

property filter

The filter that defines the webhook scope.

property id

A unique identifier for the webhook.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property name

A user-friendly name for the webhook.

property orgId

The ID of the organization that owns the webhook.

property ownedBy

Indicates if the webhook is owned by the org or the creator.

Webhooks owned by the creator can only receive events that are accessible to the creator of the webhook. Those owned by the organization will receive events that are visible to anyone in the organization.

Webhook Owned By Enum:

org creator

property resource

The resource type for the webhook.

Creating a webhook requires ‘read’ scope on the resource the webhook is for.

Webhook Resource Enum:

all: Subscribe to all resources memberships: The Memberships resource messages: The Messages resource rooms: The Rooms resource

property secret

The secret used to generate payload signature.

property status

The status of the webhook.

Webhook Status Enum:

active: The webhook is active inactive: The webhook is inactive

property targetUrl

The URL that receives POST requests for each event.

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Webhook Event

class WebhookEvent[source]

Webex Webhook-Events data model.

property data

The event resource data.

property actorId

The ID of the person that caused the webhook to be sent.

property appId

The ID of the application that created the webhook.

property createdBy

The ID of the person that created the webhook.

property event

The event type for the webhook.

Webhook Event Type Enum:

created: An object was created updated: An object was updated deleted: An object was deleted

property filter

The filter that defines the webhook scope.

property id

A unique identifier for the webhook.

property json_data

A copy of the data object’s JSON data (OrderedDict).

property name

A user-friendly name for the webhook.

property orgId

The ID of the organization that owns the webhook.

property ownedBy

Indicates if the webhook is owned by the org or the creator.

Webhooks owned by the creator can only receive events that are accessible to the creator of the webhook. Those owned by the organization will receive events that are visible to anyone in the organization.

Webhook Owned By Enum:

org creator

property resource

The resource type for the webhook.

Creating a webhook requires ‘read’ scope on the resource the webhook is for.

Webhook Resource Enum:

memberships: The Memberships resource messages: The Messages resource rooms: The Rooms resource

property status

The status of the webhook.

Webhook Status Enum:

active: The webhook is active inactive: The webhook is inactive

to_dict()

Convert the Webex object data to a dictionary.

to_json(**kwargs)

Convert the Webex object data to JSON.

Any keyword arguments provided are passed through the Python JSON encoder.

Exceptions

exception webexpythonsdkException[source]

Bases: Exception

Base class for all webexpythonsdk package exceptions.

exception AccessTokenError[source]

Bases: webexpythonsdkException

Raised when an incorrect Webex Access Token has been provided.

exception ApiError[source]

Bases: webexpythonsdkException

Errors returned in response to requests sent to the Webex APIs.

Several data attributes are available for inspection.

response

The requests.Response object returned from the API call.

request

The requests.PreparedRequest of the API call.

status_code

The HTTP status code from the API response.

status

The HTTP status from the API response.

description

A description of the HTTP Response Code from the API docs.

details

The parsed JSON details from the API response.

message

The error message from the parsed API response.

tracking_id

The Webex Tracking ID from the response.

exception MalformedResponse[source]

Bases: webexpythonsdkException

Raised when a malformed response is received from Webex.

exception RateLimitError[source]

Bases: ApiError

Webex Rate-Limit exceeded Error.

Raised when a rate-limit exceeded message is received and the request will not be retried.

retry_after

The Retry-After time period (in seconds) provided by Webex.

Defaults to 15 seconds if the response Retry-After header isn’t present in the response headers, and defaults to a minimum wait time of 1 second if Webex returns a Retry-After header of 0 seconds.

Warnings

exception webexpythonsdkWarning[source]

Bases: webexpythonsdkException, Warning

Base class for all webexpythonsdk warnings.

exception ApiWarning[source]

Bases: webexpythonsdkWarning, ApiError

Warnings raised from API responses received from the Webex APIs.

Several data attributes are available for inspection.

exception RateLimitWarning[source]

Bases: ApiWarning, RateLimitError

Webex rate-limit exceeded warning.

Raised when a rate-limit exceeded message is received and the request will be retried.

Cards and Buttons

class AdaptiveCard

Adaptive Card data model.

Note: Webex currently supports version 1.1 of adaptive cards and thus only features from that release are supported in this abstraction.

type = 'AdaptiveCard'
schema = 'http://adaptivecards.io/schemas/adaptive-card.json'
version = '1.1'
to_dict()

Serialize the component into a Python dictionary.

The to_dict() method recursively serializes the object’s data into a Python dictionary.

Returns:

Dictionary representation of this component.

Return type:

dict

Components

class Image

Adaptive Card Image component.

__init__(url, altText=None, backgroundColor=None, height=None, horizontalAlignment=None, selectAction=None, size=None, style=None, width=None, separator=None, spacing=None, id=None)

Initialize a new image component.

Parameters:
  • url (str) – The URL to the image

  • altText (str) – Alternative text describing the image

  • backgroundColor (str) – Background color for transparent images.

  • height (str, BlockElementHeight) – Height of the image either as a pixel value(i.e. ‘50px’) or as an instance of BlockElementHeight

  • horizontalAlignmnet (HorizontalAlignment) – Controls how the component is positioned within its parent.

  • selectAction (OpenUrl, Submit) – Option that is carried out when the card is selected.

  • size (ImageSize) – Controls the approximate size of the image.

  • style (ImageStyle) – The display style of this image.

  • width (str) – Width of the image as a pixel value (i.e. ‘50px’)

  • separator (bool) – Draw a separating line when set to true

  • spacing (Spacing) – Specify the spacing of this component

  • id (str) – The id of this component

type = 'Image'
class TextBlock

Adaptive Card Text Block component.

__init__(text, color=None, horizontalAlignment=None, isSubtle=None, maxLines=None, size=None, weight=None, wrap=None, separator=None, spacing=None, id=None)

Initialize a new TextBlock component.

type = 'TextBlock'
class Column

Adaptive Card Column component.

type = 'Column'
class Fact

Adaptive Card Fact component.

class Choice

Options

class VerticalContentAlignment

An enumeration.

TOP = 'top'
CENTER = 'center'
BOTTOM = 'bottom'
class Colors

An enumeration.

DEFAULT = 'default'
DARK = 'dark'
LIGHT = 'light'
ACCENT = 'accent'
GOOD = 'good'
WARNING = 'warning'
ATTENTION = 'attention'
class HorizontalAlignment

An enumeration.

LEFT = 'left'
CENTER = 'center'
RIGHT = 'right'
class FontSize

An enumeration.

DEFAULT = 'default'
SMALL = 'small'
MEDIUM = 'medium'
LARGE = 'large'
EXTRA_LARGE = 'extraLarge'
class FontWeight

An enumeration.

DEFAULT = 'default'
LIGHTER = 'lighter'
BOLDER = 'bolder'
class BlockElementHeight

An enumeration.

AUTO = 'auto'
STRETCH = 'auto'
class Spacing

An enumeration.

DEFAULT = 'default'
NONE = 'none'
SMALL = 'small'
MEDIUM = 'medium'
LARGE = 'large'
EXTRA_LARGE = 'extraLarge'
PADDING = 'padding'
class ImageSize

An enumeration.

AUTO = 'auto'
STRETCH = 'stretch'
SMALL = 'small'
MEDIUM = 'medium'
LARGE = 'large'
class ImageStyle

An enumeration.

DEFAULT = 'default'
PERSON = 'person'
class ContainerStyle

An enumeration.

DEFAULT = 'default'
EMPHASIS = 'emphasis'
class TextInputStyle

An enumeration.

TEXT = 'text'
TEL = 'tel'
URL = 'url'
EMAIL = 'email'
class ChoiceInputStyle

An enumeration.

COMPACT = 'compact'
EXPANDED = 'expanded'

Container

class Container

Adaptive Card Container component.

type = 'Container'
class ColumnSet

Adaptive Card Column Set component.

type = 'ColumnSet'
class FactSet

Adaptive Card Fact Set component.

type = 'FactSet'
class ImageSet

Adaptive Card Image Set component.

type = 'ImageSet'

Inputs

class Text

Adaptive Card Text component.

type = 'Input.Text'
class Number

Adaptive Card Number component.

type = 'Input.Number'
class Date

Adaptive Card Date component.

type = 'Input.Date'
class Time

Adaptive Card Time component.

type = 'Input.Time'
class Toggle

Adaptive Card Toggle component.

type = 'Input.Toggle'
class Choices

Adaptive Card Choice Set component.

type = 'Input.ChoiceSet'

Actions

class OpenUrl(url, title=None, iconURL=None)

Open URL Action.

type = 'Action.OpenUrl'
class Submit(data=None, title=None, iconURL=None)

Submit Action.

type = 'Action.Submit'
class ShowCard(card=None, title=None, iconURL=None)

Show Card Action.

type = 'Action.ShowCard'

Copyright (c) 2016-2024 Cisco and/or its affiliates.