wxc_sdk.org_contacts package

class wxc_sdk.org_contacts.ContactPhoneNumber(*, value: str | None = None, type: ScimPhoneNumberType | None = None, primary: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

value: str | None

The phone number.

type: ScimPhoneNumberType | None

The types of the phone numbers.

primary: bool | None

A Boolean value indicating the phone number’s primary status.

class wxc_sdk.org_contacts.Contact(*, contactId: str | None = None, schemas: str = 'urn:cisco:codev:identity:contact:core:1.0', meta: Meta | None = None, displayName: str | None = None, firstName: str | None = None, lastName: str | None = None, companyName: str | None = None, title: str | None = None, address: str | None = None, addressInfo: ContactAddress | None = None, avatarURL: str | None = None, primaryContactMethod: PrimaryContactMethod | None = None, source: str | None = None, isMigration: bool | None = None, orgId: str | None = None, emails: list[ContactEmail] | None = None, phoneNumbers: list[ContactPhoneNumber] | None = None, sipAddresses: list[ContactSipAddress] | None = None, ims: list[ContactIm] | None = None, groupIds: list[str] | None = None, **extra_data: Any)[source]

Bases: ApiModel

contact_id: str | None

Use this to update an existing contact.

schemas: str

codev:identity:contact:core:1.0”.

Type:

“urn

Type:

cisco

meta: Meta | None

Response metadata.

display_name: str | None

The full name of the contact.

first_name: str | None

The first name of the contact.

last_name: str | None

The last name of the contact.

company_name: str | None

The company the contact is working for.

title: str | None

The contact’s title.

address: str | None

Contact’s address

address_info: ContactAddress | None

Contact’s address details

avatar_url: str | None

The URL to the person’s avatar in PNG format.

primary_contact_method: PrimaryContactMethod | None

The contact’s primary contact method.

source: str | None

Where the data come from.

is_migration: bool | None
org_id: str | None
emails: list[ContactEmail] | None

A list of the user’s email addresses with an indicator of the user’s primary email address.

phone_numbers: list[ContactPhoneNumber] | None

A list of user’s phone numbers with an indicator of primary to specify the user’s main number.

sip_addresses: list[ContactSipAddress] | None

The sipAddress values for the user.

ims: list[ContactIm] | None

Instant messaging addresses for the user.

group_ids: list[str] | None

Groups associated with the contact.

class wxc_sdk.org_contacts.Meta(*, created: datetime | None = None, lastModified: datetime | None = None, **extra_data: Any)[source]

Bases: ApiModel

created: datetime | None

The date and time the contact was created.

last_modified: datetime | None

The date and time the contact was last changed.

class wxc_sdk.org_contacts.OrganizationContactsApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

Organization Contacts

Organizational contacts are entities that can be created, imported, or synchronized with Webex. Searching and viewing contacts require an auth token with a scope of Identity:contact or Identity:SCIM, while adding, updating, and removing contacts in your Organization requires an administrator auth token with the Identity:contact or Identity:SCIM scope. An admin can only operate on the contacts list for his org or a managed org.

Note:

  • broadworks-connector entitled callers are limited to org contacts with either source=`CH` or source=`Webex4Broadworks`, while non-entitled callers are limited to source=`CH`.

  • The orgId used in the path for this API are the org UUIDs. They follow a xxxx-xxxx-xxxx-xxxx pattern. If you have an orgId in base64 encoded format (starting with Y2…..) you need to base64 decode the id and extract the UUID from the slug, before you use it in your API call.

create(org_id: str, contact: Contact) Contact[source]

Create a Contact

Creating a new contact for a given organization requires an org admin role.

At least one of the following body parameters: phoneNumbers, emails, sipAddresses is required to create a new contact for source “CH”, displayName is required to create a new contact for source “Webex4Broadworks”.

Use the optional groupIds field to add group IDs in an array within the organisation contact. This will become a group contact.

Parameters:
  • org_id (str) – Webex Identity assigned organization identifier for the user’s organization or the organization he manages.

  • contact (Contact) – The contact to create.

Return type:

None

get(org_id: str, contact_id: str) Contact[source]

Get a Contact

Shows details for an organization contact by ID. Specify the organization ID in the orgId parameter in the URI, and specify the contact ID in the contactId parameter in the URI.

NOTE: The orgId used in the path for this API are the org UUIDs. They follow a xxxx-xxxx-xxxx-xxxx pattern. If you have an orgId in base64 encoded format (starting with Y2…..) you need to base64 decode the id and extract the UUID from the slug, before you use it in your API call.

Parameters:
  • org_id (str) – Webex Identity assigned organization identifier for the user’s organization or the organization he manages.

  • contact_id (str) – The contact ID.

Return type:

Contact

update(org_id: str, contact_id: str, update: Contact)[source]

Update a Contact

Update details for contact by ID. Only an admin can update a contact. Specify the organization ID in the orgId parameter in the URI, and specify the contact ID in the contactId parameter in the URI.

Use the optional groupIds field to update the group IDs by changing the existing array. You can add or remove one or all groups. To remove all associated groups, pass an empty array in the groupIds field.

Parameters:
  • org_id (str) – Webex Identity assigned organization identifier for the user’s organization or the organization he manages.

  • contact_id (str) – The contact ID.

  • update (Contact) – the update

Return type:

None

delete(org_id: str, contact_id: str)[source]

Delete a Contact

Remove a contact from the organization. Only an admin can remove a contact.

Specify the organization ID in the orgId parameter in the URI, and specify the contact ID in the contactId parameter in the URI.

Parameters:
  • org_id (str) – Webex Identity assigned organization identifier for the user’s organization or the organization he manages.

  • contact_id (str) – The contact ID.

Return type:

None

list(org_id: str, keyword: str = None, source: str = None, limit: int = None, group_ids: list[str] = None) Generator[Contact, None, None][source]

List Contacts

List contacts in the organization. The default limit is 100.

keyword can be the value of “displayName”, “firstName”, “lastName”, “email”. An empty string of keyword means get all contacts.

groupIds is a comma separated list group IDs. Results are filtered based on those group IDs.

Long result sets will be split into pages.

Parameters:
  • org_id (str) – The organization ID.

  • keyword (str) – List contacts with a keyword.

  • source (str) – List contacts with source.

  • limit (int) – Limit the maximum number of contact in the response. Default: 100

  • group_ids (list[str]) – Filter contacts based on groups.

bulk_create_or_update(org_id: str, contacts: list[Contact]) BulkResponse[source]

Bulk Create or Update Contacts

Create or update contacts in bulk. Update an existing contact by specifying the contact ID in the contactId parameter in the request body.

Parameters:
  • org_id (str) – Webex Identity assigned organization identifier for the user’s organization or the organization he manages.

  • contacts (list[BulkCreateContact]) – Contains a list of contacts to be created/updated.

Return type:

None

bulk_delete(org_id: str, object_ids: list[str])[source]

Bulk Delete Contacts

Delete contacts in bulk.

Parameters:
  • org_id (str) – Webex Identity assigned organization identifier for the user’s organization or the organization he manages.

  • object_ids (list[str]) – List of UUIDs for the contacts.

Return type:

None

base = 'contacts/organizations'
class wxc_sdk.org_contacts.ContactEmail(*, value: str | None = None, type: EmailType | None = None, primary: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

value: str | None

The email address.

type: EmailType | None

The type of the email.

primary: bool | None

A Boolean value indicating the email status.

class wxc_sdk.org_contacts.EmailType(*values)[source]

Bases: str, SafeEnum

An enumeration.

work = 'WORK'
home = 'HOME'
room = 'ROOM'
other = 'OTHER'
class wxc_sdk.org_contacts.ContactIm(*, value: str | None = None, type: ContactImType | None = None, primary: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

value: str | None

The IMS account value.

type: ContactImType | None

The type of the IMS.

primary: bool | None

A Boolean value indicating the IMS account status.

class wxc_sdk.org_contacts.ContactImType(*values)[source]

Bases: str, SafeEnum

An enumeration.

aim = 'aim'
cucm_jid = 'cucm-jid'
gtalk = 'gtalk'
icq = 'icq'
msn = 'msn'
qq = 'qq'
skype = 'skype'
webex_messenger_jid = 'webex-messenger-jid'
webex_squared_jid = 'webex-squared-jid'
xmpp = 'xmpp'
yahoo = 'yahoo'
microsoft_sip_uri = 'microsoft-sip-uri'
xmpp_fed_jid = 'xmpp-fed-jid'
class wxc_sdk.org_contacts.UpdateContactPhoneNumbers(*, value: str | None = None, type: ScimPhoneNumberType | None = None, primary: bool | None = None, operation: str | None = None, **extra_data: Any)[source]

Bases: ContactPhoneNumber

operation: str | None
  • A String value on the operation, only delete is supported now.

class wxc_sdk.org_contacts.PrimaryContactMethod(*values)[source]

Bases: str, SafeEnum

An enumeration.

sipaddress = 'SIPADDRESS'
email = 'EMAIL'
phone = 'PHONE'
ims = 'IMS'
class wxc_sdk.org_contacts.ContactSipAddress(*, value: str | None = None, type: SipType | None = None, primary: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

value: str | None

The sipAddress value.

type: SipType | None

The type of the sipAddress.

primary: bool | None

Designate the primary sipAddress.

class wxc_sdk.org_contacts.ContactAddress(*, city: str | None = None, country: str | None = None, state: str | None = None, street: str | None = None, zipCode: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

city: str | None
country: str | None
state: str | None
street: str | None
zip_code: str | None