Campaign List API

The Campaign List API lets you programmatically define filters (based on time, state, etc.) that extract campaign names and identifiers.

Create the Base URL

For example:
 https://testandtarget.omniture.com/api?client=user&email=user@corp1.com&password=pword
Parameter Description
client (Optional) The T&T client name.
email (Required) The Email address associated with the T&T client.
password (Required) The T&T client password.

Parameters and values are case sensitive.

Include Parameters to Filter the Query

For each operation add the parameters and values you need as a filter. For example:
 https://testandtarget.omniture.com/api?client=acme&email=john@acme.com&password=mypassword&operation=campaignList&before=2007-01-27T12:00&after=2006-04-01T00:00&environment=testEnvironment&name=test&state=saved,activated&labels=label1,library,label2
Parameter Description
operation (Required) Identifies the type of T&T action to execute. To generate campaign list reports, this value is always campaignList.
before (Required) A date value. Includes campaigns that were active at least once before the specified date. By default, the before parameter is 2100-01-01T00:00.
after (Optional) A date value. Includes campaigns that were active at least once after the specified date. By default, the after parameter is 1969-00-00T00:00.
environment (Optional) A URL-encoded host group name, as defined in the T&T Tool. By default, the environment value is Production.
name (Optional) The campaign name, or portion of the campaign name, that you want to match.
state (Optional) Comma-separated list of states to match. Supported values include: saved, activated, library. By default, the filtered results include all states.
labels (Optional) Comma-separated list of labels to match. By default, the filtered results include all labels.

Inspect the Query Response

A successful query response uses the following XML structure:
 <campaigns>
  <campaign>
    <id>16</id>
    <name>Test Campaign A</name>
  </campaign>
  <campaign>
    <id>17</id>
    <name>Test Campaign B</name>
  </campaign>
</campaigns>
Tag Description
campaign A single campaign.
id The campaign identifier. Use this value with the Campaign Performance Report API.
name The campaign name you specified.
A failed query response uses the following XML structure:
<error>
   <message>Invalid email or password supplied. Email: john@acme.com</message>
   <code>401</code>
</error> 

Tag Description
message A description of the error. For example: Invalid email or password supplied. Email: john@acme.com.
code The error code. For example: 401

Parse the Query Response

Optionally, you can use a scripting language, such as Perl, Python, and Ruby, and the Campaign Performance Report API to iterate through the query result and retrieve specific campaign detail reports.

Comments (0)

Must be logged in to comment. or register now to comment!