HTTP Pagination with initial query not present in subsequent requests

Describe the problem/error/question

FusionAuth’s User API requires that an initial query of queryString=* be appended to the request, or else it throws the error:
400 - "{\"fieldErrors\":{},\"generalErrors\":[{\"code\":\"[invalid]\",\"message\":\"You must specify either the [ids], [queryString], or [query] property. If you are continuing a search, you must include the [nextResults] property.\"}]}"

This only returns the 25 users though, and a nextResults property in the response is required to query the next 25 users and so on.

Using n8n’s HTTP node’s built-in pagination feature, I am attempting to use either Update a Parameter in Each Request or Response Contains Next URL, but it appears that the initial query is still appended onto the subsequent results, which causes FusionAuth to throw the error:
[ { "fieldErrors": { "queryString": [ { "code": "[notBlank]queryString", "message": "You may not provide the [queryString] property when the [nextResults] property is provided." } ] }, "generalErrors": [ ] } ]

Is there some way to drop the initial query in order to paginate through this terrible API using a single node?

The flow below shows what I am trying to achieve in just a single HTTP node

What is the error message (if any)?

See problem/error/question above.

Please share your workflow

Erroneous node

Desired outcome

Share the output returned by the last node

Information on your n8n setup

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

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:

Hey @ThomasLu_EarthDaily , looks like your solution is the best in your situation. I would do the same.

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