Set sunset link relation type as http response header field in api management policy

suvra jyoti 156 Reputation points
2021-08-09T14:03:10.417+00:00

I want to set The Sunset Link Relation Type as a Http Response Header field along with the Sunset response Header field. I am using the set-header policy in the outbound policy of an api(GET Operation).

I have reference the documentation below:

https://datatracker.ietf.org/doc/html/rfc8594#:~:text=If%20communicated%20as%20an%20HTTP%20header%20field%2C%20it%20might%0A%20%20%20look%20as%20follows%3A

Following the same if i set the Sunset link relation type, i get the below error while trying to save the policy

121722-outbound-policy-error.png

If i remove <, > in the same then it allows me to save. With the less than and greater than it does not allow me to save the policy.
Below is the response for a test that i did:

121665-response.png

Is this the correct usage or am i missing something here. Please suggest.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,446 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-08-10T08:10:10.153+00:00

    @suvra jyoti On the APIM usage part on setting the header you are following the right way but the value you enter cannot be assigned as you see in the error message
    Looking into the section 9 I do see the example provided as Link: <http://example.net/sunset>;rel="sunset";type="text/html"
    The suggestion would be using the Named Value for your requirement.

    Policy:
    121913-image.png

    121827-image.png

    Output:
    121904-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.