Actions

Artefact/WebServices/WebServicesConfiguration: Difference between revisions

From Mahara Wiki

(Created page with "=Web Services Configuration= == Global activation == == Activating Protocols == == Service Groups == == Function API Descriptions == <div id="main-column-container"> …")
 
 
(29 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<span class="page-help-icon"> <span class="help"><img src="http://mahara.local.net/maharadev/theme/raw/static/images/icon_help.png" alt="Help" title="Help"></span></span></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] =&gt;
    Array
        (
        [0] =&gt;
            Array
                (
                [name] =&gt; string               
                [shortname] =&gt; string               
                [description] =&gt; string               
                [institution] =&gt; string               
                [grouptype] =&gt; string               
                [jointype] =&gt; string               
                [category] =&gt; string               
                [public] =&gt; int               
                [usersautoadded] =&gt; int               
                [members] =&gt;
                    Array
                        (
                        [0] =&gt;
                            Array
                                (
                                [id] =&gt; double                               
                                [username] =&gt; string                               
                                [role] =&gt; 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] =&gt;
            Array
                (
                [id] =&gt; int               
                [name] =&gt; string               
                )
        )
</pre>
  </div>
  </div> 
 
 
  <br>
  <div>
  <div class="restdescription">
<pre class="detaildescription"><b>REST</b>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;RESPONSE&gt;
    &lt;MULTIPLE&gt;
        &lt;SINGLE&gt;
            &lt;KEY name="id"&gt;
                &lt;VALUE&gt;int&lt;/VALUE&gt;
            &lt;/KEY&gt;
            &lt;KEY name="name"&gt;
                &lt;VALUE&gt;string&lt;/VALUE&gt;
            &lt;/KEY&gt;
        &lt;/SINGLE&gt;
    &lt;/MULTIPLE&gt;
&lt;/RESPONSE&gt;
 
</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>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;EXCEPTION class="invalid_parameter_exception"&gt;
    &lt;MESSAGE&gt;Invalid parameter value detected, execution can not continue.&lt;/MESSAGE&gt;
    &lt;DEBUGINFO&gt;&lt;/DEBUGINFO&gt;
&lt;/EXCEPTION&gt;
</pre>
  </div>
  </div> 
  </span>
     
<br>
<br>
 
           
 
 
                    </div>
 
 
 
== Token Based Access Control ==
 
 
== Simple User Authentication Access Control ==

Latest revision as of 11:35, 23 Haziran 2011