Solved

Web request - API - create a ticket

  • 9 January 2024
  • 4 replies
  • 244 views

Userlevel 1
Badge +3

Hi, 

Anyone could help me out on this please? New user, first time working with Web Request… been through documentation and this community for hours… just can’t find the bug 🤔

Just trying to simply create a basic ticket from Web Request.

Many thanks in advance!

 

icon

Best answer by Daniel Söderlund 10 January 2024, 08:29

View original

4 replies

Userlevel 7
Badge +16

Hello @Patrick G, the web request node is designed to make RESTful API requests such as POST, GET, PUT, and DELETE. It allows you to define your request headers (authorization, URL endpoint, etc) and then pass to request methods that require data in the request body as a JSON payload. So in your example, remove everything but what you have for the data property of your curl command

Keep the opening and closing brackets and everything in between, remove the rest from the “body” field. Lastly, set your API key in the username field and a “X” in the password field to satisfy the basic authentication necessary to make an API request.

This should fix your issue.

Let us know how it goes!! Take care :)

Userlevel 7
Badge +13

As Zac say you don’t need the curl commands when you use the WR node. 

if you copy example from the API page you only need this 

 

Userlevel 1
Badge +3

Many thanks @Daniel Söderlund and @zachary.king,

 

Everything works fine now :) I really appreciate!

 

Pat

Userlevel 1
Badge +4

Wish this would work for me. Copied the exact code from above and the api reference. Tried this

json
 

But I got this

 

Reply