cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

apoc.load.jsonParams limits the response results to 10000

I am using the following:
WITH 'https://xxx.service-now.com/api/now/table/sys_user?sysparm_fields=name,title,sys_id,email&sysparm_qu...' AS uri
CALL apoc.load.jsonParams(uri, {Authorization: 'Bearer xxx'}, null)
YIELD value
UNWIND value.result as people create (:Person {id: people.sys_id})

The API actually returns more than 100K records, but only 10000 nodes are created

Please suggest an option to retrieve the full results from API and node creation.

1 ACCEPTED SOLUTION

if you run

WITH 'https://xxx.service-now.com/api/now/table/sys_user?sysparm_fields=name,title,sys_id,email&sysparm_query=activeINtrue' AS uri
CALL apoc.load.jsonParams(uri, {Authorization: 'Bearer xxx'}, null)
YIELD value
UNWIND value.result as people return count(people)

does this return 100,000 or 10,000

Ive never used servce-now but per

https://docs.servicenow.com/bundle/paris-application-development/page/integrate/inbound-rest/concept...

sysparm_limit	Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval.
This limit is applied before ACL evaluation. If no records return, including records you have access to, rearrange the record order so records you have access to return first.

Data type: Number

Default 10000

and specifically the Default is 10,000

View solution in original post

2 REPLIES 2

if you run

WITH 'https://xxx.service-now.com/api/now/table/sys_user?sysparm_fields=name,title,sys_id,email&sysparm_query=activeINtrue' AS uri
CALL apoc.load.jsonParams(uri, {Authorization: 'Bearer xxx'}, null)
YIELD value
UNWIND value.result as people return count(people)

does this return 100,000 or 10,000

Ive never used servce-now but per

https://docs.servicenow.com/bundle/paris-application-development/page/integrate/inbound-rest/concept...

sysparm_limit	Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval.
This limit is applied before ACL evaluation. If no records return, including records you have access to, rearrange the record order so records you have access to return first.

Data type: Number

Default 10000

and specifically the Default is 10,000

Thanks for your time.
Yes it returns 10,000
Thanks for the pointer, it is a limitation of Service Now.

I am able to get a max of 20K records by adding the following parameters to the REST API: sysparm_offset=0&sysparm_limit=20000