Manage Reports Sample

A command line console application that provides access to the report management facilities of the Aculab Cloud Web Services API.

Usage

python manage_reports.py [--wsserver <cloudWebServerAddress>] <cloudId> <username> <apiAccessKey> <command>

Arguments

cloudWebServerAddress

The address of the cloud web server. By default the wrappers call web services on https://ws-<cloudId>.aculabcloud.net. In certain circumstances you may need to use a different address which you can set here.

cloudId

Cloud region id (e.g. 1-2-0)

username

Cloud account username

apiAccessKey

Cloud API Access key

command

One of the following...

start <content> <from> [<to>]

list <listType>

cancel <reportName>

download <reportName> <localFilename>

delete <reportName>

Where...

content

Either "adr", "cdr", "fdr", "msg" or "err"

from/to

UTC date and time specified in the ISO 8601 format yyyy-mm-ddThh:mm:ss (e.g. 2019-02-13T11:22:02) (to is optional and defaults to the current UTC time)

listType

Either "inprogress" or "completed"

reportName

The name of the report to cancel, download or delete.

localFilename

Path and filename for the downloaded file.

Note

Reports are generated as comma-separated value files.

Note

For users running Python 2 under Windows, this tool does not support command line arguments containing non-ASCII characters. If you wish to specify command line arguments containing non-ASCII characters, please use Python 3.

Examples

  1. Start a cdr report

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword start cdr 2012-06-28T00:00:00
    
  2. Start a 1 day cdr report

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword start cdr 2012-06-28T00:00:00 2012-06-29T00:00:00
    
  3. List reports that are in progress

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword list inprogress
    
  4. List reports that have completed

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword list completed
    
  5. Cancel a report

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword cancel 0-2-0_bob@acompany.com_cdr-adm_2012-06-28_00:00:00_2012-07-29_00:00:00.csv
    
  6. Download a report

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword download 0-2-0_bob@acompany.com_cdr-adm_2012-06-28_00:00:00_2012-07-29_00:00:00.csv .\myReport.csv
    
  7. Delete a report

    python manage_reports.py 0-2-0 bob@acompany.com bobsPword delete 0-2-0_bob@acompany.com_cdr-adm_2012-06-28_00:00:00_2012-07-29_00:00:00.csv