Starting with Resilio Active Everywhere 4.0, a special GETFILES macro can be used to transfer files from a compiled list of files. This new %GETFILES% macro is not visible in the console's UI and can be used through the Console API and in the distribution job only.
Here is a JSON example of the creation of the distribution job with GETFILES macros on the source using the console's API POST request:
{
"id": 1,
"name": "Distribution job with GETFILES macros",
"description": "",
"settings": {
"priority": 5,
"use_ram_optimization": true,
"delete_synced_files_ttl": 30,
"profile": {}
},
"groups": [],
"agents": [
{
"id": 1,
"path": {
"macro": "%GETFILES%"
},
"permission": "rw"
},
{
"id": 2,
"path": {
"macro": "%DOWNLOADS%",
"win": "GETFILES example",
"osx": "GETFILES example",
"linux": "GETFILES example",
"android": "GETFILES example",
"xbox": "GETFILES example"
},
"permission": "ro"
} ],
"type": "distribution",
"use_new_cipher": true,
"scheduler": {
"type": "manually"
},
"notifications": []
}
After creating and running the job, you should see that agents have the "waiting for files from source" status.
Now, it's possible to load the list of files to transfer to the source agent using the API. Check this example https://resilio-download-4-gw.resilio.com/?v=4.1.0#api-Runs-AddFiles
You may use as many 'PUT - Add files' requests as you need until you submit a request with the parameter "commit": true, see the example using the link above.