Skip to main content

documents

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

Overview​

Namedocuments
TypeResource
Idovh.sms.documents

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
valuestring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, way_typebatch_id, creation_datetime.from, creation_datetime.to, tagExport SMS to a document. Generates a document with the SMS of the account, filtered by tag, date, direction or batch. Returns the identifier of the document in /me/document.

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"}})
service_namestringThe internal name of your SMS offer (wire: serviceName)
way_typestringspecify outgoing or incoming sms (wire: wayType)
batch_idstring (uuid)Filter SMSs with their batch ID (outgoing SMSs only) (wire: batchID)
creation_datetime.fromstring (date-time)Filter the value of creationDatetime property (>=) (wire: creationDatetime.from)
creation_datetime.tostring (date-time)Filter the value of creationDatetime property (<=) (wire: creationDatetime.to)
tagstringSelect sms with a specific identifier group tag

SELECT examples​

Export SMS to a document. Generates a document with the SMS of the account, filtered by tag, date, direction or batch. Returns the identifier of the document in /me/document.

SELECT
value
FROM ovh.sms.documents
WHERE service_name = '{{ service_name }}' -- required
AND way_type = '{{ way_type }}' -- required
AND batch_id = '{{ batch_id }}'
AND creation_datetime.from = '{{ creation_datetime.from }}'
AND creation_datetime.to = '{{ creation_datetime.to }}'
AND tag = '{{ tag }}'
;