wxc_sdk.devices package
Devices represent cloud-registered Webex RoomOS devices. Devices may be associated with Workspaces.
Searching and viewing details for your devices requires an auth token with the spark:devices_read scope. Updating or deleting your devices requires an auth token with the spark:devices_write scope. Viewing the list of all devices in an organization requires an administrator auth token with the spark-admin:devices_read scope. Adding, updating, or deleting all devices in an organization requires an administrator auth token with the spark-admin:devices_write scope. Generating an activation code requires an auth token with the identity:placeonetimepassword_create scope.
- class wxc_sdk.devices.DevicesApi(*, session: RestSession)[source]
Bases:
ApiChild
Devices represent cloud-registered Webex RoomOS devices. Devices may be associated with Workspaces.
Searching and viewing details for your devices requires an auth token with the spark:devices_read scope. Updating or deleting your devices requires an auth token with the spark:devices_write scope. Viewing the list of all devices in an organization requires an administrator auth token with the spark-admin:devices_read scope. Adding, updating, or deleting all devices in an organization requires an administrator auth token with the spark-admin:devices_write scope. Generating an activation code requires an auth token with the identity:placeonetimepassword_create scope.
- settings_jobs: DeviceSettingsJobsApi
device jobs Api
- list(person_id: Optional[str] = None, workspace_id: Optional[str] = None, display_name: Optional[str] = None, product: Optional[str] = None, product_type: Optional[str] = None, tag: Optional[str] = None, connection_status: Optional[str] = None, serial: Optional[str] = None, software: Optional[str] = None, upgrade_channel: Optional[str] = None, error_code: Optional[str] = None, capability: Optional[str] = None, permission: Optional[str] = None, org_id: Optional[str] = None, **params) Generator[Device, None, None] [source]
List Devices
Lists all active Webex devices associated with the authenticated user, such as devices activated in personal mode. Administrators can list all devices within an organization.
- Parameters
person_id (str) – List devices by person ID.
workspace_id (str) – List devices by workspace ID.
display_name (str) – List devices with this display name.
product (str) – List devices with this product name.
product_type (str) – List devices with this type.
tag (str separating the tag values or adding several tag parameters.) – List devices which have a tag. Searching for multiple tags (logical AND) can be done by comma
connection_status (str) – List devices with this connection statu
serial (str) – List devices with this serial number.
software (str) – List devices with this software version.
upgrade_channel (str) – List devices with this upgrade channel.
error_code (str) – List devices with this error code.
capability (str) – List devices with this capability.
permission (str) – List devices with this permission.
org_id (str) – List devices in this organization. Only admin users of another organization (such as partners) may use this parameter.
- Returns
Generator yielding
Device
instances
- details(device_id: str, org_id: Optional[str] = None) Device [source]
Get Device Details Shows details for a device, by ID.
Specify the device ID in the deviceId parameter in the URI.
- Parameters
device_id (str) – A unique identifier for the device.
org_id (str) –
- Returns
Device details
- Return type
- delete(device_id: str, org_id: Optional[str] = None)[source]
Delete a Device
Deletes a device, by ID.
Specify the device ID in the deviceId parameter in the URI.
- Parameters
device_id (str) – A unique identifier for the device.
org_id (str) –
- modify_device_tags(device_id: str, op: TagOp, value: List[str], org_id: Optional[str] = None) Device [source]
Modify Device Tags
Update requests use JSON Patch syntax.
- activation_code(workspace_id: str, org_id: Optional[str] = None) ActivationCodeResponse [source]
Create a Device Activation Code
Generate an activation code for a device in a specific workspace by workspaceId. Currently, activation codes may only be generated for shared workspaces–personal mode is not supported.
- Parameters
workspace_id – The workspaceId of the workspace where the device will be activated.
org_id –
- Returns
activation code and expiry time
- Return type
- base = 'devices'
- class wxc_sdk.devices.Device(*, id: str, displayName: str, workspaceId: Optional[str] = None, personId: Optional[str] = None, orgId: str, capabilities: list[str], permissions: list[str], connectionStatus: str, product: str, type: str, tags: list[str], ip: Optional[str] = None, activeInterface: Optional[str] = None, mac: Optional[str] = None, primarySipUrl: str, sipUrls: list[str], errorCodes: list[Any], serial: Optional[str] = None, software: Optional[str] = None, upgradeChannel: Optional[str] = None, created: datetime, firstSeen: datetime, lastSeen: datetime)[source]
Bases:
ApiModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- device_id: str
A unique identifier for the device.
- display_name: str
A friendly name for the device
- workspace_id: Optional[str]
The workspace associated with the device.
- person_id: Optional[str]
The person associated with the device.
- org_id: str
The organization associated with the device
- capabilities: list[str]
The capabilities of the device.
- permissions: list[str]
The permissions the user has for this device. For example, xapi means this user is entitled to using the xapi against this device.
- connection_status: str
The connection status of the device.
- product: str
The product name.
- product_type: str
The product type.
- tags: list[str]
Tags assigned to the device.
- ip: Optional[str]
The current IP address of the device.
- active_interface: Optional[str]
The current network connectivty for the device.
- mac: Optional[str]
The unique address for the network adapter.
- primary_sip_url: str
The primary SIP address to dial this device.
- sip_urls: list[str]
All SIP addresses to dial this device.
- error_codes: list[Any]
error codes
- serial: Optional[str]
Serial number for the device.
- software: Optional[str]
The operating system name data and version tag.
- upgrade_channel: Optional[str]
The upgrade channel the device is assigned to.
- created: datetime
The date and time that the device was registered, in ISO8601 format.
- first_seen: datetime
- last_seen: datetime
The date and time that the device was last seen, in ISO8601 format.
- class wxc_sdk.devices.TagOp(value)[source]
Bases:
str
,Enum
An enumeration.
- add = 'add'
- remove = 'remove'
- replace = 'replace'
- class wxc_sdk.devices.ActivationCodeResponse(*, code: str, expiryTime: datetime)[source]
Bases:
ApiModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- code: str
The activation code.
- expiry_time: datetime
The date and time the activation code expires.