Artefact/WebServices/WebServicesConfiguration: Difference between revisions
From Mahara Wiki
PiersHarding (talk | contribs) (Created page with "=Web Services Configuration= == Global activation == == Activating Protocols == == Service Groups == == Function API Descriptions == <div id="main-column-container"> …") |
PiersHarding (talk | contribs) |
||
Line 14: | Line 14: | ||
<div id="main-column-container"> | <div id="main-column-container"> | ||
<h1>Plugin Administration: artefact: webservice | <h1>Plugin Administration: artefact: webservice</h1> | ||
Line 189: | Line 189: | ||
</div> | </div> | ||
== Token Based Access Control == | == Token Based Access Control == |
Revision as of 09:10, 23 Haziran 2011
Web Services Configuration
Global activation
Activating Protocols
Service Groups
Function API Descriptions
Plugin Administration: artefact: webservice
Function: mahara_group_create_groups
<tbody> </tbody>Description: | Create groups |
Component: | webservice/group |
Class: | mahara_group_external |
Method: | create_groups |
Arguments
groups (Required)
<b>General structure</b> list of ( <br> object {<br><b>name</b> string <span style="color:#2A33A6"> <i>//Group name</i></span><br><b>shortname</b> string <span style="color:#2A33A6"> <b>Optional</b> <i>//Group shortname for API only controlled groups</i></span><br><b>description</b> string <span style="color:#2A33A6"> <i>//Group description</i></span><br><b>institution</b> string <span style="color:#2A33A6"> <b>Optional</b> <i>//Mahara institution - required for API controlled groups</i></span><br><b>grouptype</b> string <span style="color:#2A33A6"> <i>//Group type: course,standard</i></span><br><b>jointype</b> string <span style="color:#2A33A6"> <b>Default to "controlled"</b> <i>//Join type - these are specific to group type - the complete set are: open, invite, request or controlled</i></span><br><b>category</b> string <span style="color:#2A33A6"> <i>//Group category - the title of an existing group category</i></span><br><b>public</b> int <span style="color:#2A33A6"> <b>Default to "0"</b> <i>//Boolean 1/0 public group</i></span><br><b>usersautoadded</b> int <span style="color:#2A33A6"> <b>Default to "0"</b> <i>//Boolean 1/0 for auto-adding users</i></span><br><b>members</b> list of ( <br> <span style="color:#2A33A6"> <i>//Group membership</i></span><br>object {<br><b>id</b> double <span style="color:#2A33A6"> <b>Optional</b> <i>//member user Id</i></span><br><b>username</b> string <span style="color:#2A33A6"> <b>Optional</b> <i>//member username</i></span><br><b>role</b> string <span style="color:#2A33A6"> <i>//member role: admin, </i></span><br>} <br>)} <br>)
<b>XML-RPC (PHP structure)</b> [groups] => Array ( [0] => Array ( [name] => string [shortname] => string [description] => string [institution] => string [grouptype] => string [jointype] => string [category] => string [public] => int [usersautoadded] => int [members] => Array ( [0] => Array ( [id] => double [username] => string [role] => string ) ) ) )
<b>REST (POST parameters)</b> groups[0][name]= string groups[0][shortname]= string groups[0][description]= string groups[0][institution]= string groups[0][grouptype]= string groups[0][jointype]= string groups[0][category]= string groups[0][public]= int groups[0][usersautoadded]= int groups[0][members][0][id]= double groups[0][members][0][username]= string groups[0][members][0][role]= string
Response
<b>General structure</b> list of ( <br> object {<br><b>id</b> int <span style="color:#2A33A6"> <i>//group id</i></span><br><b>name</b> string <span style="color:#2A33A6"> <i>//group name</i></span><br>} <br>)
<b>XML-RPC (PHP structure)</b> Array ( [0] => Array ( [id] => int [name] => string ) )
<b>REST</b> <?xml version="1.0" encoding="UTF-8" ?> <RESPONSE> <MULTIPLE> <SINGLE> <KEY name="id"> <VALUE>int</VALUE> </KEY> <KEY name="name"> <VALUE>string</VALUE> </KEY> </SINGLE> </MULTIPLE> </RESPONSE>
Error message
<b>REST</b> <?xml version="1.0" encoding="UTF-8"?> <EXCEPTION class="invalid_parameter_exception"> <MESSAGE>Invalid parameter value detected, execution can not continue.</MESSAGE> <DEBUGINFO></DEBUGINFO> </EXCEPTION>