Monitoring APIs

To ensure that the through-put of the application is at optimal levels, the APIs must be executing with good response times. API response times can also affect the Application Console users because the Application Consoles retrieve and update all information using APIs.

API response time

The response time is calculated every time an API is called. During every persist interval, the minimum, maximum, and average response times of all the calls are recorded.

Alert when the response time threshold is exceeded

It is possible to configure a service to be run if the average response time of an API goes above a threshold limit for three consecutive persist intervals. This service can perform many tasks, including sending an e-mail message or creating an alert for a system administrator. For more information about the data available for the service, see Data published for health monitor alerts.

Changing the threshold for a specific API

There are a large number of APIs within Sterling Selling and Fulfillment Foundation Sterling Application Platform that can do a great number of different things. Therefore, it is likely that finer control over the API response time thresholds is required. It is possible to set a specific threshold value for a specific API as well. For more information about setting a specific API threshold, see API details screen.

Setting the appropriate API thresholds is not an exact science. Experimentation is required to find the correct threshold for each API to ensure that alerts are only sent when absolutely necessary. Keep in mind that some APIs may run with variable sizes of data that have a direct correlation to the response time of that API. For example, the createOrder API should have a much larger response time for an order with 100 order lines compared to a createOrder API call for an order with 1 order line.

Other API statistics

The System Management Console records the number of invocations for each API that happened during each persist interval.

Additionally, some of the most important APIs record statistics that are specific to that API. For example, the createOrder API records the number of orders created and number of order lines created during each persist interval.

User exit statistics

If an API has user exits that have been implemented, then statistics for each user exit call are recorded at each persist interval. The statistics collected for each user exit call are minimum, maximum, and average response time as well as the number of invocations.

It is not possible to set a threshold or configure a service to be run based on the response time of a user exit. However, the calculated API response time is inclusive of the user exits called within it. Therefore, if a user exit suddenly starts to respond slowly, the API response time also increases.