wxc_sdk.workspaces package

Workspaces

Workspaces represent where people work, such as conference rooms, meeting spaces, lobbies, and lunch rooms. Devices may be associated with workspaces.

Viewing the list of workspaces in an organization requires an administrator auth token with the spark-admin:workspaces_read scope. Adding, updating, or deleting workspaces in an organization requires an administrator auth token with the spark-admin:workspaces_write scope.

The Workspaces API can also be used by partner administrators acting as administrators of a different organization than their own. In those cases an orgId value must be supplied, as indicated in the reference documentation for the relevant endpoints.

class wxc_sdk.workspaces.WorkSpaceType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

workspace type

notSet = 'notSet'

No workspace type set.

focus = 'focus'

High concentration.

huddle = 'huddle'

Brainstorm/collaboration.

meetingRoom = 'meetingRoom'

Dedicated meeting space.

open = 'open'

Dedicated meeting space.

desk = 'desk'

Individual.

other = 'other'

Unspecified.

class wxc_sdk.workspaces.CallingType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

Calling types: freeCalling, webexEdgeForDevices, thirdPartySipCalling, webexCalling and none.

free = 'freeCalling'

Free Calling.

edge_for_devices = 'webexEdgeForDevices'

Webex Edge For Devices.

third_party = 'thirdPartySipCalling'

thirdPartySipCalling

webex = 'webexCalling'

Webex Calling.

none = 'none'
class wxc_sdk.workspaces.CalendarType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

type of calendar integration

none = 'none'

No calendar.

google = 'google'

Google Calendar.

microsoft = 'microsoft'

Microsoft Exchange or Office 365.

class wxc_sdk.workspaces.WorkspaceEmail(*, emailAddress: str | None = None)[source]

Bases: ApiModel

email_address: str | None
class wxc_sdk.workspaces.Calendar(*, emailAddress: str | None = None, type: CalendarType | None = None)[source]

Bases: WorkspaceEmail

calendar_type: CalendarType | None

Calendar type. Calendar of type none does not include an emailAddress field.

email_address: str | None

Workspace email address. Will not be set when the calendar type is none.

class wxc_sdk.workspaces.WorkspaceCallingHybridCalling(*, emailAddress: str | None = None)[source]

Bases: ApiModel

email_address: str | None

End user email address in Cisco Unified CM. example: workspace@example.com

