-
Notifications
You must be signed in to change notification settings - Fork 487
webservices
There are different types of web services in Chamilo 1.11 (and 2.0), and they are not necessarily all well documented or very logically distributed, so here is an attempt at documenting them as well as possible.
By default, web services available for 1.11.x versions and earlier should also work in version 2.0 and later, but their distribution might change a little.
First, let's have a small type of FAQ to get you in the right direction...
Chamilo web services can be found in the main/webservices/ directory.
Because of our long history and variety of integrations, we support a few XML-RPC services (and let's not talk about these if you don't need them, as they are written in Python), but most are either SOAP or REST.
This depends on the type of web service:
SOAP web services use a weird type of shared secret key + IP address in a hash. Typically, from the client side, you would take the $_configuration['security_key']
parameter from your configuration.php file, then call https://chamilo-host/main/webservices/testip.php to get your IP as the server sees it ($ip), and then build the final "secret_key" parameter as this formula: $secretKey = sha1($ip.$_configuration['security_key']). The server will then check that this matches the IP and security key it has. If not, the web service call will fail.
For the REST web services, the authentication is a bit more streamlined. You send a parameter (in POST, GET, or COOKIE) called "hash". This hash usually contain an array of the following elements:
- action
- username
- api_key
- course (optional)
- session (optional)
If you don't have an API key (which is specific to the username), don't worry, you can also use the user's password to call the "authenticate" web service, that will return an API key for you to use in subsequent web service calls (as "api_key" parameter).
- For REST web services, check REST Web Services
- For SOAP web services (older API but offers more data reading options), check SOAP Web Services
- For Chamilo 2.0, new web services are available in the form of Web Services API v3
-
Home
- Tools and sessions
- Quiz: Importing
- Releases
- Community support strategy
- Translation management
- How to report issues
- Development
- Integration