KB Article #179847
REST API: How to limit the maximum number of parallel transfers when using Rest API
Problem
In many cases when pulling files from a remote server, you might need to limit the maximum number of parallel transfers that ST will execute.
Resolution
When using the Admin UI, the limit can be defined in the subscription using the Maximum number of parallel transfers option.
However, when using the Rest API the solution is to add an additional option to the query you are sending to pull the files. You need to add a name:value pair for maxParallelSitPulls to your object data:
"maxParallelSitPulls": "<desiredNumber>"
An example cURL command where the account name testAccount with a Transfer Site called testSite will be triggered can look like the one below:
curl -k -u ADMIN_USER:ADMIN_PASS -X POST "https://SERVER_ADDRESS:ADMIN_PORT/api/v1.4/transfers/pull" -H "accept: application/json" -H "Content-Type: application/json" -d '{ "accountName": "testAccount", "site": "testSite", "destinationDirectory": "Basic", "maxParallelSitPulls": "5" }'
In the above example the destination folder is set to /Basic and the maximum number of parallel transfers is limited to 5.