Creating a Client Application Using the Synchronous Analytical Reporting API

Use this procedure to create a client application using the synchronous analytical reporting API. Choose the synchronous usage for smaller requests.

Context

Follow these steps to create a client application using the synchronous Analytical reporting API:

Procedure

  1. Choose a view template. If necessary, you can browse existing view templates using the GET /viewTemplates endpoint of the Analytical Reporting - View Management API.
    GET {{runtime_url}}/viewTemplates?realm={realm}&product=analytics
  2. Optional. You can find out how many records will be included in the results set for a query using the specified view template and filters using the GET /views/{viewTemplateName}/count endpoint of the Analytical Reporting - Synchronous API.
    GET {{runtime_url}}/views/{template_name}/count?realm={realm}&filter=
    {filter_list}
    The response includes the following fields:
    count
    The total number of records that would be included in the results set using the specified view template and filters.
    MaxRecordsInEachPage
    The maximum number of records that can be returned in a single page of results. Note that a page might contain fewer records that this maximum.
    TotalPages
    The total number of pages in the results set.
  3. Request the first batch of report data, using the /views/{viewTemplateName} endpoint of the Analytical Reporting - Synchronous API. If desired, you can override the default filter values in the URL.
    GET {{runtime_url}}/views/{template_name}?realm={realm}&filters={filter_list}
                   
  4. To request subsequent batches of report data, pass the pageToken parameter to the /views/{viewTemplateName} endpoint of the Analytical Reporting - Synchronous API.
    GET {{runtime_url}}/views/{template_name}?realm={realm}&filters={filter_list}&pageToken={page_token}
                   
  5. Process report data as desired.