Changes between Version 1 and Version 2 of WebRpc


Ignore:
Timestamp:
Apr 25, 2007, 2:19:55 PM (17 years ago)
Author:
KSMarksPsych
Comment:

Cleaning up.

Legend:

Unmodified
Added
Removed
Modified
  • WebRpc

    v1 v2  
    22
    33
    4 === Contents ===
    5 
    6  * [http://boinc.berkeley.edu/#overview Overview]
    7  * [http://boinc.berkeley.edu/#project_config# Project configuration]
    8  * [http://boinc.berkeley.edu/#create_account Create account]
    9  * [http://boinc.berkeley.edu/#lookup_account Lookup account]
    10  * [http://boinc.berkeley.edu/#am_get_info Get account info]
    11  * [http://boinc.berkeley.edu/#am_set_info Set account info]
    12  * [http://boinc.berkeley.edu/#am_set_host_info Set host info]
    13  * [http://boinc.berkeley.edu/#show_user Get account/host credit info]
    14  * [http://boinc.berkeley.edu/#create_team Create team]
    15  * [http://boinc.berkeley.edu/#team_lookup Lookup teams by name]
    16  * [http://boinc.berkeley.edu/#team_lookup_id Lookup team by ID]
    17  * [http://boinc.berkeley.edu/#team_email_list Get team member list]
    18  * [http://boinc.berkeley.edu/#edit_forum_preferences_action Set forum preferences]
    19  * [http://boinc.berkeley.edu/#forum_get_user_posts Get last user's posts from the forum]
    20  * [http://boinc.berkeley.edu/#forum_get_user_threads Get last user's threads from the forum]
    21  * [http://boinc.berkeley.edu/#apps Get list of applications and versions]
    22 
    23 
    24 === Overview ===
    25  BOINC projects export a number of Web RPCs for creating, querying and updating accounts and host records, and miscellaneous other purposes. These can be used for [AccountManagement account management systems] and credit statistics web sites.
     4== Contents ==
     5
     6 * [WebRpc#Overview Overview]
     7 * [WebRpc#Projectconfiguration Project configuration]
     8 * [WebRpc#Createaccount Create account]
     9 * [WebRpc#Lookupaccount Lookup account]
     10 * [WebRpc#Getaccountinfo Get account info]
     11 * [WebRpc#Setaccountinfo Set account info]
     12 * [WebRpc#Sethostinfo Set host info]
     13 * [WebRpc#Getaccounthostcreditinformation Get account/host credit info]
     14 * [WebRpc#Createteam Create team]
     15 * [WebRpc#Lookupteamsbyname Lookup teams by name]
     16 * [WebRpc#LookupteambyID Lookup team by ID]
     17 * [WebRpc#Getteammemberlist Get team member list]
     18 * [WebRpc#Setforumpreferences Set forum preferences]
     19 * [WebRpc#Getlastuserspostsfromtheforum Get last user's posts from the forum]
     20 * [WebRpc#Getlastusersthreadsfromtheforum Get last user's threads from the forum]
     21 * [WebRpc#Getlistofapplicationversions Get list of applications and versions]
     22
     23
     24== Overview ==
     25
     26BOINC projects export a number of Web RPCs for creating, querying and updating accounts and host records, and miscellaneous other purposes. These can be used for [AccountManagement account management systems] and credit statistics web sites.
    2627
    2728BOINC's RPC mechanisms have the following conventions:
     
    3031 * Each RPC is an HTTP GET transaction.
    3132 * The input is the GET arguments, i.e. a string of the form
     33
    3234{{{
    3335param1=val1&param2=val2&...&paramn=valn
    3436}}}
    35       where param1 ... paramN are the parameter names, and val1 ... valn are the values. Parameter values must be URL-encoded (for example, using PHP's `urlencode` function).
     37where param1 ... paramN are the parameter names, and val1 ... valn are the values. Parameter values must be URL-encoded (for example, using PHP's `urlencode` function).
    3638 * If an RPC fails, the returned XML document is
     39
    3740{{{<error>
    3841    <error_num>N</error_num>
    3942    <error_string>xxx</error_string>
    4043</error>}}}
    41       where N is a BOINC error number and xxx is a textual description. BOINC error numbers are in lib/error_numbers.h; common errors are:
     44
     45where N is a BOINC error number and xxx is a textual description. BOINC error numbers are in lib/error_numbers.h; common errors are:
    4246
    4347 '''-1'''::
     
    6771
    6872
    69 === Project configuration ===
    70  Each BOINC project exports some configuration items relevant to attaching and creating accounts. This RPC is documented [ProjectConfigRpc here].
    71 === Create account ===
     73== Project configuration ==
     74
     75Each BOINC project exports some configuration items relevant to attaching and creating accounts. This RPC is documented [ProjectConfigRpc here].
     76
     77== Create account ==
    7278
    7379
     
    7884 '''output'''::
    7985       
    80 {{{<account_out>
     86{{{
     87<account_out>
    8188    <authenticator>XXX</authenticator>
    82 </account_out>}}}
    83 
    84  '''action'''::
    85         If the project already has an account with that email address,         and a different password, it returns an error.         If an account with that email address exists         and has the same password, it returns the authenticator.         Otherwise the project creates an account         and returns the authenticator.
    86 
    87 
    88 
    89 === Look up account ===
     89</account_out>
     90}}}
     91
     92 '''action'''::
     93        If the project already has an account with that email address, and a different password, it returns an error.         If an account with that email address exists and has the same password, it returns the authenticator.  Otherwise the project creates an account and returns the authenticator.
     94
     95
     96== Look up account ==
    9097
    9198
     
    93100        project_url/lookup_account.php
    94101 '''input'''::
    95         email_addr: email address                  [ passwd_hash ]: the MD5 hash of the concatenation         of the user's password and the email address.
    96  '''output'''::
    97        
    98 {{{<account_out>
     102        email_addr: email address [ passwd_hash ]: the MD5 hash of the concatenation of the user's password and the email address.
     103 '''output'''::
     104       
     105{{{
     106<account_out>
    99107    [ <authenticator>XXX</authenticator> ]
    100108</account_out>
    101     }}}
    102 
    103  '''action'''::
    104         If an account with the given email address doesn't exist,     return an error.     If passwd_hash is given and is correct,     return the account key.
    105 
    106 
    107 
    108 === Get account info ===
     109}}}
     110
     111 '''action'''::
     112        If an account with the given email address doesn't exist, return an error.  If passwd_hash is given and is correct,     return the account key.
     113
     114
     115== Get account info ==
    109116
    110117
     
    115122 '''output'''::
    116123       
    117 {{{<am_get_info_reply>
     124{{{
     125<am_get_info_reply>
    118126    <success/>
    119127    <id>ID</id>
     
    134142    <venue>X</venue>
    135143</am_get_info_reply>
    136     }}}
     144}}}
    137145
    138146 '''action'''::
    139147        returns data associated with the given account
    140148
    141 
    142 
    143 === Set account info ===
     149== Set account info ==
    144150
    145151
     
    150156 '''output'''::
    151157       
    152 {{{<am_set_info_reply>
     158{{{
     159<am_set_info_reply>
    153160    <success/>
    154 </am_set_info_reply>}}}
    155 
    156  '''action'''::
    157         Updates one or more attributes of the given account.     The password hash is MD5(password+lower_case(email_addr)).     If email address is changed,     you must also change the password hash.
    158 
    159 
    160 
    161 === Set host info ===
     161</am_set_info_reply>
     162}}}
     163
     164 '''action'''::
     165        Updates one or more attributes of the given account.     The password hash is MD5(password+lower_case(email_addr)).     If email address is changed, you must also change the password hash.
     166
     167== Set host info ==
    162168
    163169
     
    168174 '''output'''::
    169175       
    170 {{{<am_set_host_info_reply>
     176{{{
     177<am_set_host_info_reply>
    171178    <success/>
    172 </am_set_host_info_reply>}}}
     179</am_set_host_info_reply>
     180}}}
    173181
    174182 '''action'''::
    175183        Updates the host's venue
    176184
    177 
    178 
    179 === Get account/host credit information ===
     185== Get account/host credit information ==
    180186
    181187
     
    186192 '''output'''::
    187193       
    188 {{{<user>
     194{{{
     195<user>
    189196    <id>123</id>
    190197    <cpid>fe0b2753a355b17864ec061eb1b9e8de</cpid>
     
    236243
    237244 '''action'''::
    238         Returns info about an account.     If called with the account key,     returns a list of hosts associated with the account.
    239 
    240 
    241 
    242 === Create team ===
    243 
     245        Returns info about an account.  If called with the account key, returns a list of hosts associated with the account.
     246
     247== Create team ==
    244248
    245249 '''URL'''::
     
    249253 '''output'''::
    250254       
    251 {{{<create_team_reply>
     255{{{
     256<create_team_reply>
    252257    <success/>
    253258    <teamid>N</teamid>
     
    258263        Creates a team
    259264
    260 
    261 
    262 === Look up teams by name ===
     265== Look up teams by name ==
    263266
    264267
     
    269272 '''output'''::
    270273       
    271 {{{<teams>
     274{{{
     275<teams>
    272276    <team>
    273277        <id>5</id>
     
    297301
    298302
    299 
    300 === Look up team by ID ===
     303== Look up team by ID ==
    301304
    302305
     
    307310 '''output'''::
    308311       
    309 {{{<team>
     312{{{
     313<team>
    310314    <id>5</id>
    311315    <name>BOINC@AUSTRALIA</name>
     
    318322
    319323
    320 
    321 === Get team member list ===
     324== Get team member list ==
    322325
    323326
     
    328331 '''output'''::
    329332       
    330 {{{<users>
     333{{{
     334<users>
    331335    <user>
    332336        <id>1</id>
     
    343347    </user>
    344348    [ ... ]
    345 </users>}}}
     349</users>
     350}}}
    346351
    347352 '''action'''::
     
    349354
    350355
    351 
    352 === Set forum preferences ===
     356== Set forum preferences ==
    353357
    354358
     
    363367
    364368
    365 
    366 === Get last user's posts from the forum ===
     369== Get last user's posts from the forum ==
    367370
    368371
     
    373376 '''output'''::
    374377       
    375 {{{<rpc_response>
     378{{{
     379<rpc_response>
    376380    <count>1</count>
    377381    <posts>
     
    384388        [ ... ]
    385389    </posts>
    386 </rpc_response>}}}
     390</rpc_response>
     391}}}
    387392
    388393 '''action'''::
     
    390395
    391396
    392 
    393 === Get last user's threads from the forum ===
     397== Get last user's threads from the forum ==
    394398
    395399
     
    400404 '''output'''::
    401405       
    402 {{{<rpc_response>
     406{{{
     407<rpc_response>
    403408    <count>1</count>
    404409    <threads>
     
    413418        [...]
    414419    </threads>
    415 </rpc_response>}}}
     420</rpc_response>
     421}}}
    416422
    417423 '''action'''::
     
    419425
    420426
    421 
    422 === Get list of application versions ===
    423 
     427== Get list of application versions ==
    424428
    425429 '''URL'''::