Forums

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

Automation Send Web Request Failure

Berat Çolak August 10, 2021

Hi,

I want to send a web request to url but in url, i need to write custom field. I will attach the image following...

Ekran Alıntısı.PNG

 

I get an 404 error about url.

Can you help me?

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras -Relational-
Community Champion
August 10, 2021

Hi @Berat Çolak 

What exactly you want to achieve? Which field you want to update? Read this article, which might help you https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

Berat Çolak August 10, 2021

I want to create Jira connection with Cachet application. I can send tickets from Jira to Cachet with another automation, but since the ID of the ticket in Jira and the ID in Cachet are not the same, I created a field in Jira and I add the Cachet ID to that field.

 

In Cachet Documentation, URL was defined as https://demo.cachethq.io/api/v1/incidents/incident 

 

The "incident" in the URL should be replaced by the ID in the cachet application. When sending this with Jira automation, it adds the number in the field (Cachet ID) I mentioned above.

Alex Koxaras -Relational-
Community Champion
August 10, 2021

@Berat Çolak try to log in your automation what your smart value returns. I mean what does {{issue.customfield_10044}} returns in the log? Is it something, or is it nothing? Does it returns the ID you want?

Berat Çolak August 10, 2021

I handled it! :)

customfield_10044 was returned as float number but i need to put integer number so i fixed it in code i wrote.

Alex Koxaras -Relational-
Community Champion
August 10, 2021

Great! Good job!

Alex Koxaras -Relational-
Community Champion
August 10, 2021

@Berat Çolak you can write your solution to an another reply and accept it as answered, or accept this one, just to help other people in the community find the right answer. 

Thank you!

Berat Çolak August 10, 2021

How did I fix it?

I created a custom field in Jira with "number" field but this field is returning the number as float. The required number of integers is required for the url in the cachet application, but the field I created in Jira was giving a URL error because it sent floats. To fix this error, I converted the float number in the URL to integer in the code I wrote for the API.

Suggest an answer

Log in or Sign up to answer