Skip to main content
Skip table of contents

API: HTTP Report Campaign List

 

The Report Campaign List command allows you to return a list of campaigns run in a date range.   

Arguments

The Report Campaign List command requires the following arguments: Command, Realm, Password, From Date, and To Date.

api_web?r=myrealm&p=mypass&c=rpt_campaign_list&from_date=01/01/2012&to_date=01/31/2012

The command is ‘rpt_campaign_list’, the realm is ‘myrealm’ and the password is ‘mypass’.  The command will return every campaign run from January 1, 2012 to January 31, 2012 and will include:

"campaign_id","list_id","list_name","subject","deploy_date","pieces_sent"

The Report Campaign List command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=rpt_campaign_list

c=rpt_campaign_list

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]

Start Date

Yes

Date to report statistics from.

from_date=[mm/dd/yyyy]

End DateYesDate to report statistics through.

to_date=[mm/dd/yyyy]

Show Hidden To include hidden campaigns in the results, set to 1.  By default, hidden campaigns will not be included in the results.

show_hidden=[0,1]

 

DEFAULT==0

Version

 

Version of API to use.  Data may be added to newer versions of the API.  To alleviate issues for users who have already coded file parsing, new columns are only displayed if the version is included.

version=[version_number]

8.3.10 = include task_id

Output Format

 

To specify the format of the list output, use one of two arguments.  If no argument is included, the default output is space-delimited plain text string, which may not include all data columns.

csv=1 or

output_format=[csv,csv_tab, csv_pipe,xml]

Header

 

To define the data with a label, use the Header argument.  This can only be used in conjunction with the output format, and does not affect XML.

headers=[0,1]

DEFAULT==0

 

Example

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

api_web?c=rpt_campaign_list&r=myrealm&p=mypass&from_date=01/01/2012&to_date=01/31/2012&show_hidden=1&version=8.6.10&output_format=csv&headers=1

Successful results return:

"campaign_id","list_id","list_name","subject","deploy_date","pieces_sent","task_id" "4650","64","My List","My Template","2012-01-03 09:45:46","1","123" "4652","11","My List 2","My Template","2012-01-20 10:26:32","15","127" "4654","5","A List","A Template","2012-01-30 10:38:53","125","198"  

Results

The Report Campaign List command outputs either the results of the search or a FAILURE message. 

SUCCESS

The Report Campaign List command does not explicitly return a Success code.  Instead, it outputs the campaign details in plain text format.  Use the output_format argument to return the results in an alternate format.

FAILURE

A Report Campaign List command will fail for several reasons.  The result format is:

FAILURE: [Reason]  

 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.