Basic syntax for Digital Analytics API URLs

Use the correct syntax when you configure Digital Analytics API URLs manually.

Note: Trended Top Line Metrics reports can include more parameters. For more information, see Returning trended results for Top Line Metrics reports.

The following example shows the basic API URL structure.

Note: Use the appropriate IBM® Digital Analytics service domain name for your organization.

https://welcome.coremetrics.com/analyticswebapp/api/1.0/

The basic structure is followed by these elements:
  • Data type
  • Report name
  • clientId (production client ID)
  • username (your user ID)
  • format (file format for the returned data)
  • userAuthKey (user authentication key)
  • language (language and locale)
  • viewID (report view)
  • period_a, period_b (period date range)

The user authorization key is automatically generated by the API when you use the API window to generate the URL.

The period date range is the end day of the range, prefixed by a period type designation (D=daily, W=weekly, M=monthly, Q=quarterly, Y=yearly).

The following example API URL requests data in XLS format from the Top Products report for March 28, 2013.

Note: The URL shown here is broken into multiple lines for readability. The actual URL does not contain line breaks. Use the appropriate IBM Digital Analytics service domain name for your organization.
https://welcome.coremetrics.com/analyticswebapp/api/1.0/
report-data/topbrowsedproducts.ftl?clientId=11111111&username=user@client.com
&format=XLS&userAuthKey=7177773b-1e99-40d7-866f-d52556be60a0
&language=en_US&viewID=default.ftl&period_a=D20130328