L'intra d'Epitech (intra.epitech.eu
) possède une API assez vaste mais malheureusement non documentée.
J'ai regroupé ici un certains nombres d'urls concernant cette API.
- POST /
- &login=login_x (obligatoire)
- &password=password_unix (obligatoire)
- &remember_me=on (optionnel)
-
GET /
-
GET /user/notification/coming
-
GET /user/notification/message
-
GET /user/notification/alert
-
GET /user/
LOGIN_X
-
GET /user/
LOGIN_X
/notes -
GET /user/
LOGIN_X
/netsoul
Le forum fonctionne avec un système de nodes
.
On est d'abord situé à /
. Si on consulte la catégorie Bocal
, on se retrouve dans /bocal
.
-
GET /forum/node/list
-
&nodes[]=path_node (obligatoire). Le path correspond au path de la catégorie dans laquelle on se situe (exemple: /bocal ou /Administration)
-
GET /forum/index/get
-
GET /forum/index/dashboard
-
GET /forum/thread/list
-
&node=path_node (obligatoire)
-
GET /forum/post/list
-
&thread=path_du_thread (si mon thread s'appelle
Salut
et qu'il se trouve dans la catégorieBocal
, path_du_thread sera/bocal/salut
. Le nom du thread s'obtient via le listing des threads).
la documentation est elle toujours à jour ? quand je post pour me connecter
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data "login=[email protected]&password=pass&remember_me=on" https://intra.epitech.eu
il me return HTTP/1.1 401 Unauthorized
Server: nginx/1.8.0
Date: Tue, 10 Jan 2017 16:23:22 GMT
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Set-Cookie: PHPSESSID=acvirg5b5645qcc6nlda5dts01; path=/; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
{
"ip": "163.5.101.86",
"board": [],
"message": "Veuillez vous connecter",
"office_auth_uri": "https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=e05d4149-1624-4627-a5ba-7472a39e43ab&redirect_uri=https%3A%2F%2Fintra.epitech.eu%2Fauth%2Foffice365&state=%2F"
}