Changes between Version 20 and Version 21 of WebRpc
- Timestamp:
- Jan 18, 2009, 12:33:59 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebRpc
v20 v21 14 14 }}} 15 15 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). 16 * The output is XML. 17 * If the project's [#get_project_config get_project_config.php] file includes a `<rpc_prefix>` element, its content should be used as the URL prefix; otherwise use the project's master URL. 18 * Optional values are shown enclosed in square brackets. 16 19 * If an RPC fails, the returned XML document is 17 20 … … 47 50 '''-208''':: 48 51 Account creation disabled 49 * The output is XML.50 * If the project's [#get_project_config get_project_config.php] file includes a `<rpc_prefix>` element, its content should be used as the URL prefix; otherwise use the project's master URL.51 52 52 53 53 == Project configuration == #get_project_config 54 54 55 Each BOINC project and account manager exports a few configuration items via a web RPC; namely, it must provide an XML document at the address 56 {{{ 57 http://PROJECT_URL/get_project_config.php 58 }}} 55 '''URL''':: 56 project_url/get_project_config.php 57 '''input''':: 58 none. [[BR]] 59 '''examples''':: 60 http://setiathome.berkeley.edu/get_project_config.php 61 '''output''':: 59 62 60 63 This file is created by [MakeProject make_project], and in most cases you don't have to change it. … … 106 109 The elements are: 107 110 108 '''name'''::111 {{{name}}}:: 109 112 Project name 110 '''master_url'''::113 {{{master_url}}}:: 111 114 Master URL 112 '''local_revision'''::115 {{{local_revision}}}:: 113 116 The SVN changeset number of the project's server software. 114 '''web_stopped'''::117 {{{web_stopped}}}:: 115 118 Nonzero if the project's database is down, which means the data-driven web pages are turned off. 116 '''sched_stopped'''::119 {{{sched_stopped}}}:: 117 120 Nonzero if the project's scheduler server is down, which means you can't get new work or report completed work. 118 '''account_creation_disabled'''::121 {{{account_creation_disabled}}}:: 119 122 If present, this project is not allowing creation of new accounts 120 '''min_passwd_length'''::123 {{{min_passwd_length}}}:: 121 124 Minimum password length (for new account creation) 122 '''account_manager'''::125 {{{account_manager}}}:: 123 126 If present, this is an account manager, not a BOINC project 124 '''uses_username'''::127 {{{uses_username}}}:: 125 128 If present, this project uses names (rather than email addresses) as the primary account identifier 126 '''client_account_creation_disabled'''::129 {{{client_account_creation_disabled}}}:: 127 130 If present, new accounts can be created only via the web (not via the client software). 128 '''rpc_prefix'''::131 {{{rpc_prefix}}}:: 129 132 Prefix to use for web RPCs, instead of the master URL. 130 '''error_num'''::133 {{{error_num}}}:: 131 134 The project is currently down. A BOINC error number is returned. 132 '''platforms'''::135 {{{platforms}}}:: 133 136 A list of platforms for which the project has application versions. 134 '''system_requirements'''::137 {{{system_requirements}}}:: 135 138 Hardware requirements for participating in this project. If a computer doesn't meet these requirements it may not get sent any work by the project. All requirements are 'net'; e.g. the CPU requirements are after factors like [ClientSched on-fraction, active-fraction], and resource share have been taken into consideration. NOT IMPLEMENTED YET. 136 139 140 '''action''':: 141 Each BOINC project and account manager exports it's configuration via the get_project_config web RPC. 142 137 143 138 144 == Server status == #server_status 139 145 140 BOINC-based projects offer the following XML export at `URL/server_status.php`. These are generally updated every 10 minutes or so - do not poll more often than that. These can be used to make web sites showing the server status of multiple BOINC projects. 146 '''URL''':: 147 project_url/server_status.php 148 '''input''':: 149 none. [[BR]] 150 '''examples''':: 151 http://einstein.phys.uwm.edu/server_status.php 152 '''output''':: 141 153 142 154 {{{ … … 177 189 }}} 178 190 191 '''action''':: 192 XML export generally updated every 10 minutes or so - do not poll more often than that. Status is used to make web sites showing the server status of multiple BOINC projects. 193 179 194 == Create account == #create_account 180 195 181 196 '''URL''':: 182 197 project_url/create_account.php 183 198 '''input''':: 184 email_addr: email address passwd_hash: the MD5 hash of the concatenation of the user's password and the email address. 185 user_name: the user name 199 {{{email_addr}}}: email address. [[BR]] 200 {{{passwd_hash}}}: the MD5 hash of the concatenation of the user's password and the email address.[[BR]] 201 {{{user_name}}}: the user name.[[BR]] 202 '''examples''':: 203 http://ralph.bakerlab.org/create_account.php?email_addr=feet1st@noyaspamhoo.com&passwd_hash=2ab548fae3162ccfa1a2d41a55557a92&user_name=CrunchAll 204 186 205 '''output''':: 187 206 … … 192 211 }}} 193 212 194 '''action'''::213 '''action''':: 195 214 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. 196 215 … … 200 219 project_url/lookup_account.php 201 220 '''input''':: 202 email_addr: email address [ passwd_hash ]: the MD5 hash of the concatenation of the user's password and the email address. 221 {{{email_addr}}}: email address [[BR]] 222 [ {{{passwd_hash}}}: ] the MD5 hash of the concatenation of the user's password and the email address. [[BR]] 223 '''examples''':: 224 http://ralph.bakerlab.org/lookup_account.php?email_addr=feet1st@noyaspamhoo.com&passwd_hash=2ab598faf3160ccfa1a2d41a95557a92 203 225 '''output''':: 204 226 … … 219 241 project_url/am_get_info.php 220 242 '''input''':: 221 account_key 243 {{{account_key}}}: 244 '''examples''':: 222 245 '''output''':: 223 246 … … 254 277 project_url/am_set_info.php 255 278 '''input''':: 256 account_key [ name ] [ country ] [ postal_code ] [ global_prefs ] [ project_prefs ] [ url ] [ send_email ] [ show_hosts ] [ teamid ] ''zero means quit current team, if any'' [ venue ] [ email_addr ] [ password_hash ] 279 {{{account_key}}}: [[BR]] 280 [ {{{name}}}: ] [[BR]] 281 [ {{{country}}}: ] [[BR]] 282 [ {{{postal_code}}}: ] [[BR]] 283 [ {{{global_prefs}}}: ] [[BR]] 284 [ {{{project_prefs}}}: ] [[BR]] 285 [ {{{url}}}: ] [[BR]] 286 [ {{{send_email}}}: ] [[BR]] 287 [ {{{show_hosts}}}: ] [[BR]] 288 [ {{{teamid}}}: ] ''zero means quit current team, if any'' [[BR]] 289 [ {{{venue}}}: ] [[BR]] 290 [ {{{email_addr}}}: ] [[BR]] 291 [ {{{password_hash}}}: ] [[BR]] 292 '''examples''':: 257 293 '''output''':: 258 294 … … 272 308 project_url/am_set_host_info.php 273 309 '''input''':: 274 account_key hostid venue 310 {{{account_key}}}: [[BR]] 311 {{{hostid}}}: [[BR]] 312 {{{venue}}}: [[BR]] 313 '''examples''':: 275 314 '''output''':: 276 315 … … 288 327 289 328 '''URL''':: 290 project/show_user.php?userid=X&format=xml or project/show_user.php?auth=X&format=xml 291 '''input''':: 292 id (user ID) or auth (account key) 329 project/show_user.php 330 '''input''':: 331 {{{id}}}: (user ID) or auth: (account key) [[BR]] 332 {{{format}}}: output formatting. 'xml' is only supported value (deafult is HTML formatting) [[BR]] 333 '''examples''':: 334 http://boinc.bakerlab.org/rosetta/show_user.php?userid=123&format=xml 335 http://boinc.bakerlab.org/rosetta/show_user.php?auth=X&format=xml 293 336 '''output''':: 294 337 … … 349 392 350 393 '''URL''':: 351 project/pending.php?format=xml&authenticator=X 394 project/pending.php 395 '''input''':: 396 {{{format}}}: Output formatting. 'xml' is only supported value (deafult is HTML formatting) [[BR]] 397 {{{authenticator}}}: [[BR]] 398 '''examples''':: 399 http://boinc.bakerlab.org/rosetta/pending.php?format=xml&authenticator=X 352 400 '''output''':: 353 401 {{{ … … 369 417 project/create_team.php 370 418 '''input''':: 371 account_key: identifies team founder name: name of team url: team URL (optional) type: one of [/team_types.php these types]. name_html: team name, HTML (optional) description: text describing team (optional) country: team country (optional; if present, must be one of [/countries.php these countries]. 419 {{{account_key}}}: identifies team founder. [[BR]] 420 {{{name}}}: name of team. [[BR]] 421 [ {{{url}}} ]: team URL. [[BR]] 422 {{{type}}}: one of [/team_types.php these types]. [[BR]] 423 [ {{{name_html}}} ]: team name, with HTML formatting. [[BR]] 424 [ {{{description}}} ]: text describing team. [[BR]] 425 [ {{{country}}} ]: team country (if present, must be one of [/countries.php these countries]). [[BR]] 426 '''examples''':: 372 427 '''output''':: 373 428 … … 386 441 387 442 '''URL''':: 388 project/team_lookup.php?team_name=string&format=xml 389 '''input''':: 390 Substring of team name 443 project/team_lookup.php 444 '''input''':: 445 {{{team_name}}}: Substring of team name [[BR]] 446 [ {{{format}}} ]: Output formatting. 'xml' is only supported value (deafult is HTML formatting) [[BR]] 447 '''examples''':: 448 http://boinc.bakerlab.org/team_lookup.php?team_name=BOINC&format=xml 391 449 '''output''':: 392 450 … … 424 482 425 483 '''URL''':: 426 project/team_lookup.php?team_id=N 427 '''input''':: 428 Team ID 484 project/team_lookup.php 485 '''input''':: 486 {{{team_id}}}: 487 '''examples''':: 488 http://boinc.bakerlab.org/rosetta/team_lookup.php?team_id=111 429 489 '''output''':: 430 490 … … 452 512 453 513 '''URL''':: 454 project/team_email_list.php?teamid=X&account_key=Y&xml=1 455 '''input''':: 456 teamid: database ID of team account_key: account key of team founder (optional) 514 project/team_email_list.php 515 '''input''':: 516 {{{teamid}}}: database ID of team [[BR]] 517 {{{account_key}}}: account key of team founder (optional) [[BR]] 518 {{{xml}}}: output formatting. 0=HTML, 1=XML. (default is 0) [[BR]] 519 '''examples''':: 520 http://boinc.bakerlab.org/rosetta/team_email_list.php?teamid=2241&account_key=Y&xml=1 521 457 522 '''output''':: 458 523 … … 485 550 486 551 '''URL''':: 487 project/edit_forum_preferences_action.php NOTE: this uses POST, not GET 488 '''input''':: 489 account_key avatar_url ''Note: the image will be downloaded and stored locally. Only JPG and PNG accepted.'' avatar_select forum_images_as_links forum_link_externally forum_hide_avatars forum_hide_signatures forum_jump_to_unread forum_ignore_sticky_posts forum_low_rating_threshold forum_high_rating_threshold forum_minimum_wrap_postcount forum_display_wrap_postcount signature_enabled signature forum_sort thread_sort faq_sort answer_sort forum_filter_user [ removeID ... ] 552 project/edit_forum_preferences_action.php 553 NOTE: this uses POST, not GET 554 '''input''':: 555 {{{account_key}}}: [[BR]] 556 {{{avatar_url}}}: ''Note: the image will be downloaded and stored locally. Only JPG and PNG accepted.'' [[BR]] 557 {{{avatar_select}}}: [[BR]] 558 {{{forum_images_as_links}}}: [[BR]] 559 {{{forum_link_externally}}}: [[BR]] 560 {{{forum_hide_avatars}}}: [[BR]] 561 {{{forum_hide_signatures}}}: [[BR]] 562 {{{forum_jump_to_unread}}}: [[BR]] 563 {{{forum_ignore_sticky_posts}}}: [[BR]] 564 {{{forum_low_rating_threshold}}}: [[BR]] 565 {{{forum_high_rating_threshold}}}: [[BR]] 566 {{{forum_minimum_wrap_postcount}}}: [[BR]] 567 {{{forum_display_wrap_postcount}}}: [[BR]] 568 {{{signature_enabled}}}: [[BR]] 569 {{{signature}}}: [[BR]] 570 {{{forum_sort}}}: [[BR]] 571 {{{thread_sort}}}: [[BR]] 572 {{{faq_sort}}}: [[BR]] 573 {{{answer_sort}}}: [[BR]] 574 {{{forum_filter_user}}}: [[BR]] 575 [ {{{removeID}}}: ... ] [[BR]] 576 '''examples''':: 490 577 '''output''':: 491 578 A lot of HTML (not XML) … … 494 581 495 582 496 == Get last user's posts from the forum == #forum_get_data_user_posts 497 498 499 '''URL''':: 500 project/forum_get_data.php?method=user_posts&userid=N&count=N&contentlength=N 501 '''input''':: 502 userid: numeric user ID in the database[[BR]] 503 count ''(optional)'': number of entries to return. Maximum 50, default 10.[[BR]] 504 contentlength ''(optional)'': number of characters to return from post content. Default returns whole post. 583 == Get user's last posts on the forum == #forum_get_data_user_posts 584 585 586 '''URL''':: 587 project/forum_get_data.php 588 '''input''':: 589 {{{method}}}: [[BR]] 590 "user_posts" to retrieve post details, [[BR]] 591 "user_threads" to retrieve thread details.[[BR]] 592 {{{userid}}}: numeric user ID in the database[[BR]] 593 [ {{{count}}} ]: number of entries to return. Maximum 50, default 10.[[BR]] 594 [ {{{contentlength}}} ]: number of characters to return from post content. Default returns whole post. Only used when method=user_posts. 595 '''examples''':: 596 http://setiathome.berkeley.edu/forum_get_data.php?method=user_posts&userid=18&count=20&contentlength=256 597 http://setiathome.berkeley.edu/forum_get_data.php?method=user_threads&userid=182&count=20 598 505 599 '''output''':: 506 600 … … 521 615 }}} 522 616 523 '''action''':: 524 Get last user's posts from the forum. 525 526 527 == Get last user's threads from the forum == #forum_get_data_user_threads 528 529 530 '''URL''':: 531 project/forum_get_data.php?method=user_threads&userid=N&count=N 532 '''input''':: 533 * userid: numeric user ID in the database 534 * count ''(optional)'': number of entries to return. Maximum 50, default 10. 535 '''output''':: 536 617 or 618 537 619 {{{ 538 620 <rpc_response> … … 553 635 554 636 '''action''':: 555 Get last user'sthreads from the forums.637 Get user's last posts from the forum, or get user's last threads from the forums. 556 638 557 639 … … 559 641 560 642 '''URL''':: 561 project/apps.php?xml=1 643 project/apps.php 644 '''input''':: 645 [ {{{xml}}} ]: output formatting. 0=HTML, 1=XML. (default is 0) 646 '''examples''':: 647 http://setiathome.berkeley.edu/apps.php?xml=1 562 648 '''output''':: 563 649 List of applications and application versions. For example: