wxc_sdk.locations package
Locations
Locations are used to organize Webex Calling (BroadCloud) features within physical locations. Webex Control Hub may be used to define new locations.
Searching and viewing locations in your organization requires an administrator auth token with the spark-admin:people_read and spark-admin:people_write or spark-admin:device_read AND spark-admin:device_writescope combinations.
- class wxc_sdk.locations.LocationAddress(*, address1: str | None = None, address2: str | None = None, city: str | None = None, state: str | None = None, postalCode: str | None = None, country: str | None = None)[source]
Bases:
ApiModel
- address1: str | None
Address 1 of the location. example: 771 Alder Drive
- address2: str | None
Address 2 of the location. example: Cisco Site 5
- city: str | None
City of the location. example: Milpitas
- state: str | None
State code of the location. example: CA
- postal_code: str | None
Postal code of the location. example: 95035
- country: str | None
ISO-3166 2-Letter country code of the location. example: US
- class wxc_sdk.locations.Location(*, id: str | None = None, name: str | None = None, orgId: str | None = None, address: LocationAddress | None = None, timeZone: str | None = None, preferredLanguage: str | None = None, announcementLanguage: str | None = None, latitude: float | None = None, longitude: float | None = None, notes: str | None = None)[source]
Bases:
ApiModel
Webex location
- location_id: str | None
A unique identifier for the location.
- name: str | None
The name of the location.
- org_id: str | None
The ID of the organization to which this location belongs.
- address: LocationAddress | None
The address of the location,
LocationAddress
- time_zone: str | None
Time zone associated with this location. Refer to this link ( https://developer.webex.com/docs/api/guides/webex-for-broadworks-developers-guide#webex-meetings-site-timezone) for the format.
- preferred_language: str | None
Default email language.
- announcement_language: str | None
Location’s phone announcement language. This attribute is required when enabling a location for Webex Calling
- latitude: float | None
Latitude
- longitude: float | None
Longitude
- notes: str | None
Notes
- property location_id_uuid: str
location id as UUID
- property org_id_uuid: str
org id as UUID
- class wxc_sdk.locations.Floor(*, id: str | None = None, locationId: str | None = None, floorNumber: int | None = None, displayName: str | None = None)[source]
Bases:
ApiModel
- id: str | None
Unique identifier for the floor.
- location_id: str | None
Unique identifier for the location. example: Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OL2E4NjczZDIwLWM0M2EtNDQ5Ni1iYWIxLTNiMjhhZGJjMjViYQ
- floor_number: int | None
The floor number. example: -1
- display_name: str | None
The floor display name. example: The basement
- class wxc_sdk.locations.LocationsApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
Location API
Locations allow you to organize users and workspaces based on a physical location. You can configure both calling and workspace management functions into the same location. You can also create and inspect locations in Webex Control Hub. See Locations on Control Hub for more information.
- list(name: str | None = None, location_id: str | None = None, org_id: str | None = None, **params) Generator[Location, None, None] [source]
List locations for an organization.
- Parameters:
name (str) – List locations whose name contains this string (case-insensitive).
location_id (str) – List locations by ID.
org_id (str) – List locations in this organization. Only admin users of another organization (such as partners) may use this parameter.
- Returns:
generator of
Location
instances
- by_name(name: str, org_id: str | None = None) Location | None [source]
Get a location by name
- Parameters:
name (str) – name of the location to search
org_id (str) – search in list of locations in this organization. Only admin users of another organization (such as partners) may use this parameter.
- Returns:
locations
- Return type:
- details(location_id: str, org_id: str | None = None) Location [source]
Shows details for a location, by ID.
- Parameters:
location_id (str) – A unique identifier for the location.
org_id (str) – Get location common attributes for this organization.
- Returns:
location details
- Return type:
- create(name: str, time_zone: str, preferred_language: str, announcement_language: str, address1: str, city: str, state: str, postal_code: str, country: str, address2: str | None = None, latitude: str | None = None, longitude: str | None = None, notes: str | None = None, org_id: str | None = None) str [source]
Create a new Location for a given organization. Only an admin in the organization can create a new Location.
Creating a location in your organization requires an administrator auth token with the spark-admin:locations_write.
Partners may specify orgId query parameter to create location in managed organization.
The following body parameters are required to create a new location: name, timeZone, preferredLanguage, address, announcementLanguage.
latitude, longitude and notes are optional parameters to create a new location.
- Parameters:
name (str) – The name of the location.
time_zone (str) – Time zone associated with this location
preferred_language (str) – Default email language.
announcement_language (str) – Location’s phone announcement language.
address1 (str) – Address 1
address2 (str) – Address 2
city (str) – City
state (str) – State Code
postal_code (str) – Postal Code
country (str) – ISO-3166 2-Letter Country Code.
org_id (str) – Create a location common attribute for this organization.
latitude (str) – Latitude
longitude (str) – Longitude
notes (str) – Notes
- Returns:
ID of new location
- Return type:
str
- update(location_id: str, settings: Location, org_id: str | None = None)[source]
Update details for a location, by ID.
Specify the location ID in the locationId parameter in the URI. Only an admin can update a location details.
Updating a location in your organization requires an administrator auth token with the spark-admin:locations_write.
- Parameters:
location_id (str) – Update location common attributes for this location.
settings (
Location
) – new settings for the org:org_id (str) – Update location common attributes for this organization
- list_floors(location_id: str) List[Floor] [source]
List Location Floors
List location floors. Requires an administrator auth token with the spark-admin:locations_read scope.
- Parameters:
location_id (str) – A unique identifier for the location.
- Return type:
list[Floor]
- create_floor(location_id: str, floor_number: int, display_name: str | None = None) Floor [source]
Create a 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. Requires an administrator auth token with the spark-admin:locations_write scope.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_number (int) – The floor number.
display_name (str) – The floor display name.
- Return type:
- floor_details(location_id: str, floor_id: str) Floor [source]
Get Location Floor Details
Shows details for a floor, by ID. Specify the floor ID in the floorId parameter in the URI. Requires an administrator auth token with the spark-admin:locations_read scope.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_id (str) – A unique identifier for the floor.
- Return type:
- update_floor(floor: Floor) Floor [source]
Update a Location Floor
Updates details for a floor, by ID. Specify the floor ID in the floorId parameter in the URI. Include all details for the floor returned by a previous call to Get Location Floor Details. Omitting the optional displayName field will result in that field no longer being defined for the floor. Requires an administrator auth token with the spark-admin:locations_write scope.
- delete_floor(location_id: str, floor_id: str)[source]
Delete a Location Floor
Deletes a floor, by ID. Requires an administrator auth token with the spark-admin:locations_write scope.
- Parameters:
location_id (str) – A unique identifier for the location.
floor_id (str) – A unique identifier for the floor.
- Return type:
None
- base = 'locations'