Follow

Get List Count

The Get List Count commands allow you to return the number of subscribers in a list specified by ID. The commands require the following arguments: Command, Realm, Password, and either List name or List ID.

api_web?r=myrealm&p=mypass&c=getlistcount&list_id=42

The command is ‘getlistcount’, the realm is ‘myrealm’, the password is ‘mypass’, and the ID is '42'. 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=getlistcount&list_id=42

Successful results return the total number of subscribers in the list:

SUCCESS: 1988

Results

The Get List Count command outputs either the total number of subscribers or a FAILURE message. 

SUCCESS

The Get List Count command returns a Success code with a count.  The result format is:

SUCCESS: [subscriber_count] 

FAILURE

A Get List Count command will fail for several reasons, such as if the List does not exist.  The result format is:

FAILURE: [Reason]  

Arguments

The Get List Count commands support the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=getlistcount

c=getlistcount

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 Identification Yes ID of the list to display. 

list_id=[list_id]

*Feature added in v12.06.0

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk