-
Notifications
You must be signed in to change notification settings - Fork 556
Webservices api (latest)
In Chamilo 2.0, we are using API platform as an underlying layer to help us maintain webservices in better order than in previous versions.
To be added
The endpoint now is very easy to get to: simply use your Chamilo portal's URL and add "/api" to the end of the root URL. For example: https://2.chamilo.org/api
If the technical documentation provided on the endpoint (through a web browser) is not enough, at the bottom of that page, you will find links to other formats of documentation or practice links.
Seeing the /api page requires either .env to define APP_ENABLE_API_ENTRYPOINT=true, or alternatively to define APP_ENV='dev' (which has considerable efficiency and security implications - not recommended!).
First you need to get an authentification token using your username and password like this :
curl -X POST --location "https://YOURCHAMILOPLATFORM/api/authentication_token"
-H "Content-Type: application/json"
-d "{ \"username\": \"YOURUSER\", \"password\": \"YOURPASSWORD\" }"
You will get the token in the answer like this :
{"token":"eyJ0eXAiOiJKV1QiLCJ[...]h7MfgKhuAyBUgPLzsoCDMeWNtDyNknM5Hj1_j6gbDqQtfY0AdJJ7FhKzUwdornFGRTfgj_jyoP6MbEU8aBHELe3DjT9NA"}
Then you will be able to call the webservice needed using this token like this : curl -X 'POST' 'https://YOURCHAMILOPLATFORM/api/advanced/create-user-on-access-url' -H 'accept: application/ld+json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ[...]h7MfgKhuAyBUgPLzsoCDMeWNtDyNknM5Hj1_j6gbDqQtfY0AdJJ7FhKzUwdornFGRTfgj_jyoP6MbEU8aBHELe3DjT9NA' -H 'Content-Type: application/ld+json' -d '{ "username": "ana.luna", "firstname": "Ana", "lastname": "Luna", "email": "ana.luna@demo.com", "password": "securepass456", "accessUrlId": 1, "locale": "fr", "timezone": "Europe/Paris", "status": 3 }'
This changelog starts pre-alpha for v2.0, on 2024年01月18日. Any change that affect the API are reported here.
Note: version 3.0.0 of the web services will only be coined on the date of the Chamilo v2.0 stable release, which has not happened yet.
| Date | API version | Description | Commit |
|---|---|---|---|
| 2024年01月18日 | v1.0.0 | Starting point | 173e359b |
Chamilo LMS
-
Home
- Tools and sessions
- Quiz: Importing
- Releases
- Community
- Development
- Getting started
- Development principles
- Technical design decisions
- Coding conventions v1
- Coding conventions v2
- Add a new Chamilo setting
- Database structure
- Date and time management
- Permissions
- Password management
- Session expiry time
- Code annotation types
- Code quality checkers
- Converting legacy SQL
- Settings migration v1 → v2
- Configurations
- Secure development policy
- Plugin development
- Adding page types
- Design
- Integration