Encrypt the Resource parameter of Pega API
We are planning to use OOTB Pega API’s for handling the case documents ( upload,Get,Delete operations), one of the API (application/v2/cases/{caseID}/attachments) which consumer use for sending document to Pega and responded with attachment id (like pzInskey of link-attachment instance) to the consumer, They use the same attachment id to fetch the document content using below OOTB API but consumer requested for encrypt the resource parameter value(attachmentID) to shorten the URL instead of sending whole pzInskey value as resource parameter in the url..
https://org-api.test.orgnet.org/prweb/api/application/v2/attachments/{attachmentID}
Is there recommendation or existing functions to encrypt the value to shorten the resource parameter content in the url?
@BRAHMESH@ In Pega, you can use the SafeURL function to encrypt URL parameters. However, this function is typically used on the client-side. For server-side encryption, you might need to implement a custom solution. You can use the Pega's encryption functions (like tools.getPRCrypto().encrypt(property)) to encrypt the attachmentID before sending it in the URL. However, please note that you would also need to decrypt the attachmentID on the server-side before using it. This might require customizing the OOTB API to decrypt the attachmentID before processing it.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
Encrypt URL in email
Encrypt text in Pega and Decrypt in External System
Encryption
Data Encryption
@parmn is this something you could help with?