Azure Api Management Service Flashcards
A company is developing an API system that will be hosted behind an Azure API Management service. You have to implement response caching. Here the user ID of the client must be detected and then the response must be cached for the given user ID.
You need to add the following policies to the policies file:
A set-variable policy to store the detected user identity
A cache-lookup-value policy
A cache-store-value policy
A find-and-replace policy to update the response body with the user profile information
To which policy section would you implement the policy forA set-variable policy to store the detected user identity”
Inbound
Outbound
Error
Parameters
Answer – A
Here since you need to detect the User ID from the request, you need to set the variable in the Input section. An example of this is given in the Microsoft documentation
@($"https://accounting.acme.com/salesdata?from={(string)context.Variables["fromDate"]}&to={(string)context.Variables["fromDate"]}")" GET
Since this is clearly mentioned, all other options are incorrect
https://docs.microsoft.com/en-us/azure/api-management/api-management-sample-send-request
You are configuring a new API in Azure API Management for an application that uses JSON REST endpoints
API access should be limited to a specific IP address from an on premises application.
The on premises application sends XML requests and expects XML responses.
You need to implement the Inbond policy, which option should you choose
A: json-to-xml and ip-filter B: xml-to-json C: ip-filter D: json-to-xml E: none
A: json-to-xml and ip-filter
The IP filter policy will deny or allow calls from a specific IP address or address range.
You also need to convert the incoming request from XML to JSON because the REST application requires JSON
Both policies are required on this section
You are configuring a new API in Azure API Management for an application that uses JSON REST endpoints
API access should be limited to a specific IP address from an on premises application.
The on premises application sends XML requests and expects XML responses.
Which policy should you use for the backend A: json-to-xml B: xml-to-json C: ip-filter D: None
NONE
You should configure None of the policies in the backend, You can use this section to configure policies like Set-Header to modify the HTTP Request headers or the set-query-parameter policy to change the HTTP query string parameter,
The xml-to-json policy is only applicable to the inbound, outbound and on-error sections
You are configuring a new API in Azure API Management for an application that uses JSON REST endpoints
API access should be limited to a specific IP address from an on premises application.
The on premises application sends XML requests and expects XML responses.
Which policy should you use for the output A: json-to-xml B: xml-to-json C: ip-filter D: None
A: json-to-xml
This policy will convert the JSON from the REST service responses to XML before sending them to the on-premises application
True or False
json-to-xml is an example for an API Management Backend policy
False
The json-to-xml policy is only applicable to the inbound, outbound and on-error sections
True or False
A Version allows you to add non-breaking changes to a web API, such as the addition of operations
False
A revision allows you to add non-breaking changes to a web API, such as the addition of operations.
Users can access the revision by using a different query string at the same endpoint.
Use revisions for a scenario where you want to test the operations without publishing them.
A version allows you to expose breaking changes for a web API. A version requires publishing.
True or false
The following code in an Api Manager configuration will limit API calls to 4000 in 10 minutes
< quota calls=”4000” renewal-period=”600”/ >
False
Quota calls restricts the total number of calls across a given time period, but the renewal period cannot be less that 3600 seconds (or one hour)
You will need to use
< rate-limit calls=”4000” renewal-period=”600”/>