|
|
(28 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| =Web Services Configuration=
| | #REDIRECT [[Plugins/Artefact/WebServices/WebServicesConfiguration]] |
| | |
| | |
| == Global activation ==
| |
| | |
| == Activating Protocols ==
| |
| | |
| | |
| == Service Groups ==
| |
| | |
| | |
| == Function API Descriptions ==
| |
| | |
| <div id="main-column-container">
| |
| | |
| <h1>Plugin Administration: artefact: webservice</h1>
| |
| | |
| | |
| | |
| | |
| | |
| <h2>Function: mahara_group_create_groups </h2>
| |
| <table>
| |
| <tbody><tr><td>Description:</td><td>Create groups</td></tr>
| |
| <tr><td>Component:</td><td>webservice/group</td></tr>
| |
| <tr><td>Class:</td><td>mahara_group_external</td></tr>
| |
| <tr><td>Method:</td><td>create_groups</td></tr>
| |
| </tbody></table>
| |
| <br>
| |
| <span class="arguments">Arguments</span>
| |
| <br>
| |
| | |
| <span style="font-size: 80%">
| |
| | |
| <b>groups</b> (Required)
| |
| <br>
| |
|
| |
| <br>
| |
| <div>
| |
| <div class="detaildescription">
| |
| <pre class="detaildescription"><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>)
| |
| </pre>
| |
| </div>
| |
| </div>
| |
|
| |
| <br>
| |
| <div>
| |
| <div class="xmlrpcdescription">
| |
| <pre class="detaildescription"><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
| |
| )
| |
| )
| |
| )
| |
| )
| |
| </pre>
| |
| </div>
| |
| </div>
| |
|
| |
|
| |
| <br>
| |
| <div>
| |
| <div class="restdescription">
| |
| <pre class="detaildescription"><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
| |
| | |
| </pre>
| |
| </div>
| |
| </div>
| |
|
| |
| </span>
| |
|
| |
| | |
| <br>
| |
| <br>
| |
| <span class="response">Response</span>
| |
| <br>
| |
| <span style="font-size: 80%">
| |
|
| |
| <div>
| |
| <div class="detaildescription">
| |
| <pre class="detaildescription"><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>)
| |
| </pre>
| |
| </div>
| |
| </div>
| |
|
| |
| <br>
| |
| <div>
| |
| <div class="xmlrpcdescription">
| |
| <pre class="detaildescription"><b>XML-RPC (PHP structure)</b>
| |
| | |
| Array
| |
| (
| |
| [0] =>
| |
| Array
| |
| (
| |
| [id] => int
| |
| [name] => string
| |
| )
| |
| )
| |
| </pre>
| |
| </div>
| |
| </div>
| |
|
| |
|
| |
| <br>
| |
| <div>
| |
| <div class="restdescription">
| |
| <pre class="detaildescription"><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>
| |
| | |
| </pre>
| |
| </div>
| |
| </div>
| |
|
| |
| | |
| </span>
| |
| <br>
| |
|
| |
| <br>
| |
| <span class="response">Error message</span>
| |
| <br>
| |
| <span style="font-size: 80%">
| |
| <div>
| |
| <div class="restdescription">
| |
| <pre class="detaildescription"><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>
| |
| </pre>
| |
| </div>
| |
| </div>
| |
| </span>
| |
|
| |
| <br>
| |
| <br>
| |
| | |
|
| |
| | |
| | |
| </div>
| |
| | |
| == Token Based Access Control ==
| |
| | |
| | |
| == Simple User Authentication Access Control ==
| |