Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

jira 7.13.1 REST API POST Attachement issue Rejected URL

Gintarė Skorupskaitė
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2020

Hi, I am trying jira 7.13.1 REST APIs through Power Automate and basically I want to add an attachment to an already existing task via the API, but I am not sure I am putting in the syntax right. 

 

I get the message that The requested URL was rejected. Please consult with your administrator

My body of the flow looks like this: I am not sure that I actually specify the right id part, but does anyone have a clue of what might be the problem? 

I can use the APIs in general to get info or to create an issue, but struggling with this one. 

Capture.PNG

1 answer

0 votes
mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2021
Gintarė Skorupskaitė
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 4, 2021

Hi Moga,

 

Thanks for the input. I have read the documentation, but it doesn't help in this case as I am missing something. Fx where to indicate the pathway to the file that I am trying to attach in this case? 

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2021

Hi @Gintarė Skorupskaitė

This is how the cURL command looks like:

curl -D- -u {username}:{password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@{path/to/file}" http://{base-url}/rest/api/2/issue/{issue-key}/attachments

For the Postman example, you can refer to this thread.  

Apologies, I do not have any knowledge of the Power Automate application hence I would not be able to advise on how to configure the file parameter.

I will leave this thread to someone that might have experience with the Power Automate application.

Thanks,
Moga

Suggest an answer

Log in or Sign up to answer