Develop IS Service

@ivachung Yes as I already said you need Designer. Directly calling the “pub.utils.generateUUID” from API Gateway Invoke IS service policy will only set it in response but if you need to set it in headers you need to write a new IS Service as shown n below image and call that IS Service from your “Invoke IS Service” policy.

Another option is to use Request transformation policy to get the json path from your request body and set it in headers after you used Invoke IS Service to generate UUID and set it in body as you did. For details refer, Request and Response Transformation policies in API Gateway.

As Srikanth suggested, if your requirement is to not generate a new UUID key you can very well use correlation ID which is already unique for each request. You could use syntax ${correlationID} in Request Transformation policy to set it to your headers/query params etc. Same link given above contains the details of this.

Regards,
Vallab