-
Notifications
You must be signed in to change notification settings - Fork 448
RemoteOutputFiles
Output files of completed jobs can be downloaded using these URLs:
PROJECT_URL/get_output.php?cmd=result_file&auth_str=AUTH&result_name=NAME&file_num=N
PROJECT_URL/get_output.php?cmd=batch_files&auth_str=AUTH&batch_id=N
PROJECT_URL/get_output.php?cmd=workunit_file&auth_str=AUTH&wu_name=NAME&file_num=N
PROJECT_URL/get_output.php?cmd=workunit_files&auth_str=AUTH&wu_id=N
The variants are:
- result_file: download the Nth output file of the given result.
- batch_file: download all the output files of the canonical results of given batch, as a zip archive.
- workunit_file: download the Nth output file of the canonical instance of the given workunit.
- workunit_files: download all the output files of the canonical instance of the given workunit, as a zip archive.
In each case, auth_str is the MD5 of authenticator of the creator of the jobs, concatenated with the item name or ID.
Notes:
- These work only for jobs that are part of a batch.
- The interface is secure in sense that only the creator of a job can download its output files.
- In case of error, the resulting file will have the word "ERROR" at the beginning.
The Python binding is part of the 'BOINC_SERVER' class described in remote job submission. This class provides two functions:
get_output_file_url(result_name, file_num)
get_output_files_url(batch_id):
These return URLs for fetching a single output file, and for fetching the zipped outputs of a batch.
A C++ interface to the workunit_file variant is available in
lib/remote_submit.cpp
:
extern int get_output_file(
const char* project_url,
const char* authenticator,
const char* job_name,
int file_num,
const char* dst_path
);
The following PHP interfaces are available in html/inc/submit.inc
:
boinc_get_output_file()
returns the URL from which the output file can be downloaded:
$req->project = "http://project.url";
$req->authenticator = "...";
$req->instance_name = "result name";
$req->file_num = 0;
$url = boinc_get_output_file($req);
$x = file_get_contents($url); // read output file into memory
boinc_get_output_files()
returns a URL from which a zipped archive of all
output files from the batch can be downloaded
(only the outputs of canonical instances are included).
$req->project = "http://project.url";
$req->authenticator = "...";
$req->batch_id = 55;
$url = boinc_get_output_files($req);