๐ Overview
EcoleDirecte's API is needed for building apps that are useful for parents and students, but it's undocumented, inconsistent, and full of surprises. We've reverse-engineered as much as we can and wrote it all down so you don't have to.
These docs cover API version 8.1.0 (mobile). Found something wrong? Contribute on GitHub!
๐งญ Pick your account typeโ
The documentation is split by account type. Each part has its own sidebar and only lists what that account can call.
| Part | Account | Host |
|---|---|---|
| ๐ Student | Student accounts (typeCompte E). | api |
| ๐ช Family | Family accounts: guardian (1) and spouse (2). | api |
| ๐งโ๐ซ Teacher | Teacher accounts (typeCompte P). | apip |
| ๐๏ธ Staff | School staff accounts (typeCompte A): administration, school life, management. | apip |
| ๐ญ Tutor | Company tutors of apprentices and interns (typeCompte T). | api |
Shared by everyone, in this part: login and two-factor, account types, push and settings, and the data objects, modules, path segments, enumerations, error codes and WebSocket references.
Which account types can call an endpoint comes from the app: screens guarded by account type are confirmed by the app's routing, the rest is inferred from what the screen does. static/endpoints.json records the evidence of each endpoint.
๐ Base URLโ
Student, parent and tutor endpoints: https://api.ecoledirecte.com/v3. Teacher and staff accounts use https://apip.ecoledirecte.com/v3 once logged in (the login itself always goes to api). Every endpoint in these docs is relative to that base. A few newer features (TOTP) use /restv3/ws: JSON in, JSON out, real HTTP methods, no envelope.
โซ Versionโ
Add ?v=8.1.0 to every endpoint.
โ๏ธ Request formatโ
application/x-www-form-urlencoded, with the JSON payload in a data parameter. Endpoints end with .awp and most take a verbe query (get, post, put, delete) that says what the call really does: the HTTP method is always POST.
POST /connexion/doubleauth.awp?verbe=get&v=8.1.0
data={}
โฉ๏ธ Response formatโ
Always HTTP 200 if the request itself got through. The real status is the body's code and the X-Code response header (an invalid token is HTTP 200 with code 520).
{
"host": "HTTP100", // Server that handled the request
"code": 200, // Actual status code
"token": "token", // Your token
"message": "", // Error description (empty on success)
"data": {} // The good stuff
}
๐ฅ๏ธ User-agentโ
Every request needs a User-Agent, and it must stay the same for the lifetime of a token.
MyApp/1.0 (iPhone; CPU OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Mobile/15E148 EDMOBILE v8.1.0
๐ช Tokenโ
Login gives you a token valid for about 58 minutes. Send it as X-Token on every request after that, and replace it with the X-Token of any response that has one.
๐ Conventionsโ
Responses are annotated JSON: // comment on the fields that need one, optional on fields that may be missing, โ Name for an object described in Data objects. Field paths are relative to data. A line in italics under a request lists the account types that can call it when it is not all of them: student E, family 1ยท2, staff A, teacher P, tutor T, workspace W. Endpoints marked โ ๏ธ exist in the app's code but are not called by the mobile app. All endpoints are also in endpoints.json.