# Pagination Logic in input of HTTP Poller plugin, if not how to do it in custom plugin

**URL:** https://discuss.elastic.co/t/pagination-logic-in-input-of-http-poller-plugin-if-not-how-to-do-it-in-custom-plugin/316595
**Category:** Logstash
**Created:** [October 14, 2022, 6:30am UTC](https://discuss.elastic.co/t/pagination-logic-in-input-of-http-poller-plugin-if-not-how-to-do-it-in-custom-plugin/316595 "2022-10-14T06:30:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sayontani\_Bose1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sayontani_bose1/32/97487_2.png) [@Sayontani\_Bose1](https://discuss.elastic.co/u/Sayontani_Bose1)
#### Post date: [October 14, 2022, 6:30am UTC](https://discuss.elastic.co/t/pagination-logic-in-input-of-http-poller-plugin-if-not-how-to-do-it-in-custom-plugin/316595/1 "2022-10-14T06:30:37Z")

</div>

I have to bulk import data via LogStash as below:  
Source: Restful Get APIs  
Destination : Elasticsearch

My .conf file looks as below:  
input {  
http\_poller {  
urls =\> {  
ticket\_status =\> {  
method =\> get  
url =\> "[https://someurl/movies?page=0&size=30](https://someurl/movies?page=0&size=30)"  
headers =\> {  
"accept" =\> "application/json"  
}  
}  
}

This fetches 30 records at a time.  
But, i have more than 5000 records and need to apply pagination logic in input of http-poller.

Please help how can i apply pagination logic here.

If not possible then please let me know how to do it custom pulgin.

Thanks.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [October 14, 2022, 6:44am UTC](https://discuss.elastic.co/t/pagination-logic-in-input-of-http-poller-plugin-if-not-how-to-do-it-in-custom-plugin/316595/2 "2022-10-14T06:44:41Z")

</div>

You have set size 30 in url. Check documentation which params do you need. Most likely need to remove `size`.

```auto
ticket_status => {
method => get
url => "https://someurl/movies?page=0&size=30"

```

---

<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: [November 11, 2022, 6:44am UTC](https://discuss.elastic.co/t/pagination-logic-in-input-of-http-poller-plugin-if-not-how-to-do-it-in-custom-plugin/316595/3 "2022-11-11T06:44:42Z")

</div>

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