getActivityStatementBatch()

ActivityBatchURL getActivityStatementBatch(string usn, long batchId)

This method returns a URL from which you can download a batch of unrated activity statements, or CDRs, for an account or subscription. Downloading activity statements in batches ensures that you download all activity statements for the USN, even if the activity is not recorded in timestamp order.

A caller can create multiple batches against a USN, and multiple callers can create batches against the same USN.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription or account. If the USN is an account, Smile makes available the activity statements for all subscriptions associated with the account.
batchId
Format: long datatype
Purpose: Specifies the batch ID of the last successfully downloaded batch; Smile makes available all activity statements with an ID after this batch ID. If you specify 0, Smile creates a new batch and makes available all the activity statements for the USN.

Results

This method returns a URL from which you can download the unrated activity statements. The URL is valid for 24 hours after it is generated by Smile and the activity statements are collated into a CSV file.

If there is no new activity to download, the method returns activity="false".

This method and the URL both use basic access authentication. You must use the same credentials to access the URL as you did to call the method.

There are no messages defined by this method.
Note: For more information about the format of activity statements, see the CDR documentation under Format Guides in the Inomial Documentation Library.

Example: A returned ActivityBatchURL XML document with activity statements

This example shows a returned ActivityBatchURL document with the URL from which you can download the activity statements.

<ActivityBatchURL xmlns="http://xml.inomial.com/smile/2.xsd" activity="true">
  <BatchID>1409213</BatchID>
  <URL>https://smile.example.com/activity?token=12049IASUBF9812p9</URL>
</ActivityBatchURL>

Example: A returned ActivityBatchURL XML document without activity

This example shows a returned ActivityBatchURL document with no activity.

<ActivityBatchURL xmlns="http://xml.inomial.com/smile/2.xsd" activity="false"/>

Faults

ActivityException

This fault is returned when Smile cannot produce an activity statement.

NoSuchItemException

This fault is returned when the specified USN does not match an account or subscription, or the specified batch ID does not match an activity batch.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.SubscriptionActivity usn batchID
usn
Purpose: Specifies the USN of the subscription or account.
batchID
Purpose: Specifies the batch ID of the last successfully downloaded batch.
Note: For more information about the Java client and the options it accepts, see Java client syntax.