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
- batchId
- Format: long datatype
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.
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
ActivityExceptionThis fault is returned when Smile cannot produce an activity statement.
NoSuchItemExceptionThis 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.