Trying to use httpjson integration to scrape an api of data, using filebeat.8.2.2
The api takes query parameters PageSize=1000&PageNumber=1, where I'm supposed to keep adding PageNumber +1 until I get a 404 error.
However I can't figure out how to configure.
- set:
target: url.params.PageNumber
value: [[add .last_response.url.params.PageNumber 1]]
fail_on_template_error: true
gives error: [elastic_agent.filebeat][error] Error creating runner from config: fail to unpack the set configuration: type mismatch accessing 'response.pagination.0.set.value' accessing 'response'
if I change value with a '
- set:
target: url.params.PageNumber
value: '[[add .last_response.url.params.PageNumber 1]]'
fail_on_template_error: true
gives error: [elastic_agent.filebeat][error] Error creating runner from config: fail to unpack the set configuration: type mismatch accessing 'response.pagination.0.set.value' accessing 'response'
How can I set the pagination rules to keep increasing until done?