Description
This method returns the current status of tasks specified by Task ID and/or date range. A maximum of 1,000 tasks – ordered by the start date of the task – are returned.
Arguments
Field | Description | Field Type | Required | Example |
---|---|---|---|---|
task_id | a comma-delimited list of Task IDs | string | No | 1234, 1244, 1246 |
status | Any one of the following values:
|
string | No | COMPLETE |
type | Any one of the following values:
|
string | No | IMPORT |
start_date | Beginning date of the range requested | date (in YYYY-MM-DD format) | No | 2010-05-01 |
end_date | Ending date of the range requested | date (in YYYY-MM-DD format) | No | 2010-05-31 |
Response
Field | Description | Example |
---|---|---|
responseText | Total number of tasks included in the result set | 3 tasks retrieved |
task | This element is the wrapper for each individual task returned in the result set depending upon the input parameters. | |
item | This element contains the individual descriptors of any given task | |
task_id | Task ID of the specific scheduled job | 1234 |
type | see 'type' in Arguments section above | IMPORT |
status | see 'status' in Arguments section above | COMPLETE |
description | Human-readable description of the type of task | All Contacts Import |
run_date | Date and time that the task was initiated in YYYY-MM-DD HH:Min:SS format in Pacific (US) time zone. | 2010-05-01 14:34:12 |
output | If the task generates any output, it will be included here wrapped within CDATA tags | <![CDATA[Your list of 5 unique contacts was imported]]> |
task_response | Will be included in the response message when the <type> input element is set to EXPORT_MESSAGE_CONTACTS. It will indicate the path where the data export file resides for retrieval using the utilities.getFile method call. | export_files/message_contacts_data_20111030_162323.xml |
Response Codes
Error Condition | responseCode | responseText | responseData |
---|---|---|---|
An invalid value for <task_id> | 431 | Generic Error | |
Either (or both) POSTed date is not in a recognizable format, or it is invalid | 432 | Invalid date or date format for start_date Invalid date or date format for end_date |
|
Value for <status> element is not one of the valid ones | 433 | Invalid values passed for status | |
Value for <type> element is not one of the valid ones | 433 | Invalid values passed for type |
Example Post
<methodCall>
<methodName>utilities.getTasks</methodName>
<task_id>1234,1244,1246</task_id>
<start_date>2009-03-01</start_date>
<end_date>2009-03-31</end_date>
</methodCall>
Example Response
<methodResponse>
<item>
<methodName>utilities.getTasks</methodName>
<responseText>3 tasks retrieved</responseText>
<responseData>
<task>
<item>
<task_id>1234</task_id>
<type>EXPORT</type>
<status>COMPLETE</status>
<description>All contacts export</description>
<run_date>2009-03-28 15:34:12</run_date>
</item>
</task>
<task>
<item>
<task_id>1244</task_id>
<type>IMPORT</type>
<task_status>PROCESSING</status>
<description></description>
<run_date>2009-03-30 15:34:12</run_date>
</item>
</task>
<task>
<item>
<task_id>1246</task_id>
<type>IMPORT</type>
<status>COMPLETE</status>
<description></description>
<output><![CDATA[
Your list of 5 unique contacts was imported.
--------------------------------------------------
Import Results for testimport_list_win.txt:
- 2 contacts were added to your system.
- 3 contacts were updated because they were already in your system.
- 0 contacts have previously opted out.
- 0 contacts had a suppressed email address or domain name.
- 1 row was removed that had invalid or missing email addresses.
- 0 rows were removed that contained duplicate email addresses.
These contacts are now available in your system.
This import took 3 seconds.
To download a file containing your invalids follow the url below:
http://echo.bandfarm.com/import_invalids/?iid=1ca15d03a715a5962e41491c4147ec47&id=34805
]]>
</output>
<run_date>2009-03-31 12:34:12</run_date>
</item>
</task>
</responseData>
<responseNum>1</responseNum>
</item>
</methodResponse>