sounds
Creates, updates, deletes, gets or lists a sounds resource.
Overview​
| Name | sounds |
| Type | Resource |
| Id | ovh.telephony.sounds |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Sound ID |
creation_date | string (date-time) | Sound creation date (wire: creationDate) |
description | string | Sound description |
filename | string | Sound filename |
get_url | string | URL to get sound file (wire: getUrl) |
put_url | string | URL to upload sound file (wire: putUrl) |
size | integer | Sound file size (in bytes) |
List sounds
| Name | Datatype | Description |
|---|---|---|
id | integer | Sound ID |
creation_date | string (date-time) | Sound creation date (wire: creationDate) |
description | string | Sound description |
filename | string | Sound filename |
get_url | string | URL to get sound file (wire: getUrl) |
put_url | string | URL to upload sound file (wire: putUrl) |
size | integer | Sound file size (in bytes) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Get a sound | |
list | select | x_pagination_mode | Sounds attached to this telephony account | |
create | insert | filename | Create a sound | |
update | update | id | Update a sound | |
delete | delete | id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
id | integer | Sound ID |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a sound
SELECT
id,
creation_date,
description,
filename,
get_url,
put_url,
size
FROM ovh.telephony.sounds
WHERE id = '{{ id }}' -- required
;
Sounds attached to this telephony account
SELECT
id,
creation_date,
description,
filename,
get_url,
put_url,
size
FROM ovh.telephony.sounds
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: sounds
props:
- name: description
value: "{{ description }}"
description: |
Sound description
- name: filename
value: "{{ filename }}"
description: |
Sound filename
UPDATE examples​
- update
Update a sound
UPDATE ovh.telephony.sounds
SET
description = '{{ description }}',
filename = '{{ filename }}'
WHERE
id = '{{ id }}' --required;
DELETE examples​
- delete
Delete a sound
DELETE FROM ovh.telephony.sounds
WHERE id = '{{ id }}' --required
;