Loading

How to Retrieve All the Policies for an API Instance Using API Manager REST API

Julkaisupäivä: Oct 14, 2024
Tehtävä

This article explains how to retrieve all the policies (enabled and disabled) for an API Instance using REST API

Vaiheet

QUESTION

Is there a way to determine which policies are enabled or disabled for a given API Instance?

Using the API Manager REST API below retrieves only Enabled policies:
https://anypoint.mulesoft.com/apimanager/api/v1/organizations/{organizationId}/environments/{environmentId}/apis/{environmentApiId}/policies



ANSWER

To retrieve all the policies (regardless of whether it is enabled or disabled) applied to an API Instance, the query parameter "?fullInfo=false" needs to be included.

So the REST API should look like below:
https://anypoint.mulesoft.com/apimanager/api/v1/organizations/{organizationId}/environments/{environmentId}/apis/{environmentApiId}/policies?fullInfo=false

Please add the query parameter: fullInfo=false



ADDITIONAL INFORMATION

By default, the query parameter "fullInfo" is set to "true". Setting this value returns all the details of the policies like SLA Tiers, etc., but this queries only for Enabled Policies, hence the enabled policies are retrieved by default.

NOTE: Setting the "fullInfo" to "false" will not retrieve the associated details like SLA Tiers, etc.
Knowledge-artikkelin numero

001115822

 
Ladataan
Salesforce Help | Article