Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

We pushed attachments through Rest api but attachments is not visible to customer

Prashant August 2, 2019

Hi Team,

We pushed attachments through Rest api but attachments is not visible to customer portal

please help us to get the attachments to the customer.

 

Thank you in advance 

1 answer

0 votes
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 5, 2019

Hi Prashant,

Thank you for reaching out to Atlassian Community!
For attachments to be visible on a ticket for the customer in the customer portal, the attachments must be added on a comment.
If the attachments were only added to the ticket but not shared with the customer on a comment, they won't be able to see because the field "Attachments" is not visible in the portal, it's visible only for agents internally.
Please, give it a try and let us know how it goes.

Regards,
Angélica

Prashant August 6, 2019

Hi Angélica,

Thank you for responding, Ya it works in comments but can you suggest how do i push all attachment to comment field so that the all attachments can be visible in portal.

Thank you in advance.

Best Regards 

Prashant 

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2019

There are two APIs related to attachments and you need to use both. First, you need to use the Attach Temporary File and then the Create attachment to add the attachment as public with a comment for the customer.

Please, give it a try and let us know how it goes.

Prashant August 7, 2019

Ya, I will try and let you know.

Thank you Luz

Like Angélica Luz likes this
Prashant August 12, 2019

Hi Angélica,

Its working fine and the attachments are visible on the portal. Could you please suggest me how to push in a bulk way after once the temporary id is created. Because we have many attachments, so it will be very helpful if you suggest some solution with curl command. 

Best Regards

Prashant

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2019

Hi Prashant,

We would advise you to build something using bash in order to perform the bulk action.
Here is a documentation with the scripting that may help you:
- Bash scripting cheatsheet

Regards,
Angélica

Like Prashant likes this
Prashant August 17, 2019

Hi Angélica,

Thank you for responding back. Even I have used the bash file to push the attachments and I was having small issue, is there any way to get all service desk id with respective issuekey. Please suggest me if possible.

Thank you so much for helping me out.

Best Regards

Prashant

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 23, 2019

The best way to achieve this would be by using the steps below:

1. Upload attachments.
2. Get attachments and put them into an array (using bash).
3. From the array, (using bash) call each one and add them to the comments.
    3.1. Each attachment will be its own REST API call.
4. Confirm attachments are within the comments.

Please, give it a try and let us know how it goes.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events