Pagination using Filebeat httpjson how to reference the 'next' link in results

Hello, I'm pretty new to using filebeat and currently working out how to use the httpjson input to pull data from a REST API.

I've worked out how to pull the response based on the time period I need and in the correct time format.
What I'm having trouble with is the pagination of the response.
In the response there is a bunch of links that show what URL to use to get the next page of results. I'm not sure how to reference it when using the 'response.pagination' in the filebeat config.

Any help or pointers in the correct direction are hugely appreciated.

For reference:
My current filebeat config, the 'response.pagination' I was playing with based on suggestions I found online, but don't really understand it.

- type: httpjson
  config_version: "2"
  interval: 1m
  enabled: true

  request.url: ""
  request.method: GET

    - set:
        target: header.apikey
        value: "xxxxx"
    - set:
        target: url.params.since
        value: '[[ formatDate (now (parseDuration "-6h")) "2006-01-02T15:04:05.000Z" ]]'
    - set:
        target: header.Content-Type
        value: application/json

    - set:
        target: "cursor.next_url"
        value: "{{}}"

  pretty: true

Cutdown example of the results.

  "page": {
    "totalItems": 10000,
    "pageMarker": 1707655139940,
    "pageSize": 1000,
    "totalPages": 10,
<actual log entries go here>
  "links": {
    "first": "",
    "self": "",
    "next": ""
  "itemType": "LogEvent"

And the documentation for the API I'm using is here, in case someone has a better suggestion for how to achieve this.

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