Retrieve All SPA and Regular Web Applications via the Management API

Problem statement

This article details how all SPA and regular web applications can be retrieved via the Management API.

Solution

Use the /api/v2/clients endpoint (Get clients) while filtering for app_type=spa|regular_web, e.g.:

curl -H "Authorization: Bearer $TOKEN" "https://$DOMAIN/api/v2/clients?app_type=spa|regular_web"

Where $TOKEN is the Management API token and $DOMAIN is the tenant domain.

It is also possible to use a tool like jq to filter the results on the client side or to extract only particular fields such as the client ID or name.