wxc_sdk.workspace_locations package
A Workspace Location is a physical location with a name, address, country, city, latitude and longitude.
Viewing the list of locations in an organization requires an administrator auth token with the spark-admin:workspace_locations_read scope. Adding, updating, or deleting workspace locations in an organization requires an administrator auth token with the spark-admin:workspace_locations_write scope.
The Workspace Locations 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.workspace_locations.WorkspaceLocationApi(*, session: wxc_sdk.rest.RestSession, base: str = None)[source]
Bases:
ApiChild
- floors: WorkspaceLocationFloorApi
Workspace location floor API
WorkspaceLocationFloorApi
- ep(location_id: str | None = None)[source]
endpoint URL for given path
- Parameters:
path (str) – path after APIChild subclass specific endpoint URI prefix
- Returns:
endpoint URL
- Return type:
str
- list(display_name: str | None = None, address: str | None = None, country_code: str | None = None, city_name: str | None = None, org_id: str | None = None, **params) Generator[WorkspaceLocation, None, None] [source]
List workspace locations
- Parameters:
display_name (str) – Location display name.
address (str) – Location address
country_code (str) – Location country code (ISO 3166-1).
city_name (str) – Location city name.
org_id (str) – Organization id
params – addtl. parameters
- Returns:
generator of
WorkspaceLocation
instances
- create(display_name: str, address: str, country_code: str, latitude: float, longitude: float, city_name: str | None = None, notes: str | None = None, org_id: str | None = None) WorkspaceLocation [source]
Create a location. The cityName and notes parameters are optional, and omitting them will result in the creation of a location without these values set.
- Parameters:
display_name – A friendly name for the location.
address – The location address.
country_code – The location country code (ISO 3166-1).
latitude – The location latitude.
longitude – The location longitude.
city_name – The location city name.
notes – Notes associated to the location.
org_id
- Returns:
created workspace location
- Return type:
- details(location_id: str, org_id: str | None = None) WorkspaceLocation [source]
Get a Workspace Location Details Shows details for a location, by ID. Specify the location ID in the locationId parameter in the URI.
- Parameters:
location_id (str) – A unique identifier for the location.
org_id (str)
- Returns:
Workspace location details
- Return type:
- update(location_id: str, settings: WorkspaceLocation, org_id: str | None = None) WorkspaceLocation [source]
Update a Workspace Location Updates details for a location, by ID. Specify the location ID in the locationId parameter in the URI. Include all details for the location that are present in a Get Workspace Location Details. Not including the optional cityName or notes fields (setting them to None) will result in the fields no longer being defined for the location.
- Parameters:
location_id (str) – A unique identifier for the location.
settings (WorkspaceLocation) – new settings
org_id (str)
- Returns:
updated workspace location
- Return type:
- base = 'workspaceLocations'
- class wxc_sdk.workspace_locations.WorkspaceLocationFloorApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
- ep(location_id: str, floor_id: str | None = None)[source]
endpoint URL for given path
- Parameters:
path (str) – path after APIChild subclass specific endpoint URI prefix
- Returns:
endpoint URL
- Return type:
str
- list(location_id: str, org_id: str | None = None) Generator[WorkspaceLocationFloor, None, None] [source]
- Parameters:
location_id
org_id
- Returns:
- create(location_id: str, floor_number: int, display_name: str | None = None, org_id: str | None = None) WorkspaceLocationFloor [source]
Create a Workspace Location Floor
Create a new floor in the given location. The displayName parameter is optional, and omitting it will result in the creation of a floor without that value set.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_number
display_name
org_id (str)
- Returns:
new workspace location floor
- Return type:
- details(location_id: str, floor_id: str, org_id: str | None = None) WorkspaceLocationFloor [source]
Get a Workspace Location Floor Details
Shows details for a floor, by ID. Specify the floor ID in the floorId parameter in the URI.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_id (str) – A unique identifier for the floor.
org_id (str)
- Returns:
workspace location floor details
- Return type:
- update(location_id: str, floor_id: str, settings: WorkspaceLocationFloor, org_id: str | None = None) WorkspaceLocationFloor [source]
Updates details for a floor, by ID. Specify the floor ID in the floorId parameter in the URI. Include all details for the floor that are present in a Get Workspace Location Floor Details. Not including the optional displayName field will result in the field no longer being defined for the floor.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_id (str) – A unique identifier for the floor.
settings (WorkspaceLocationFloor) – new settings
org_id (str)
- Returns:
updated workspace location floor
- delete(location_id: str, floor_id: str, org_id: str | None = None)[source]
Delete a Workspace Location Floor Deletes a floor, by ID.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_id (str) – A unique identifier for the floor.
org_id (str)
- base = 'workspaceLocations'
- class wxc_sdk.workspace_locations.WorkspaceLocation(*, id: str, locationId: str | None = None, displayName: str, address: str, countryCode: str, cityName: str, longitude: float | None = None, latitude: float | None = None, notes: str | None = None)[source]
Bases:
ApiModel
- id: str
Unique identifier for the location.
- location_id: str | None
location id
- display_name: str
A friendly name for the location.
- address: str
The location address.
- country_code: str
The location country code (ISO 3166-1).
- city_name: str
The location city name.
- longitude: float | None
The location longitude.
- latitude: float | None
The location latitude.
- notes: str | None
Notes associated to the location.
- property id_uuid: str
the base64 decoded is {org_id}#{workspace_id} :return: uuid of the workspace location
- property org_id_uuid: str
org id as uuid