The Get Test Count command allows you to determine the number of contacts that match a combination of List, Segmentation Rule, Suppression List. The command requires the following arguments: Command, Realm, Password, and List ID.
api_web?r=myrealm&p=mypass&c=gettestcountfordeployment&list_id=5
The command is ‘gettestcountfordeployment’, the realm is ‘myrealm’ and the password is ‘mypass’, returning the number of contacts in list '5'.
Example
Using all commands and arguments (please note the command is wrapped for display purposes only):
api_web?r=myrealm&p=mypass&c=gettestcountfordeployment&list_id=5&segmentation_id=3&suppression_list=my%20suppression
Successful results return the total number of contacts in the List with the Segmentation and Suppression applied:
SUCCESS: 668
Results
The Get Test Count command outputs either a SUCCESS or a FAILURE message.
SUCCESS
The Get Test Count command returns the number of contacts. The result format is:
SUCCESS: [count]
FAILURE
A Get Test Count command will fail for several reasons, such as if the list does not exist. The result format is:
FAILURE: [Reason]
Arguments
The Get Test Count command supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd=gettestcountfordeployment c=gettestcountfordeployment |
Realm |
Yes |
Name of the realm to run the command. This is required, and the command will fail if the realm and password do not match. |
realm=[realm_name] r=[realm_name] |
Password |
Yes |
Authentication code for API access. This is required, and the command will fail if the realm and password do not match. |
pwd=[password] p=[password] |
List | Yes |
Identifier of the list of contacts to target. |
list_id=[list_id] |
Segmentation Rule |
|
Identifier of the segmentation rule to use to limit the contacts. |
segmentation_id=[segmentation_rule_id] |
Suppression List |
To suppress contacts in the list from the count, use the Suppression List by defining the File Name of the Suppression List. | suppression_list=[suppression_list_name] |
*Feature added in v12.06.0