Node HTTP pagination - Bad request

image

Hi everyone, I’m integrating with the Miro API, which returns items with pagination through a cursor inside the body.

I found the pagination option in the http node, and I’m adding the parameters as shown in the image. However, I’m getting a bad request.

{
  "size": 10,
  "limit": 10,
  "total": 14,
  "data": [
    ... same data
  ],
  "links": {
    "self": "https://api.miro.com/v2/boards/uXjVK-8XTrQ%3D/sticky_notes?limit=10&cursor=",
    "next": "https://api.miro.com/v2/boards/uXjVK-8XTrQ%3D/sticky_notes?limit=10&cursor=MzQ1ODc2NDU5NTk5NDU4OTI0OH5zdGlja3lfbm90ZQ%3D%3D",
    "last": "https://api.miro.com/v2/boards/uXjVK-8XTrQ%3D/sticky_notes?limit=10&cursor=MzQ1ODc2NDU5NTk5NDU4OTI0OH5zdGlja3lfbm90ZQ%3D%3D"
  },
  "cursor": "MzQ1ODc2NDU5NTk5NDU4OTI0OH5zdGlja3lfbm90ZQ==",
  "type": "cursor-list"
}

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@Silvio_Brito , the returned response contains the next page URL, which by the way includes the cursor. Use the option “Response Contains Next URL” instead, where the Next URL expression is {{ $response.body.links.next }}.

Though, I do not know what the response looks like when no next page is left. Perhaps next property will not be present in that case. Thus, take that into consideration and configure “Pagination Complete When” accordingly to stop paginating in time and preventing bad responses.

Tks. I tryed manual pagination usin the cursor field. Its ok for now. But, i will ro more tests.

Tks

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