Skip to main content

sounds

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

Overview​

Namesounds
TypeResource
Idovh.telephony.sounds

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerSound ID
creation_datestring (date-time)Sound creation date (wire: creationDate)
descriptionstringSound description
filenamestringSound filename
get_urlstringURL to get sound file (wire: getUrl)
put_urlstringURL to upload sound file (wire: putUrl)
sizeintegerSound file size (in bytes)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidGet a sound
listselectx_pagination_modeSounds attached to this telephony account
createinsertfilenameCreate a sound
updateupdateidUpdate a sound
deletedeleteidDelete a sound

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"}})
idintegerSound ID
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 sound

SELECT
id,
creation_date,
description,
filename,
get_url,
put_url,
size
FROM ovh.telephony.sounds
WHERE id = '{{ id }}' -- required
;

INSERT examples​

Create a sound

INSERT INTO ovh.telephony.sounds (
description,
filename
)
SELECT
'{{ description }}',
'{{ filename }}' /* required */
RETURNING
id,
creation_date,
description,
filename,
get_url,
put_url,
size
;

UPDATE examples​

Update a sound

UPDATE ovh.telephony.sounds
SET
description = '{{ description }}',
filename = '{{ filename }}'
WHERE
id = '{{ id }}' --required;

DELETE examples​

Delete a sound

DELETE FROM ovh.telephony.sounds
WHERE id = '{{ id }}' --required
;