cancel
Showing results for 
Search instead for 
Did you mean: 

Get Task Attachment using Get Attachment API

former_member811346
Discoverer
0 Kudos
523

Hello,

I'm using the Get Attachment API to download the attachment from specific task,
The API requires entity type, entity id and attachment id, I got the entity type, entity id from get entity API(for the task),but couldn't find the attachment id,

Is there anyone have an idea how to get the attachment id to can retrieve the attachment ?

View Entire Topic
SeanMcGann
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Lamyaa,

I assume you are using the external approval API for this and using the get attachment endpoint. If that is the case, please be sure to use the query parameter select=itemResponses. The URL will look something like this:

https://openapi.ariba.com/api/sourcing-approval/v2/prod/RFXDocument/Doc3561234904?realm=realmname-T&...

If you do this and an attachment has been included as part of an answer, you will see json similar to the below:

"attachmentAnswer": {

"id": "Doc3561234904,AK44443FekS!HvT,AKka49595S!JOT",

"fileName": "hello.pdf",

"mimeType": "application/pdf",

"fileSize": 27980

},

The "id" field is what you will then need to put in your next call to get the attachment. Thanks for the question - hope this helps!
- Sean

0 Kudos

Hello Sean,

I've tried using the API URL that you have shared but I am receiving a different response.

If there any other way to fetch the attachment Id?

Regards

Ashish