# Snow API not working with logstash

**URL:** <https://discuss.elastic.co/t/snow-api-not-working-with-logstash/212910>\
**Category:** Logstash\
**Created:** [December 24, 2019, 4:00am UTC](https://discuss.elastic.co/t/snow-api-not-working-with-logstash/212910 "2019-12-24T04:00:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![katara](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/katara/32/60143_2.png) [@katara](https://discuss.elastic.co/u/katara)\
**Post date:** [December 24, 2019, 4:00am UTC](https://discuss.elastic.co/t/snow-api-not-working-with-logstash/212910/1 "2019-12-24T04:00:23Z")

</div>

Hi,  
Im trying to query a snow API with the below configuration in Logstash 7.2.0,

> ```
> input {
> http_poller {
> urls => {
> snowinc => {
> url => "https://l.service-now.com/api/now/table/incident?sysparm_limit=10"
> user => "logstash_user"
> password => "hello123"
> headers => {Accept => "application/json"}
> }
> }
> request_timeout => 60
> metadata_target => "http_poller_metadata"
> schedule => { cron => "* * * * * UTC"}
> codec => "json"
> }
> }
> output {
> elasticsearch {
> hosts => ["10.116.55.24:9200"]
> index => "snowinc"
> }
> stdout { codec => rubydebug }
> }
> 
> ```

However, I do not see any data in my index. (index got created with no data)  
I am able to see data from the url when I try to curl the same. So im sure there is data i the API URL.

Logs show the below error:

`

> [2019-12-24T01:28:01,510][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"snowinc", :\_type=\>"\_doc", :routing=\>nil}, #LogStash::Event:0x13fbd67c], :response=\>{"index"=\>{"\_index"=\>"snowinc", "\_type"=\>"\_doc", "_id"=\>"OkiXNm8Be2NFZrotRzc_", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"mapper [result.assigned\_to] of different type, current\_type [text], merged\_type [ObjectMapper]"}}}}

`

Kindly help figure out where im going wrong.

thanks in advance 🙂

Regards,  
Katara

---

<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:** [January 21, 2020, 4:05am UTC](https://discuss.elastic.co/t/snow-api-not-working-with-logstash/212910/2 "2020-01-21T04:05:51Z")

</div>

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