Este contenido no está disponible en el idioma seleccionado.

Chapter 34. Setting up and evaluating the 3scale response codes log for your API


To see how your clients are using the API, and see in real time if your servers are running as expected, set up and use the response codes log in 3scale.

Procedure

  • Set the APICAST_RESPONSE_CODES environment variable to 1 or true when starting the APIcast gateway that uses Docker or an OpenShift deployment. This enables response code tracking.

Example

When enabled, APIcast gateway captures the HTTP status code of API responses returned by the upstream service for authorized calls, and sends them to the Service Management API (in authrep call). Example:

https://su1.3scale.net/transactions/authrep.xml?service_token={SERVICE_TOKEN}&service_id={SERVICE_ID}&user_key={USER_KEY}&usage%5Bhits%5D=1&log%5Bcode%5D=200"
Copy to Clipboard Toggle word wrap

In this example,log[code]=200 is sent, which means that the API responded with a 200 status code.

Verification

To verify the integration, perform a call to your API product with valid 3scale credentials, and then verify that the call was correctly reported on the Analytics > Usage page.

Note
  • Response Code Tracking is not intended to be an accurate count of all responses.
  • The value of this view is to provide a visual representation of the trend over a period of time.
  • Response Code Tracking and 3scale Auth Caching mode: None is not a supported combination.

If everything is going well so far, go to the Analytics >Response codes page. You should be able to see a graph with your latest traffic divided by colors, depending if the response was 2xx, 4xx, or 5xx.

The graph tool gives you the ability to view the history of response codes. You can also check the response code statistics for different periods of time and different levels of granularity. Click the time selection bar and define the time period and granularity that meets your needs.

Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat