Browse Source

Set limit=10000 for /folders/{folderId}/members

Viya 3.5 introduces version 2 of the Folders API. Both version 1 and version 2 of this API have a limit parameter, with a default of 20 results, but it did not seem to be enforced in the API at v1. It does seem to be being enforced at v2, so now specifying a limit high enough for our classroom use. For large folder structures, this may be insufficient. In this case you could increase it, or re-write this tool to iterate through several 'pages' of results. Contributions from any user welcome on this!
master
David Stern 6 years ago
committed by GitHub
parent
commit
6fbd1bc1c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      listmemberswithpath.py

4
listmemberswithpath.py

@ -67,7 +67,9 @@ if not objecturi.startswith("/folders/folders/"):
#See Folders API documentation in swagger at http://swagger.na.sas.com/apis/folders/v1/apidoc.html#op:getAncestors
endpoint=objecturi+'/members'
if recursive:
endpoint=endpoint+'?recursive=true'
endpoint=endpoint+'?recursive=true&limit=10000'
else:
endpoint=endpoint+'?limit=10000'
method='get'
#make the rest call

Loading…
Cancel
Save