It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Codebarrel - Automation for Jira - Send web request with custom data

I'm running Jira 7.11.2 with codebarrel Automation for Jira 5.2.8.

I'm trying to send a web request to RocketChat in order to create channels. The RocketChat API require params for this, but Automation for Jira logs:

Error response HTTP body:
{"success":false,"error":"Param \"name\" is required"}

Error publishing webhook. Response HTTP status:
400

Automation configuration:

  • Webhook URL: https://mysecureserver/api/v1/channels.create
  • Headers: X-Auth-Token, X-User-Id and Content-type as application/json
  • HTTP Method: POST
  • Webhook body: Custom data
  • Custom data: {"name":"name_of_channel"}

I've tried with smart value too: {"name":"{{issue.key.toLowerCase()}}"}.

I changed logging configuraton and added "com.codebarrel" package in order to try to see what's happening, but no lucky.

It seems like custom data not forwarded. Any help? Thanks!

1 answer

1 accepted

1 vote
Answer accepted

After a little breath I found the solution. A mistake, actually.

I had to change the header Content-type to Content-Type and it worked. Obviously!

Hi @Junio Fernandes

I am facing the same issue which you have reported here.

Headers: X-Auth-Token, X-User-Id and Content-type as application/json

Do we need to add the credentials here for the authorization ?web-request.PNG

My problem was about word "type", where it should be "Type" (case sensitive). You did it. So it's not the same problem. I can't say if you need other heads for authorization. Maybe you should start another thread where you explain your use case for a better help. Sorry.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you