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, **extra_data: Any)[source]
Bases:
ApiModel- address1: str | None
Address 1 of the location.
- address2: str | None
Address 2 of the location.
- city: str | None
City of the location.
- state: str | None
State code of the location.
- postal_code: str | None
Postal code of the location.
- country: str | None
ISO-3166 2-Letter country code of the location.
- 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, **extra_data: Any)[source]
Bases:
ApiModelWebex 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, **extra_data: Any)[source]
Bases:
ApiModel- id: str | None
Unique identifier for the floor.
- location_id: str | None
Unique identifier for the location.
- floor_number: int | None
The floor number.
- display_name: str | None
The floor display name.
- class wxc_sdk.locations.LocationsApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChildLocations
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. To enable a location for Webex Calling, use the Enable a Location for Webex Calling API. 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
List locations for an organization.
Use query parameters to filter the result set by location name, ID, or organization.
Long result sets will be split into pages.
Searching and viewing locations in your organization requires an administrator or location administrator auth token with any of the following scopes: spark-admin:locations_read, spark-admin:people_read or spark-admin:device_read.
- 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
Locationinstances
- 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]
Get Location Details
Shows details for a location, by ID.
Specify the location ID in the locationId parameter in the URI.
Use query parameter orgId to filter the result set by organization(optional).
Searching and viewing location in your organization requires an administrator or location administrator auth token with any of the following scopes:
spark-admin:locations_read
spark-admin:people_read
spark-admin:device_read
- 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 Location
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 a full administrator auth token with a scope of 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
- delete(location_id: str, org_id: str | None = None)[source]
Delete Location
Delete a location, by ID.
Specify the location ID in the locationId parameter in the URI.
Deleting a location in your organization requires a full administrator auth token with a scope of
spark-admin:locations_write.
NOTE: Disabling Webex Calling for a Webex Calling enabled location is required prior to deleting a location.
- Parameters:
location_id (str) – A unique identifier for the location.
org_id (str) – Specify the organization for the location to be deleted.
- Return type:
None
- 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
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'