Creating a Client Application Using the Synchronous Operational Reporting API

use this procedure to create a client application using the synchronous Operational Reporting API. Choose the synchronous usage for smaller projects.

Context

Follow these steps to create a client application using the asynchronous Operational reporting API:

Procedure

  1. Choose a view template. If necessary, you can browse existing view templates using the /viewTemplates/{viewTemplateName} endpoint of the Operational Reporting for Procurement - View Management API.
    GET {{runtime_url}}/viewTemplate/{viewTemplateName}?realm={realm}
  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 Operational Reporting for Procurement - 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 Operational Reporting for Procurement - Synchronous API. If desired, you can override the default filter values in the URL.
    GET {{runtime_url}}/views/{viewTemplateName}?realm={realm}&filters={filter_list}
  4. To request subsequent batches of report data, pass the pageToken parameter to the /views/{viewTemplateName} endpoint of the Operational Reporting for Procurement - Synchronous API.
    GET {{runtime_url}}/views/{viewTemplateName}?realm={realm}&filters={filter_list}&pageToken={page_token}
  5. Process report data as desired.