documents
Creates, updates, deletes, gets or lists a documents resource.
Overview​
| Name | documents |
| Type | Resource |
| Id | ovh.sms.documents |
Fields​
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
value | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, way_type | batch_id, creation_datetime.from, creation_datetime.to, tag | 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. |
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"}}) |
service_name | string | The internal name of your SMS offer (wire: serviceName) |
way_type | string | specify outgoing or incoming sms (wire: wayType) |
batch_id | string (uuid) | Filter SMSs with their batch ID (outgoing SMSs only) (wire: batchID) |
creation_datetime.from | string (date-time) | Filter the value of creationDatetime property (>=) (wire: creationDatetime.from) |
creation_datetime.to | string (date-time) | Filter the value of creationDatetime property (<=) (wire: creationDatetime.to) |
tag | string | Select sms with a specific identifier group tag |
SELECT examples​
- get
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 }}'
;