can not work "Standard Policy Template -API Key" assertion
search cancel

can not work "Standard Policy Template -API Key" assertion

book

Article ID: 9115

calendar_today

Updated On:

Products

CA API Developer Portal CA API Gateway

Issue/Introduction

Can not work  "Standard Policy Template -API Key" assertion

 

Reappearance process 

01. publish an API on the API proxy 

02. add "Standard Policy Template -API Key" assertion 

But the API doesn't work suitably. 

 

Result: Return the error "Unable to route to API". 

Environment

API Gateway 9.2API Portal 4.2

Cause

The policy should also contain the apiLocation and serviceUrl (value: API name) context variables for routing

Resolution

Work asourd:

01. Add tow "Set Context Varliable" befor "Standard Policy Template -API Key"

02. Set the values as the each parameter.

    . Variable Name : apiLocation Expression :{URL of Back End} 

    .Variable Name : serviceUrl Expression : {API Name}