Changes between Version 2 and Version 3 of RemoteOutputFiles
- Timestamp:
- Feb 1, 2013, 10:58:24 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemoteOutputFiles
v2 v3 3 3 == Web service interface == 4 4 5 Output files can be downloaded using web services of several forms:5 Output files of completed jobs can be downloaded using web services of several forms: 6 6 {{{ 7 7 PROJECT_URL/get_output.php?cmd=result_file&auth_str=AUTH&result_name=NAME&file_num=N … … 19 19 as a zip archive. 20 20 21 In each case, '''auth_str''' is the authenticator of the requesting user, 22 who must be the creator of the jobs involved. 21 In each case, '''auth_str''' is the authenticator of the creator of the jobs involved. 23 22 24 23 Notes: 25 24 26 25 * These operations work only for jobs that are part of a batch. 26 * This interface is secure in sense that only the creator of a job can download its output files. 27 27 * In case of error, the resulting file will have the work "error" in the first line. 28 28 29 29 == C++ interface == 30 31 A C++ interface to the workunit_file variant is available in 32 samples/condor/job_rpc.cpp: 30 33 31 34 {{{ … … 40 43 41 44 == PHP interface == 42 === boinc_get_output_file() ===43 45 44 Get a URL for a particular output file. 46 The following PHP interfaces are available: 45 47 46 Argument: a request object with elements 47 * '''project''' and '''authenticator''': as above, 48 * '''instance_name''': specifies a job instance, 49 * '''file_num''': the ordinal number of one of the output files. 48 {{{ 49 $req->project = "http://project.url"; 50 $req->authenticator = "..."; 51 $req->instance_name = "result name"; 52 $req->file_num = 0; 53 $url = boinc_get_output_file($req); 50 54 51 Result: a URL from which the output file can be downloaded. 55 $x = file_get_contents($url); // read output file into memory 56 }}} 52 57 53 === boinc_get_output_files() === 58 '''boinc_get_output_file()''' returns the URL from which the output file can be downloaded. 54 59 55 Argument: a request object with elements 56 * '''project''' and '''authenticator''': as above, 57 * '''batch_id''': specifies a batch. 60 {{{ 61 $req->project = "http://project.url"; 62 $req->authenticator = "..."; 63 $req->batch_id = 55; 64 $url = boinc_get_output_file($req); 65 }}} 58 66 59 Result:a URL from which a zipped archive of all67 '''boinc_get_output_files()''' returns a URL from which a zipped archive of all 60 68 output files from the batch can be downloaded 61 69 (only the outputs of "canonical" instances are included).