On this page
Short answer
A Workflow Studio REST step limits responses not saved as attachments to 5 MB by default and 10 MB at most. Above 10 MB, or when an API pages its results, use a Data Stream action, and write the pagination end condition yourself.
A Workflow Studio REST step limits responses that are not saved as attachments to 5 MB by default, and the glide.pf.rest.response_payload_max_size property can raise that to 10 MB at most. Above 10 MB, or when the API returns pages, ServiceNow points you to a Data Stream action. The 10 MB figure is the edge of the REST step, not a limit on the Data Stream.
This post lists the thresholds, the pagination rules and the traps. For help with the design, see our ServiceNow consulting page. Everything below is from ServiceNow's documentation, read 4 December 2026; check it against your release.
What is the 10 MB limit, and where do the other numbers sit?
A direct REST response above the limit generates an error. ServiceNow gives two ways round it: save the response as an attachment, or raise the property. The property tops out at 10240 KB, which is 10 MB. Past that, use a Data Stream action.
| Setting | Default | Maximum |
|---|---|---|
| REST step response not saved as an attachment (glide.pf.rest.response_payload_max_size) | 5 MB | 10 MB |
| Attachment size for pages sent from a MID Server (com.glide.attachment.max_size) | 1024 MB | None |
| Instance wait for one page from a MID Server (datastream_alternative_env_fetch_page_timeout_seconds) | 600 seconds | 7200 seconds |
| REST Attachment API request timeout transaction quota rule | 60 seconds | 300 seconds |
| Wait for a JDBC payload (com.snc.process_flow.datastream.payload.timeout.seconds) | 600 seconds | 7200 seconds |
| Child plan on the MID Server for JDBC (com.snc.process_flow.datastream.async_child.timeout.seconds) | 60 seconds | 7200 seconds |
When do you need a Data Stream action?
Use one when the response is larger than 10 MB, or when the API returns paginated results. A Data Stream action sends a REST, SOAP or JDBC request, splits the stream into items and hands each item on as a complex object, which a For each block in the flow then processes.
- Parsing: a Splitter step finds the repeated item using JSONPath or XPath, and a Script Parser step maps each item to the output object.
- Reuse: the same action can feed Integration Hub Import and a data source, not only a flow.
- Licence: Data Stream actions require an Integration Hub subscription, and each request counts as one transaction, including every request for a next page.
That last line changes the cost of a design. A job that pages 200 times is 200 transactions, so size the page and the schedule with your entitlement in mind.
How does pagination work, and what breaks it?
Pagination is yours to write, and most failures come from a handful of rules. ServiceNow's design page lists them.
- The reserved
getNextPagevariable is Boolean and defaults to false. Your script sets it to true while another page is available, for example while the response holds a next-page token. Requests continue while it stays true. - Pagination variables are strings only. To add to an offset, convert, add, then convert back, for example
variables['offset'] = String(parseInt(variables['offset'], 10) + parseInt(variables['limit'], 10)). - Give the script an end condition that sets
getNextPageto false. ServiceNow says an end condition is needed to avoid an infinite loop. - Aim for pages under one GB, or the flow designer may have to raise the attachment size.
- Retries use a fixed interval only, and the total delay cannot exceed 30 seconds.
Nesting Data Stream actions is not supported. Inside the For each block, do not place actions that pause the flow (Ask for Approval, Wait for Condition) or that always run on a MID Server (JDBC, PowerShell and SSH steps).
What changes when the data comes through a MID Server?
The MID Server retrieves the data and sends each page to the instance as an attachment. Actions in the For each block always run on the instance, so keep the preprocessing script, request script and REST step in one place. Moving between the instance and the MID Server on every page can slow the job.
A JDBC Data Stream action is different. It is retrieval only, with no updates or deletes, it needs no pagination because all the data comes back in one request, and the Maximum Row and Maximum Payload Size fields are not available. Two MID Server properties, mid.jdbc.datastream.max.record.size and mid.jdbc.datastream.fail.when.attachement.limit.exceeded, tune it. JDBC work on a MID Server also raises the cluster question covered in why a JDBC load runs twice after a failover.
What should you check before production?
Test the action on its own before it goes into a flow. Then check three settings.
- Turn off reporting for big loops with the
com.snc.process_flow.reporting.levelproperty, since iterating over many records is resource heavy. - Know what the execution details keep: the last 1000 items and the last five pages by default.
- Count the transactions. Pages times runs, against what your Integration Hub entitlement allows.
If a response is under the limit and not paged, a plain REST step is simpler, and a custom action can wrap it; see building a custom action when a spoke action is locked.
Sources
- www.servicenow.com/docs/r/integrate-applications/integration-hub/data-stream-actions.html
- www.servicenow.com/docs/r/integrate-applications/integration-hub/data-stream-design.html
- www.servicenow.com/docs/r/integrate-applications/integration-hub/dsa-on-mid.html
- www.servicenow.com/docs/r/integrate-applications/integration-hub/rest-request-action-designer.html
Frequently Asked Questions
Is 10 MB a hard limit on a Data Stream action?
No. ServiceNow describes Data Stream actions as handling a stream larger than 10 MB. The 10 MB maximum applies to the response size property of a regular REST step.
Can a Data Stream action update records in the source database?
Not through the JDBC Data Stream action. ServiceNow says you can only retrieve data with it, not update or delete records.
Does every page request count toward my licence?
ServiceNow says each request counts as one transaction for licensing, including each request for the next page, and that Data Stream actions require an Integration Hub subscription. Confirm the terms with ServiceNow.
Talk to an engineer
Need a hand with ServiceNow?
Senior engineers who run it in production. Get a quote or a free consultation, no sales pitch.

