API Management 10.4 | Using API Gateway | REST APIs in API Gateway | Transaction Data
 
Transaction Data
API Gateway provides the capability to to query the API transactions. API Transactions are generated (as events) every time an API invocation happens. API Transactions may contain the details about the invocation such as request and response headers, request and response payloads, consumer applications and so on. API Provider may choose to store these events to one or more destinations by using Log Invocation Policy. API Gateway provides different destination options to the API Provider (like API Gateway's own data store, relational databases, Elasticsearch, and so on) where the events can be stored. By default, API Gateway is chosen as a storage destination for these events. This REST API queries for the transactions data only from the API Gateway's default datastore. There are multiple use cases where you can use this transactions data. For instance, you can integrate this API with your billing system wherein this transactional data can be used to compute the usage history of your API for different consumers for monetization usecases. In other scenarios, the data extracted from this service can be used for custom report generation.
API Gateway provides the following REST API and the resources to retrieve the transaction events data:
*GET/rest/apigateway/transactionEvents/_search: Retrieves the transaction events for a given API, Application, Plan or Package for a specific period of time. Multiple request parameters of this method provide options to specify the request criteria to match the expected result and most of these input parameters support regular expression in their values. Along with the mandatory parameters, fromDate and toDate, any one of the other filter criteria should be passed in the request.
*GET/rest/apigateway/transactionEvents/_count: Retrieves the number of transaction events for a given API, Application, Plan or Package for a specific period of time. Multiple request parameters of this method provide options to specify the request criteria to match the expected result and most of these input parameters support regular expression in their values. Along with the mandatory parameters , fromDate and toDate, any one of the other filter criteria should be passed in the request.
For details on the REST API see the swagger file APIGatewayTransactionDataService.json, located at Install directory/IntegrationServer/instances/default/packages/WmAPIGateway/resources/apigatewayservices.

Copyright © 2015- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release