wxc_sdk.xapi package
- class wxc_sdk.xapi.ExecuteCommandResponse(*, deviceId: str | None = None, arguments: dict | None = None, result: dict | None = None, **extra_data: Any)[source]
Bases:
ApiModel- device_id: str | None
The unique identifier for the Webex RoomOS Device.
- arguments: dict | None
xAPI command arguments
- result: dict | None
xAPI command results
- class wxc_sdk.xapi.QueryStatusResponse(*, deviceId: str | None = None, result: dict | None = None, **extra_data: Any)[source]
Bases:
ApiModel- device_id: str | None
The unique identifier for the Webex RoomOS Device.
- result: dict | None
xAPI status result
- class wxc_sdk.xapi.XApi(*, session: RestSession, base: str = None)[source]
Bases:
ApiChildxAPI
The xAPI allows developers to programmatically invoke commands and query the status of devices that run Webex RoomOS software.
Executing commands requires an auth token with the spark:xapi_commands scope. Querying devices requires an auth token with the spark:xapi_statuses scope.
All xAPI requests require a deviceId which can be obtained using the Devices API. xAPI commands and statuses are described in the Cisco Collaboration Endpoint Software API Reference Guide. For more information about developing applications for cloud connected devices, see the Device Developers Guide.
- query_status(device_id: str, name: list[str]) QueryStatusResponse[source]
Query Status
Query the current status of the Webex RoomOS Device. You specify the target device in the deviceId parameter in the URI. The target device is queried for statuses according to the expression in the name parameter.
See the xAPI section of the Device Developers Guide for a description of status expressions.
- Parameters:
device_id (str) – The unique identifier for the Webex RoomOS Device.
name (list[str]) –
A list of status expressions used to query the Webex RoomOS Device. See the xAPI section of the Device Developers Guide for a description of status expressions. A request can contain at most 10 different status expressions.
- execute_command(command_name: str, device_id: str, arguments: dict = None, body: dict | str = None) ExecuteCommandResponse[source]
Execute Command
Executes a command on the Webex RoomOS Device. Specify the command to execute in the commandName URI parameter.
See the xAPI section of the Device Developers Guide for a description of command expressions.
- Parameters:
command_name (str) – Command to execute on the Webex RoomOS Device.
device_id (str) – The unique identifier for the Webex RoomOS Device.
arguments (dict) – xAPI command arguments
body (ExecuteCommandBody) – xAPI command body, as a complex JSON object or as a string
- Return type:
- system_unit_boot(device_id: str, force: bool = False) ExecuteCommandResponse[source]
Reboot the device
- Parameters:
device_id (str) – The unique identifier for the Webex RoomOS Device.
force (bool) – If True, the device will be rebooted immediately. If False, the device will wait for a period of time before rebooting.
- base = 'xapi'