Question

REST Service for adding attachments to a case?

We are using the out of the box Cases API to create and update cases via REST service request from another system. Is there an out of the box way to make a request to update a case and include an attachment that will result in that file being attached to the work object? If not, what is the best way to add that functionality?

We are running the Pega Platform version 7.4 on prem.

Comments

Keep up to date on this post and subscribe to comments

October 3, 2019 - 1:49pm

We found this help page that shows an example of what we are looking for: https://community.pega.com/sites/default/files/help_v74/procomhelpmain.htm#rule-/rule-service-/rule-service-rest/service-rest-rule-distinct-uri-specification-con.htm

This seems to suggest that there is an attachments resource for cases

api/v1/cases/C_100/attachments 

But it's not clear if it is actually implemented or if it's just an example of something that could be implemented. I can't find any other evidence that the ability to add attachments to via the REST API actually exists. 

October 7, 2019 - 6:14am

Hi,

We too have the similar kind of Requirement. Please any one suggest.

How to receive an attachments through REST API and save it as an attachment in Pega.

As i found that pyResponseAttachmentPage of Data-ServiceMessage is to use. But, i am not aware of the steps to implement. Could someone post the steps to implement to acheive the requirement.

This is some what urgent,

 

October 16, 2019 - 1:05pm

Can anyone help answer this question?

October 17, 2019 - 1:13am
Response to MichaelF4652

The OOTB Pega REST APIs like Create Case/Update Case do not support attachments yet. You will have to implement a custom REST service to support attachments. The incoming attachments (if they are sent by the client in a multi-part request) are stored in a named page called pyRequestAttachmentPage. You can refer to this post: https://community.pega.com/sites/default/files/help_v83/procomhelpmain.htm#/express/rule-/rule-connect-/AttachmentsSOAPdotNetHttp.htm

Even though it is from 8.3 Help, the same applies to all versions of Pega.