# Send API Events to Servicenow using webhook

**URL:** <https://discuss.elastic.co/t/send-api-events-to-servicenow-using-webhook/142108>\
**Category:** Elasticsearch\
**Created:** [July 30, 2018, 7:23am UTC](https://discuss.elastic.co/t/send-api-events-to-servicenow-using-webhook/142108 "2018-07-30T07:23:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![charan.gandra](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@charan.gandra](https://discuss.elastic.co/u/charan.gandra)\
**Post date:** [July 30, 2018, 7:23am UTC](https://discuss.elastic.co/t/send-api-events-to-servicenow-using-webhook/142108/1 "2018-07-30T07:23:01Z")

</div>

Hi I am trying to send an API Event using the webhook actions in elasticsearch watcher. However I am getting errors due to unknown fields in EventList. I ca send a API event from elasticsearch server using the CURL, so connection string seems to be fine, but unable to send the same through watcher.

Please point me in the right direction if I am making any mistake here. Action part from my watcher is below.

"actions" : {  
"my\_webhook" : {  
"webhook" : {  
"method" : "POST",  
"url" : "[https://servicenowurl](https://servicenowurl)",  
"headers" : {  
"Content-Type" : "application/yaml",  
"x-api-key": "fsfwefasdfwqefdfadsfasfe"  
},  
"body" : {  
"EventList":[  
{  
"severity":"minor",  
"title":"This is a simulated event just for verifying that we can submit an issue to Event Agnostic API as a new event",  
"node":"REMOTESERVER",  
"eventsourcesendingserver":"elasticsearch",  
"eventsourceexternalid":"1644562378276klt586kuy55r59001258",  
"eventsourcecreatedtime":"2018-07-26T13:51:00+02:00",  
"eventsourcebacksyncserver":"",  
"category":"Linux",  
"application":"VM",  
"object":"Availability",  
"relatedcihints": "23u32jjsdfsdf"  
}  
]  
}  
}  
}  
}

Thanks,

---

<div class="post-metadata">

**Author:** ![PhilipR](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@PhilipR](https://discuss.elastic.co/u/PhilipR)\
**Post date:** [August 16, 2018, 4:00pm UTC](https://discuss.elastic.co/t/send-api-events-to-servicenow-using-webhook/142108/2 "2018-08-16T16:00:15Z")

</div>

Hi, I have exactly the same issue. Would it be possible that the json used is in json2 format and that the json parser cannot handle the syntax? Or has anybody figured it out?

Regards,

Philip

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 13, 2018, 4:07pm UTC](https://discuss.elastic.co/t/send-api-events-to-servicenow-using-webhook/142108/3 "2018-09-13T16:07:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
