Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Web services: Difference between revisions

From MoodleDocs
Line 54: Line 54:
     name OR
     name OR
     shortname  OR
     shortname  OR
     idnumber  
     idnumber OR
    id


OPERATION:
OPERATION:
     Deletes a course from the course table
     Deletes a course from the course table
   


OUTPUT:
OUTPUT:
     true or false
     true or false

Revision as of 10:14, 13 November 2007

This page is to decide on a STANDARD list of CORE web service functions that we should support in Moodle (by XMLRPC, REST and SOAP) as an API for those writing code to work against Moodle.

Please add new functions if there's functionality you want that isn't covered (we can refactor/whittle at the end).

add user

I think we should require all data needed for a successful "first login" to Moodle without popping him out the profile page to fill in all missing required data. This may require extra inputs such as city, description ... (unsure of the full list depending of Moodle version ?). Also password should be "required" if authentication method is "internal" .

INPUT:

   firstname
   lastname
   email 
   idnumber
   login 
   authentication method (optional , default= manual ?)


OPERATION:

   Adds a new user to the user database 

OUTPUT:

   id or false

delete user

INPUT:

   idnumber  or 
   email or 
   id or
   login

OPERATION:

   User is marked as deleted
   All it's role assignments are destroyed 

OUTPUT:

   true/false

add course

INPUT:

   name
   shortname
   format (default topics)
   idnumber 

OPERATION:

   Adds a new course to the course table

OUTPUT:

   id or false


delete course

INPUT:

   name OR
   shortname  OR
   idnumber OR
   id

OPERATION:

   Deletes a course from the course table
   

OUTPUT:

   true or false