Report operations

$/reports/list
Returns information about one or more reports.
Reports can be specified either by ID (recommended) or by name.
Parameters:
idComma-separated list of report ID's.
Use * to return all reports.
name (n)Comma-separated list of report names.
Use * to return all reports. Enable the regex switch to use regular expressions.
regex (re)Flags if report names should be interpreted as regular expressions.
Special characters such as , and & can be hex-encoded e.g. \x2C or \x26 respectively).
verbose (v) Flags if verbose information should be returned about each report.
The standard parameters recognized by all Awasu API calls are listed here.
$/reports/run
Runs one or more channel reports.
Reports can be specified either by ID (recommended) or by name.
Parameters:
idComma-separated list of report ID's.
Use * to run all reports.
name (n)Comma-separated list of report names.
Use * to run all reports. Enable the regex switch to use regular expressions.
regex (re)Flags if report names should be interpreted as regular expressions.
Special characters such as , and & can be hex-encoded e.g. \x2C or \x26 respectively).
The standard parameters recognized by all Awasu API calls are listed here.
$/reports/get
Runs a channel report and returns the result.
Any combination of ID or name may be specified, but only one report must match.
Parameters:
idComma-separated list of report ID's.
name (n)Comma-separated list of report names.
regex switch to use regular expressions.
regex (re)Flags if report names should be interpreted as regular expressions.
Special characters such as , and & can be hex-encoded e.g. \x2C or \x26 respectively).
contentType (ct) Response MIME type.
If no MIME type is configured here, Awasu will attempt to auto-detect HTML, XML and plain-text.
The standard parameters recognized by all Awasu API calls are listed here.
$/reports/create
Creates a new channel report.
The report configuration must be passed in as the POST data. See below for more details.
Parameters: None
The standard parameters recognized by all Awasu API calls are listed here.
$/reports/update
Updates one or more channel reports.
Changes to the report configuration must be passed in as the POST data. See below for more details.
Reports can be specified either by ID (recommended) or by name.
Parameters:
idComma-separated list of report ID's.
Use * to update all reports.
name (n)Comma-separated list of report names.
Use * to update all reports. Enable the regex switch to use regular expressions.
regex (re)Flags if report names should be interpreted as regular expressions.
Special characters such as , and & can be hex-encoded e.g. \x2C or \x26 respectively).
The standard parameters recognized by all Awasu API calls are listed here.
$/reports/delete
Deletes one or more channel reports.
Reports can be specified either by ID (recommended) or by name.
Parameters:
idComma-separated list of report ID's.
Use * to delete all reports.
name (n)Comma-separated list of report names.
Use * to delete all reports. Enable the regex switch to use regular expressions.
regex (re)Flags if report names should be interpreted as regular expressions.
Special characters such as , and & can be hex-encoded e.g. \x2C or \x26 respectively).
The standard parameters recognized by all Awasu API calls are listed here.

Creating and updating channel reports

When creating a new report, or updating existing ones, the report configuration must be sent as the request's POST data. The format is the same as that returned by $/reports/list except that there is no top-level <channelReports> node. For example, the following POST request sent to $/reports/create will create a new report:

<channelReport>
    <name> My New Report </name>
    <dataSource type="channelFilter">
        <channelFilterName> All </channelFilterName>
    </dataSource>
</channelReport>

Report type

The type of report is configured via the dataSource@type attribute:

FTP, email and post-processing command

FTP, email and the post-processing command are configured via XML sub-nodes. For example, the following will update the TO address in an existing report's configuration:

<email>
    <toAddress> joe@blow.com </toAddress>
</email>

To remove the configuration from a report, simply include an empty XML node. For example, the following will remove any post-processing command:

<postProcessingCommand />

The report can be configured to check the post-processing command's return code as follows:

<postProcessingCommand>
    <returnCodes type="..."> ... </returnCodes>
</postProcessingCommand>

where a comma-separated list of return codes are specified and the type attribute can be one of: NoCheck, EqualTo, NotEqualTo

Template parameters

When updating an existing report, template parameters specified in the POST data are applied to any existing template parameters configured in the report i.e. they will update the parameter's value if it already exists, or create a new one if it doesn't.

To remove a template parameter from the report's configuration, include a delete="yes" attribute.

For example:

<templateParam name="param1"> value1 </templateParam>    create/update param1
<templateParam name="param2" />                          create/update param2 (empty value)
<templateParam name="param3" delete="yes" />             remove param3

Directory aliases

Any settings that include a directory path (e.g. template filename or output filename) can use one of the following directory aliases:

{:INSTALL-DIR:} the Awasu installation directory
{:USER-DATA:} the user's roaming data directory
{:USER-LOCALDATA:} the user's local data directory
{:USER-OUTPUT:} the user's My Documents folder