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, address2: str | None = None, city: str, state: str | None = None, postalCode: str | None = None, country: str | None = None)[source]
Bases:
ApiModel
Address of a
Location
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.
- address1: str
address line 1
- address2: str | None
address line 2
- city: str
city
- state: str | None
state
- postal_code: str | None
ZIP/Postal code
- country: str | None
country
- 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)[source]
Bases:
ApiModel
Webex location
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.
- 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.
- property location_id_uuid: str
location id as UUID
- property org_id_uuid: str
org id as UUID
- 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, 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.
- 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.
- Returns:
ID of new location
- Return type:
- 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
- base = 'locations'
- session: RestSession
REST session