# Error while trying to POST JSON data to the service Now API

**URL:** <https://discourse.nodered.org/t/error-while-trying-to-post-json-data-to-the-service-now-api/8659>\
**Category:** General\
**Created:** [6 March 2019 06:02 UTC](https://discourse.nodered.org/t/error-while-trying-to-post-json-data-to-the-service-now-api/8659 "2019-03-06T06:02:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albin](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Albin](https://discourse.nodered.org/u/Albin)\
**Post date:** [6 March 2019 06:02 UTC](https://discourse.nodered.org/t/error-while-trying-to-post-json-data-to-the-service-now-api/8659/1 "2019-03-06T06:02:08Z")

</div>

Hello ,  
Am new to Node-red.  
Tried to create an incident in service now by posting JSON data to the rest api.

Error: getaddrinfo ENOTFOUND [xxxxx.service-now.com](http://xxxxx.service-now.com) [xxxxx.service-now.com:443](http://xxxxx.service-now.com:443) : [https://xxxxx.service-now.com/api/now/v1/table/incident](https://xxxxx.service-now.com/api/now/v1/table/incident).

But I was able to hit get the response from POSTMAN.

Can anyone please advice.  
PFB the Json flow file.

```auto
[{"id":"271a81c6.780f8e","type":"tab","label":"Flow 14","disabled":false,"info":""},{"id":"2d3df2c.a30d00e","type":"inject","z":"271a81c6.780f8e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":60,"wires":[["829dca1c.1e10d8"]]},{"id":"829dca1c.1e10d8","type":"conf ping","z":"271a81c6.780f8e","name":"","host":"localhost","timeout":"5","requests":"1","x":300,"y":100,"wires":[["41d21b2d.fdfb64"]]},{"id":"41d21b2d.fdfb64","type":"change","z":"271a81c6.780f8e","name":"","rules":[{"t":"set","p":"headers","pt":"msg","to":"{\"Content-Type\":\"application/json\"}","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"short_description\":\"Test incident1 creation through REST\",\"comments\":\"Test_Comments\",\"problem_id\":\"Inc002\"}","tot":"str"},{"t":"set","p":"method","pt":"msg","to":"POST","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":180,"wires":[["ac4d677e.2175a8"]]},{"id":"ac4d677e.2175a8","type":"http request","z":"271a81c6.780f8e","name":"Service_Now_Ticket_creation","method":"use","ret":"obj","url":"https://xxxxx.service-now.com/api/now/v1/table/incident","tls":"","x":610,"y":120,"wires":[["c8040a93.2a5278"]]},{"id":"c8040a93.2a5278","type":"debug","z":"271a81c6.780f8e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":260,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 March 2019 08:56 UTC](https://discourse.nodered.org/t/error-while-trying-to-post-json-data-to-the-service-now-api/8659/2 "2019-03-06T08:56:53Z")

</div>

I notice you have specified https, but have not clicked the secure connection box. I don't know whether that is an issue, it doesn't seem to be documented in the info panel.