class wxc_sdk.workspaces.HotdeskingStatus(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

on = 'on'

Workspace supports hotdesking.

off = 'off'

Workspace does not support hotdesking.

none_ = 'none'
class wxc_sdk.workspaces.Workspace(*, id: str | None = None, orgId: str | None = None, workspaceLocationId: str | None = None, locationId: str | None = None, floorId: str | None = None, displayName: str | None = None, capacity: int | None = None, type: WorkSpaceType | None = None, sipAddress: str | None = None, created: datetime | None = None, calling: WorkspaceCalling | None = None, hybridCalling: WorkspaceEmail | None = None, calendar: Calendar | None = None, notes: str | None = None, hotdeskingStatus: HotdeskingStatus | None = None, deviceHostedMeetings: DeviceHostedMeetings | None = None, supportedDevices: WorkspaceSupportedDevices | None = None, devicePlatform: DevicePlatform | None = None, indoorNavigation: WorkspaceIndoorNavigation | None = None)[source]

Bases: ApiModel

Workspace details

workspace_id: str | None

Unique identifier for the Workspace.

org_id: str | None

OrgId associate with the workspace.

workspace_location_id: str | None

Location associated with the workspace.

location_id: str | None

Location associated with the workspace (ID to use for the /locations API).

floor_id: str | None

Floor associated with the workspace.

display_name: str | None

A friendly name for the workspace.

capacity: int | None

How many people the workspace is suitable for.

workspace_type: WorkSpaceType | None

The workspace type.

sip_address: str | None

SipUrl to call all the devices associated with the workspace.

created: datetime | None

The date and time that the workspace was registered

calling: WorkspaceCalling | None

Calling type.

hybrid_calling: WorkspaceEmail | None

The hybridCalling object only applies when calling type is hybridCalling.

calendar: Calendar | None

Calendar type. Calendar of type none does not include an emailAddress field.

notes: str | None

Notes associated to the workspace.

hotdesking_status: HotdeskingStatus | None

Hot desking status of the workspace.

device_hosted_meetings: DeviceHostedMeetings | None
supported_devices: WorkspaceSupportedDevices | None

The supported devices for the workspace.

device_platform: DevicePlatform | None

The device platform.

indoor_navigation: WorkspaceIndoorNavigation | None

Indoor navigation configuration.

static create(*, display_name: str) Workspace[source]

minimal settings for a WorkspacesApi.create() call :return: Workspace

class wxc_sdk.workspaces.CapabilityMap(*, occupancyDetection: SupportAndConfiguredInfo | None = None, presenceDetection: SupportAndConfiguredInfo | None = None, ambientNoise: SupportAndConfiguredInfo | None = None, soundLevel: SupportAndConfiguredInfo | None = None, temperature: SupportAndConfiguredInfo | None = None, airQuality: SupportAndConfiguredInfo | None = None, relativeHumidity: SupportAndConfiguredInfo | None = None)[source]

Bases: ApiModel

occupancy_detection: SupportAndConfiguredInfo | None

Occupancy detection.

presence_detection: SupportAndConfiguredInfo | None

Presence detection.

ambient_noise: SupportAndConfiguredInfo | None

Ambient noise.

sound_level: SupportAndConfiguredInfo | None

Sound level.

temperature: SupportAndConfiguredInfo | None

Temperature.

air_quality: SupportAndConfiguredInfo | None

Air quality.

relative_humidity: SupportAndConfiguredInfo | None

Relative humidity.

class wxc_sdk.workspaces.WorkspaceCalling(*, type: CallingType | None = None, hybridCalling: WorkspaceCallingHybridCalling | None = None, webexCalling: WorkspaceWebexCalling | None = None)[source]

Bases: ApiModel

type: CallingType | None
hybrid_calling: WorkspaceCallingHybridCalling | None

The hybridCalling object only applies when calling type is hybridCalling.

webex_calling: WorkspaceWebexCalling | None

The webexCalling object only applies when calling type is webexCalling. due to a backend limitation this information is never returned by the workspace API and only has to be used when creating a workspace

class wxc_sdk.workspaces.WorkspaceWebexCalling(*, phoneNumber: str | None = None, extension: str | None = None, locationId: str | None = None, licenses: list[str] | None = None)[source]

Bases: ApiModel

phone_number: str | None

End user phone number in Cisco Unified CM.

extension: str | None

End user extension in Cisco Unified CM.

location_id: str | None

Calling location ID.

licenses: list[str] | None

The Webex Calling license associated with this workspace.

class wxc_sdk.workspaces.WorkspaceSupportedDevices(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

collaboration_devices = 'collaborationDevices'

Workspace supports collaboration devices.

phones = 'phones'

Workspace supports MPP phones.

class wxc_sdk.workspaces.WorkspaceIndoorNavigation(*, url: str | None = None)[source]

Bases: ApiModel

url: str | None

URL of a map locating the workspace.

class wxc_sdk.workspaces.WorkspacesApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

Workspaces API

Workspaces represent where people work, such as conference rooms, meeting spaces, lobbies, and lunch rooms. Devices may be associated with workspaces. Viewing the list of workspaces in an organization requires an administrator auth token with the spark-admin:workspaces_read scope. Adding, updating, or deleting workspaces in an organization requires an administrator auth token with the spark-admin:workspaces_write scope. The Workspaces API can also be used by partner administrators acting as administrators of a different organization than their own. In those cases an orgId value must be supplied, as indicated in the reference documentation for the relevant endpoints.

list(location_id: str | None = None, workspace_location_id: str | None = None, floor_id: str | None = None, display_name: str | None = None, capacity: int | None = None, workspace_type: WorkSpaceType | None = None, calling: CallingType | None = None, supported_devices: WorkspaceSupportedDevices | None = None, calendar: CalendarType | None = None, device_hosted_meetings_enabled: bool | None = None, device_platform: DevicePlatform | None = None, org_id: str | None = None, **params) Generator[Workspace, None, None][source]

List Workspaces

List workspaces. Use query parameters to filter the response. The orgId parameter can only be used by admin users of another organization (such as partners). The workspaceLocationId, floorId, capacity and type fields will only be present for workspaces that have a value set for them. The special values notSet (for filtering on category) and -1 (for filtering on capacity) can be used to filter for workspaces without a type and/or capacity.

Parameters:
  • location_id (str) – Location associated with the workspace. Values must originate from the /locations API and not the legacy /workspaceLocations API.

  • workspace_location_id (str) – Location associated with the workspace. Both values from the /locations API and the legacy /workspaceLocations API are supported. This field is deprecated and integrations should prefer locationId going forward.

  • floor_id (str) – Floor associated with the workspace.

  • display_name (str) – List workspaces by display name.

  • capacity (int) – List workspaces with the given capacity. Must be -1 or higher. A value of -1 lists workspaces with no capacity set.

  • workspace_type (WorkSpaceType) – List workspaces by type. Possible values: notSet, focus, huddle, meetingRoom, open, desk, other

  • calling (CallingType) – List workspaces by calling type. Possible values: freeCalling, hybridCalling, webexCalling, webexEdgeForDevices, thirdPartySipCalling, none

  • supported_devices (str) – List workspaces by supported devices. Possible values: collaborationDevices, phones

  • calendar (CalendarType) – List workspaces by calendar type. Possible values: none, google, microsoft

  • device_hosted_meetings_enabled (bool) – List workspaces enabled for device hosted meetings.

  • device_platform (DevicePlatform) – List workspaces by device platform.

  • org_id (str) – List workspaces in this organization. Only admin users of another organization (such as partners) may use this parameter.

Returns:

generator of Workspace instances

create(settings: Workspace, org_id: str | None = None)[source]

Create a Workspace

The locationId, workspaceLocationId, floorId, indoorNavigation, capacity, type, notes and hotdeskingStatus parameters are optional, and omitting them will result in the creation of a workspace without these values set, or set to their default. A locationId must be provided when the floorId is set. Calendar and calling can also be set for a new workspace. Omitting them will default to free calling and no calendaring. The orgId parameter can only be used by admin users of another organization (such as partners).

  • Information for Webex Calling fields may be found here: locations and available numbers

  • The locationId and supportedDevices fields cannot be changed once configured.

  • When creating a webexCalling workspace, a locationId and either a phoneNumber or extension or both is required. Furthermore, it is possible to set the licenses field with a list of Webex Calling license IDs, if desired. If multiple license IDs are provided, the oldest suitable one will be applied. If no licenses are supplied, the oldest suitable one from the active subscriptions will be automatically applied.

Parameters:
  • settings (Workspace) – settings for new Workspace

  • org_id (str) – OrgId associated with the workspace. Only admin users of another organization (such as partners) may use this parameter.

Returns:

new workspace

Return type:

Workspace

details(workspace_id) Workspace[source]

Get Workspace Details

Shows details for a workspace, by ID. The locationId, workspaceLocationId, floorId, indoorNavigation, capacity, type and notes fields will only be present if they have been set for the workspace.

Parameters:

workspace_id (str) – A unique identifier for the workspace.

Returns:

workspace details

Return type:

Workspace

update(workspace_id, settings: Workspace) Workspace[source]

Updates details for a workspace by ID.

Specify the workspace ID in the workspaceId parameter in the URI. Include all details for the workspace that are present in a GET request for the workspace details. Not including the optional capacity, type or notes fields will result in the fields no longer being defined for the workspace. A locationId must be provided when the floorId is set. The locationId, workspaceLocationId, floorId, supportedDevices, calendar and calling fields do not change when omitted from the update request.

  • Information for Webex Calling fields may be found here: locations and available numbers

  • Updating the calling parameter is only supported if the existing calling type is freeCalling, none, thirdPartySipCalling or webexCalling.

  • Updating the calling parameter to none, thirdPartySipCalling or webexCalling is not supported if the workspace contains any devices.

  • The locationId and supportedDevices fields cannot be changed once configured.

  • When updating webexCalling information, a locationId and either a phoneNumber or extension or both is required. Furthermore, the licenses field can be set with a list of Webex Calling license IDs, if desired. If multiple license IDs are provided, the oldest suitable one will be applied. If a previously applied license ID is omitted, it will be replaced with one from the list provided. If the licenses field is omitted, the current calling license will be retained.

Parameters:
  • workspace_id (str) – A unique identifier for the workspace.

  • settings (Workspace) – new workspace settings

Returns:

updated workspace

Return type:

Workspace

delete_workspace(workspace_id)[source]

Delete a Workspace

Deletes a workspace, by ID. Will also delete all devices associated with the workspace. Any deleted devices will need to be reactivated.

Parameters:

workspace_id (str) – A unique identifier for the workspace.

capabilities(workspace_id: str) CapabilityMap[source]

Shows the capabilities for a workspace by ID. Returns a set of capabilities, including whether or not the capability is supported by any device in the workspace, and if the capability is configured (enabled). For example for a specific capability like occupancyDetection, the API will return if the capability is supported and/or configured such that occupancy detection data will flow from the workspace (device) to the cloud. Specify the workspace ID in the workspaceId parameter in the URI.

Parameters:

workspace_id (str) – A unique identifier for the workspace.

base = 'workspaces'