Portal Custom Report not showing correct values for graphs by response code
search cancel

Portal Custom Report not showing correct values for graphs by response code

book

Article ID: 220701

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

We have tried to implement a Custom Dashboard that shows the following data:

  • 2XX responses per day
  • 4XX responses per day
  • 5XX responses per day

All of them filtered by one specific API.

We have followed the official documentation

(https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-developer-portal/4-5/monitor/custom-report.html)

and applied the following filters:   

What we see when this data is retrieved and shown in the graphic is this:

As you may see,  the “Success” requests are not displayed.

The problem here is the following: if we show all the API Hits in the same period of time, the resulting number is not the sum of the calls in the previous graph (client errors + server errors).

  • Total API Hits: 171
  • Client errors: 24
  • Server errors: 1

There are 146 calls which have to be shown as “Success” but they aren’t.

Environment

Release : 4.5

Component : API PORTAL

Resolution

In clients portal fragments the variable portal.analytics.response.code is only set when it is  a error , when the ${response.http.status} = 200 it is not set so analytics does not know this status.

In the default portal fragments the portal.analytics.response.code is set after the routing to the ${response.http.status} .

In clients custom policy this is only done for certain response codes which causes a issue with analytics which receive data without a  response code so you can not filter on it in the reports.

Correct your custom policy template to include the response code in all scenarios or use the default portal templates.