Do we have a Management API to update/edit the reason phrase data in ASSIGN MESSAGE POLICY, which is already deployed with proxy.

Not applicable

hi all,

my requirement is to update the reason phrase in ASSIGN MESSAGE policy after it is deployed. Assume we have a proxy which has ASSIGN MESSAGE POLICY in which some reason phrase is present. we are referring this policy in fualt rule, so no need of attaching it to any flow. Now i need an management api which connects to proxy and update assignmessage policy such that to edit/update the reason phrase /payload info in it.

Regards,

Ch.Venkat.

0 12 281
12 REPLIES 12

Dear @venkat ch ,

We have an API to create a new policy inside a proxy.

If you are looking for a tool where you can change the policy in your local machine & deploy same to Apigee edge please take a look at apigeetool command line tool. You can run a command from local machine & deploy the proxy with changes to Apigee Edge.

Hi anil,

Thanks for the info. I searched for API to create a new policy inside a proxy but i didn't get it. Could you share the link please.

@venkat ch , Updated the answer with link to create a new policy api.

adas
New Member

@venkat ch Yes you can do it using management api:

PUT /v1/o/{org}/apis/{api}/revisions/{rev}/policies/{policy} with the complete body as the assign message policy

Thanks @arghya das , Any reason why it's not listed in docs ?

@Floyd Jones - do you know? I'm looking at this link and I don't see an Update/PUT method documented.

I can add it.

Stephen

We actually don't doc that API because it is not officially maintained and should not be considered to be supported. Instead, you should use one of the other options described below.

Stephen

Could you also define an attribute on the app and set it? Then, you could use the API or the UI to edit the attribute?

<ReasonPhrase>verifyapikey.verify-api-key.app.myReasonPhrase</ReasonPhrase>

This example assumes you have a VerifyAPIKey policy on your proxy named "verify-api-key".

Stephen

Former Community Member
Not applicable

Hi @venkat ch, another option for you to consider is persisting "Reason Phrases" in a Key Value Map (KVM) which can be updated via a public API (see link on KVM). Within your proxy you could have a KVM lookup policy which loads the desired Reason Phrase into a variable which is referenced in the Assign Message policy. I believe this is an alternative approach to achieve what you are looking to do.

Hi Prithal, i have followed the same approach suggested by you. I'm able to get the custom message from MAP to KVM operations policy, assigned to a variable.

But how to assign this flow variable to payload in assign message policy. Please let me know

got it by below

<Set>

<Payload>{custommessagevariable}</Payload>

<ReasonPhrase>{custommessagevariable}</ReasonPhrase>

</Set>