Changes between Version 2 and Version 3 of RemoteOutputFiles


Ignore:
Timestamp:
Feb 1, 2013, 10:58:24 PM (11 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemoteOutputFiles

    v2 v3  
    33== Web service interface ==
    44
    5 Output files can be downloaded using web services of several forms:
     5Output files of completed jobs can be downloaded using web services of several forms:
    66{{{
    77PROJECT_URL/get_output.php?cmd=result_file&auth_str=AUTH&result_name=NAME&file_num=N
     
    1919  as a zip archive.
    2020
    21 In each case, '''auth_str''' is the authenticator of the requesting user,
    22 who must be the creator of the jobs involved.
     21In each case, '''auth_str''' is the authenticator of the creator of the jobs involved.
    2322
    2423Notes:
    2524
    2625 * 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.
    2727 * In case of error, the resulting file will have the work "error" in the first line.
    2828
    2929== C++ interface ==
     30
     31A C++ interface to the workunit_file variant is available in
     32samples/condor/job_rpc.cpp:
    3033
    3134{{{
     
    4043
    4144== PHP interface ==
    42 === boinc_get_output_file() ===
    4345
    44 Get a URL for a particular output file.
     46The following PHP interfaces are available:
    4547
    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);
    5054
    51 Result: a URL from which the output file can be downloaded.
     55$x = file_get_contents($url);   // read output file into memory
     56}}}
    5257
    53 === boinc_get_output_files() ===
     58'''boinc_get_output_file()''' returns the URL from which the output file can be downloaded.
    5459
    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}}}
    5866
    59 Result: a URL from which a zipped archive of all
     67'''boinc_get_output_files()''' returns a URL from which a zipped archive of all
    6068output files from the batch can be downloaded
    6169(only the outputs of "canonical" instances are included).