API Gateway 10.3 | Using API Gateway | Policies | Managing Global Policies | Refining the Scope of a Global Policy
 
Refining the Scope of a Global Policy
You must have the API Gateway's manage global policies functional privilege assigned.
If you want to further restrict the set of APIs to which the global policy is applied, you can specify additional selection criteria in the Filter section of the API details page. Using the Filter section, you can filter APIs by Name, Description, Version attributes, and HTTP Methods (applicable only for REST APIs). If you specify no filter criteria, the global policy will apply to all of the selected APIs.
Filtering by Name, Description, and Version attributes
You can filter APIs based on their Name, Description, and Version attributes using any of the following comparison operators:
Comparison Operators
Description
Equals
Selects APIs whose Name, Description, or Version value matches a given string of characters. For example, use this operator to apply a policy only to REST APIs with the Name or Description value 4G Mobile Store.
Not Equals
Selects APIs whose Name, Description, or Version value does not match a given string of characters. For example, use this operator to apply a policy only to all REST APIs except those with the Name or Description value Mobile.
Contains
Selects APIs whose Name or Description value includes a given string of characters anywhere within the attribute's value. For example, use this operator to apply a policy to REST APIs that had the word Mobile anywhere in their Name or Description attribute.
Starts with
Selects APIs whose Name or Description value begins with a given string. For example, use this operator to apply a policy only to REST APIs whose Name or Description begins with the characters 4G.
Ends with
Selects APIs whose Name or Description value ends with a given string. For example, use this operator to apply a policy only to REST APIs whose Name or Description ends with the characters Store.
When specifying match strings for the comparison operators described above, keep the following points in mind:
*Match strings are not case-sensitive. If you define a filter for names that start with ABC it will select names starting abc and Abc.
*Wildcard characters are not supported. That is, you cannot use characters such as * or % to represent any sequence of characters. These characters, if present in the match string, are simply treated as literal characters that are to be matched.
Filtering by HTTP Methods (Applicable only for REST APIs)
*You can optionally restrict a policy to specific HTTP methods of the REST APIs by specifying the following options - GET, POST, PUT, DELETE, and PATCH.
HTTP Methods
Description
GET
Policy applies only to HTTP GET requests for any resource in the API. For example, use this option to apply a policy to resources of a REST API during an incoming GET request.
POST
Policy applies only to HTTP POST requests for any resource in the API. For example, use this option to apply a policy to resources of a REST API during an incoming POST request.
PUT
Policy applies only to HTTP PUT requests for any resource in the API. For example, use this option to apply a policy to resources of a REST API during an incoming PUT request.
DELETE
Policy applies only to HTTP DELETE requests for any resource in the API. For example, use this option to apply a policy to resources of a REST API during an incoming DELETE request.
PATCH
Policy applies only to HTTP PATCH requests for any resource in the API. For example, use this option to apply a policy to resources of a REST API during an incoming PATCH request.
*To refine the scope of a global policy
1. Click Policies in the title navigation bar.
2. Click the Global Policies tab.
A list of all available global policies appears.
3. Select the required policy.
The Global Policy details page appears.
4. Click Edit.
If you do not see the Edit button, it is probably because you do not have the API Gateway Administrator role to refine the scope of a global policy in API Gateway.
5. Click Filters.
6. To filter by Name, Description, or Version, take the following steps in the Filter using API Attributes section:
a. Select API Name, API Description, or API Version in the first field.
b. Select the comparison operator in the second field.
c. Specify the match string in the third field.
d. To specify additional criteria, click the Add button and repeat the above steps.
e. Select the logical conjunction (AND) or disjunction (OR) operation to apply when multiple criteria are specified for the global policy. The default value is AND.
7. Applicable only for REST APIs. To filter by HTTP methods, in the Filter using HTTP Methods section, select the HTTP methods by which you want to filter APIs with appropriate incoming requests.
8. Click Save to save the updated policy.