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)[source]

Bases: str, Enum

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)[source]

Bases: str, Enum

calling type freeCalling, hybridCalling, webexCalling, webexEdgeForDevices

free = 'freeCalling'

Free Calling.

hybrid = 'hybridCalling'

Hybrid Calling.

webex = 'webexCalling'

Webex Calling.

edge_for_devices = 'webexEdgeForDevices'

Webex Edge For Devices.

class wxc_sdk.workspaces.CalendarType(value)[source]

Bases: str, Enum

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)[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.

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

Bases: WorkspaceEmail

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.

calendar_type: Optional[CalendarType]

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

class wxc_sdk.workspaces.Workspace(*, id: str = None, orgId: str = None, workspaceLocationId: str = None, floorId: str = None, displayName: str = None, capacity: int = None, type: WorkSpaceType = None, sipAddress: str = None, created: datetime = None, calling: CallingType = None, hybridCalling: WorkspaceEmail = None, calendar: Calendar = None, notes: str = None)[source]

Bases: ApiModel

Workspace details

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.

workspace_id: Optional[str]

Unique identifier for the Workspace.

org_id: Optional[str]

OrgId associate with the workspace.

workspace_location_id: Optional[str]

Location associated with the workspace.

floor_id: Optional[str]

Floor associated with the workspace.

display_name: Optional[str]

A friendly name for the workspace.

capacity: Optional[int]

How many people the workspace is suitable for.

workspace_type: Optional[WorkSpaceType]

The workspace type.

sip_address: Optional[str]

SipUrl to call all the devices associated with the workspace.

created: Optional[datetime]

The date and time that the workspace was registered

calling: Optional[CallingType]

Calling type.

hybrid_calling: Optional[WorkspaceEmail]

The hybridCalling object only applies when calling type is hybridCalling.

calendar: Optional[Calendar]

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

notes: Optional[str]

Notes associated to the workspace.

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

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

class wxc_sdk.workspaces.WorkspacesApi(*, session: RestSession, base: Optional[str] = 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(workspace_location_id: Optional[str] = None, floor_id: Optional[str] = None, display_name: Optional[str] = None, capacity: Optional[int] = None, workspace_type: Optional[WorkSpaceType] = None, calling: Optional[CallingType] = None, calendar: Optional[CalendarType] = None, org_id: Optional[str] = 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
  • workspace_location_id (str) – Location associated with the workspace

  • 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.

  • calling (CallingType) – List workspaces by calling type.

  • calendar (CalendarType) – List workspaces by calendar type.

  • 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: Optional[str] = None)[source]

Create a Workspace

Create a workspace. The workspaceLocationId, floorId, capacity, type and notes parameters are optional, and omitting them will result in the creation of a workspace without these values set, or set to their default. A workspaceLocationId 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).

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 workspaceLocationId, floorId, 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]

Update a Workspace

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 workspaceLocationId must be provided when the floorId is set. The workspaceLocationId, floorId, calendar and calling fields do not change when omitted from the update request. Updating the calling parameter is not supported.

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.

base = 'workspaces'
session: RestSession

REST session