Skip to main content

batches_statistics

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

Overview​

Namebatches_statistics
TypeResource
Idovh.sms.batches_statistics

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Batch ID
creditsnumberThe cost of the batch in credits, computed during batch processing
deliveredintegerNumber of SMS that are delivered
estimated_creditsnumberThe estimated cost of the batch in credits, computed before batch processing (wire: estimatedCredits)
failedintegerNumber of SMS in error
pendingintegerNumber of SMS that are in pending status
sentintegerNumber of SMS that are sent to the broker
stoplistedintegerNumber of SMS that received a STOP by the receiver

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameReturns the batch statistics: delivered, sent, pending, failed and stoplisted SMS, and the credits used.

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"}})
idstring (uuid)Id
service_namestringThe internal name of your SMS offer (wire: serviceName)

SELECT examples​

Returns the batch statistics: delivered, sent, pending, failed and stoplisted SMS, and the credits used.

SELECT
id,
credits,
delivered,
estimated_credits,
failed,
pending,
sent,
stoplisted
FROM ovh.sms.batches_statistics
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;