KB Article #178905

How to use asynchronously the ReST API for a send command?

Problem

How to use asynchronously the ReST API for a send command?


What is the correct way to submit file transfers asynchronuously via the ReST API?



Resolution

The ReST API can be used synchronously or asynchronously.


To create an asynchronously request, juste add the apitimeout parameter with value 0.


For instance:
curl -X POST -v -k -f -H "Content-Type: application/json" -H "Authorization: Basic " -d "{\"fname\": \"/etc/hosts\", \"sync\": \"NO\" }" '[https://aaaaa.bbbbb.ccccc:1768/cft/api/v1/transfers/files/outgoings?part=win_cft&idf=TEST_ReST_API&apitimeout=0]'

Alternatively, you can configure the following uconf parameter to 0:


copilot.restapi.catalog.retry_timeout

The default value of the apiTimeout parameter as defined in the request URL.
Available exclusively for POST requests.