Skip to main content

phonebook_phonebook_contacts

Creates, updates, deletes, gets or lists a phonebook_phonebook_contacts resource.

Overview​

Namephonebook_phonebook_contacts
TypeResource
Idovh.telephony.phonebook_phonebook_contacts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerContact identifier
namestringContact name
groupstringGroup name of the phonebook
home_mobilestring (phone-number)Home mobile phone number of the contact (wire: homeMobile)
home_phonestring (phone-number)Home landline phone number of the contact (wire: homePhone)
surnamestringContact surname
work_mobilestring (phone-number)Mobile phone office number of the contact (wire: workMobile)
work_phonestring (phone-number)Landline phone office number of the contact (wire: workPhone)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, book_key, idGet a contact
listselectbilling_account, book_keyx_pagination_modeList contacts
createinsertbilling_account, book_key, group, name, surnameCreate a contact
updateupdatebilling_account, book_key, idUpdate a contact
deletedeletebilling_account, book_key, idDelete a contact

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
billing_accountstringThe name of your billingAccount (wire: billingAccount)
book_keystringIdentifier of the phonebook (wire: bookKey)
idintegerContact identifier
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a contact

SELECT
id,
name,
group,
home_mobile,
home_phone,
surname,
work_mobile,
work_phone
FROM ovh.telephony.phonebook_phonebook_contacts
WHERE billing_account = '{{ billing_account }}' -- required
AND book_key = '{{ book_key }}' -- required
AND id = '{{ id }}' -- required
;

INSERT examples​

Create a contact

INSERT INTO ovh.telephony.phonebook_phonebook_contacts (
group,
home_mobile,
home_phone,
name,
surname,
work_mobile,
work_phone,
billing_account,
book_key
)
SELECT
'{{ group }}' /* required */,
'{{ home_mobile }}',
'{{ home_phone }}',
'{{ name }}' /* required */,
'{{ surname }}' /* required */,
'{{ work_mobile }}',
'{{ work_phone }}',
'{{ billing_account }}',
'{{ book_key }}'
;

UPDATE examples​

Update a contact

UPDATE ovh.telephony.phonebook_phonebook_contacts
SET
group = '{{ group }}',
home_mobile = '{{ home_mobile }}',
home_phone = '{{ home_phone }}',
name = '{{ name }}',
surname = '{{ surname }}',
work_mobile = '{{ work_mobile }}',
work_phone = '{{ work_phone }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND book_key = '{{ book_key }}' --required
AND id = '{{ id }}' --required;

DELETE examples​

Delete a contact

DELETE FROM ovh.telephony.phonebook_phonebook_contacts
WHERE billing_account = '{{ billing_account }}' --required
AND book_key = '{{ book_key }}' --required
AND id = '{{ id }}' --required
;