How to get APS resources limits from custom UI
Modified on: Fri, 17 Nov 2023 12:07 PM2020-01-22
Symptoms
Is it possible from Custom UI app to get the resource limit for the resource type in the subscription?
For instance now if customer is out of resources defined in subscription and tries to provision new one he gets 403 error.
I'd like to add some message saying that we're out of resources, for that I'd need to know how many customer is allowed to have.
Resolution
You can query controller to get subscription resources structure "SubscriptionResource"
via the /resources
operation:
GET /aps/2/resources/SUBSCRIPTION_RESOURCE_ID/resources
More on subscription schema can be found on the APS types in PA page.