Skip to main content

line_traffic_extracts

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

Overview​

Nameline_traffic_extracts
TypeResource
Idovh.telephony.line_traffic_extracts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerThe id of the traffic extract
date_endstring (date-time)The start date of the traffic extract (wire: dateEnd)
date_startstring (date-time)The start date of the traffic extract (wire: dateStart)
file_sizeintegerThe PCAP file size of the traffic extract (wire: fileSize)
file_urlstringThe PCAP URL of the traffic extract (wire: fileUrl)
statusstringThe status of the extract (doing, done, error, pause, todo)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, id, service_nameGet a traffic extract
listselectbilling_account, service_namex_pagination_modeList traffic extracts
createinsertbilling_account, service_name, date_end, date_startStart a traffic extract
deletedeletebilling_account, id, service_nameDelete a traffic extract

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)
idintegerId of the object
service_namestring (wire: serviceName)
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 traffic extract

SELECT
id,
date_end,
date_start,
file_size,
file_url,
status
FROM ovh.telephony.line_traffic_extracts
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Start a traffic extract

INSERT INTO ovh.telephony.line_traffic_extracts (
date_end,
date_start,
billing_account,
service_name
)
SELECT
'{{ date_end }}' /* required */,
'{{ date_start }}' /* required */,
'{{ billing_account }}',
'{{ service_name }}'
RETURNING
id,
date_end,
date_start,
file_size,
file_url,
status
;

DELETE examples​

Delete a traffic extract

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