Services

Note

These APIs are not frozen and can change at any time without warning. See the API versions available for alternatives if you need stability.

These special endpoints are meant for internal debugging, not for general use.

Client Info

This endpoints returns basic information about the request environement. It is useful to test what the application sees behind the CDN and Load Balancers, as both will alter some of the HTTP headers / WSGI variables.

Because it can return IP addresses, it only works in the addons-dev.allizom.org environment.

GET /api/v5/services/client_info/
Response JSON Object:
  • HTTP_USER_AGENT (string) – The User-Agent HTTP header.

  • HTTP_X_COUNTRY_CODE (string) – The ISO 3166-1 alpha-2 country code corresponding to the IP that made the request.

  • HTTP_X_FORWARDED_FOR (string) – The X-Forwarded-For HTTP header.

  • REMOTE_ADDR (string) – The IP address of the client.

  • POST (object) – POST data of the request.

  • GET (object) – GET data of the request.

403

This endpoint returns a basic 403 error response.

GET /api/v5/services/403/
Response JSON Object:
  • detail (string) – Message explaining the error.

404

This endpoint returns a basic 404 error response.

GET /api/v5/services/404/
Response JSON Object:
  • detail (string) – Message explaining the error.

500

This endpoint returns a basic 500 error response. The traceback property in the response is only present on local environments, when DEBUG is True.

GET /api/v5/services/500/
Response JSON Object:
  • detail (string) – Message explaining the error.

  • traceback (string) – Traceback of the error.