fax_campaigns
Creates, updates, deletes, gets or lists a fax_campaigns resource.
Overview​
| Name | fax_campaigns |
| Type | Resource |
| Id | ovh.telephony.fax_campaigns |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | The id of the fax campaign |
name | string | The name of the fax campaign |
count_failed | integer | The count of failed faxes in the campaign (wire: countFailed) |
count_success | integer | The count of success faxes in the campaign (wire: countSuccess) |
count_total | integer | The total count of faxes in the campaign (wire: countTotal) |
date_end | string (date-time) | The end date of the fax campaign (wire: dateEnd) |
date_start | string (date-time) | The start date of the fax campaign (wire: dateStart) |
reference | string | The reference of the fax campaign |
status | string | The status of the fax campaign |
Fax campaigns
| Name | Datatype | Description |
|---|---|---|
id | integer | The id of the fax campaign |
name | string | The name of the fax campaign |
count_failed | integer | The count of failed faxes in the campaign (wire: countFailed) |
count_success | integer | The count of success faxes in the campaign (wire: countSuccess) |
count_total | integer | The total count of faxes in the campaign (wire: countTotal) |
date_end | string (date-time) | The end date of the fax campaign (wire: dateEnd) |
date_start | string (date-time) | The start date of the fax campaign (wire: dateStart) |
reference | string | The reference of the fax campaign |
status | string | The status of the fax campaign |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, id, service_name | Get a campaign. Returns the campaign: name, reference, status, dates, and the number of faxes sent, successful and failed. | |
list | select | billing_account, service_name | x_pagination_mode | List campaigns. Returns the identifiers of the fax campaigns of the service. Get a campaign for its status, dates and counters. |
create | insert | billing_account, service_name, document_id, name, recipients_type, send_type | Create a campaign. Creates a campaign that sends a PDF document to a list of numbers or to the numbers of a document. The campaign is sent manually, automatically or at a scheduled date. | |
delete | delete | billing_account, id, service_name | Delete a campaign. Deletes the fax campaign from the fax service. The campaign no longer appears in the list of campaigns. | |
start | exec | billingAccount, id, serviceName | Start a campaign. Starts sending the campaign to its recipients. Follow the progress with the success and failure counters of the campaign. | |
stop | exec | billingAccount, id, serviceName | Stop a campaign. Stops sending the campaign to its recipients. The success and failure counters of the campaign show the faxes sent before the stop. |
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"}}) |
billingAccount | string | The name of your billingAccount |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
id | integer | Id of the object |
serviceName | string | |
service_name | string | (wire: serviceName) |
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 campaign. Returns the campaign: name, reference, status, dates, and the number of faxes sent, successful and failed.
SELECT
id,
name,
count_failed,
count_success,
count_total,
date_end,
date_start,
reference,
status
FROM ovh.telephony.fax_campaigns
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List campaigns. Returns the identifiers of the fax campaigns of the service. Get a campaign for its status, dates and counters.
SELECT
id,
name,
count_failed,
count_success,
count_total,
date_end,
date_start,
reference,
status
FROM ovh.telephony.fax_campaigns
WHERE billing_account = '{{ billing_account }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a campaign. Creates a campaign that sends a PDF document to a list of numbers or to the numbers of a document. The campaign is sent manually, automatically or at a scheduled date.
INSERT INTO ovh.telephony.fax_campaigns (
document_id,
fax_quality,
name,
recipients_doc_id,
recipients_list,
recipients_type,
send_date,
send_type,
billing_account,
service_name
)
SELECT
'{{ document_id }}' /* required */,
'{{ fax_quality }}',
'{{ name }}' /* required */,
'{{ recipients_doc_id }}',
'{{ recipients_list }}',
'{{ recipients_type }}' /* required */,
'{{ send_date }}',
'{{ send_type }}' /* required */,
'{{ billing_account }}',
'{{ service_name }}'
RETURNING
id,
name,
count_failed,
count_success,
count_total,
date_end,
date_start,
reference,
status
;
# Description fields are for documentation purposes
- name: fax_campaigns
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the fax_campaigns resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the fax_campaigns resource.
- name: document_id
value: "{{ document_id }}"
description: |
The id of the /me/document pdf you want to send
- name: fax_quality
value: "{{ fax_quality }}"
description: |
The quality of the fax you want to send
valid_values: ['best', 'high', 'normal']
- name: name
value: "{{ name }}"
description: |
The name of the fax campaign
- name: recipients_doc_id
value: "{{ recipients_doc_id }}"
description: |
If recipientsType is set to document, the id of the document containing the recipients phone numbers
- name: recipients_list
value:
- "{{ recipients_list }}"
description: |
If recipientsType is set to list, the list of recipients phone numbers
- name: recipients_type
value: "{{ recipients_type }}"
description: |
Method to set the campaign recipient
valid_values: ['document', 'list']
- name: send_date
value: "{{ send_date }}"
description: |
Sending date of the campaign (when sendType is scheduled)
- name: send_type
value: "{{ send_type }}"
description: |
Sending type of the campaign
valid_values: ['automatic', 'manual', 'scheduled']
DELETE examples​
- delete
Delete a campaign. Deletes the fax campaign from the fax service. The campaign no longer appears in the list of campaigns.
DELETE FROM ovh.telephony.fax_campaigns
WHERE billing_account = '{{ billing_account }}' --required
AND id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- start
- stop
Start a campaign. Starts sending the campaign to its recipients. Follow the progress with the success and failure counters of the campaign.
EXEC ovh.telephony.fax_campaigns.start
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
;
Stop a campaign. Stops sending the campaign to its recipients. The success and failure counters of the campaign show the faxes sent before the stop.
EXEC ovh.telephony.fax_campaigns.stop
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
;