Loading

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

게시 일자: Oct 14, 2024
과업

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

단계

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 기사 번호

001115822

 
로드 중
Salesforce Help | Article