# Lemonldap::NG::Manager REST API ## Configurations * List of available configuration: `/confs` * Last configuration number: `/confs/latest/cfgNum` * Configuration metadatas: `/confs/` * Key value: `/confs//` * Full configuration (for saving): `/confs/?full` * Diff between 2 configurations: `/diff//` Examples: * `/confs/latest/portal` * `/confs/184/portal` * `/confs/184/virtualHosts/test1.example.com/locationRules` ### Available verbs: * `GET`: see above * `POST /confs`: push a new configuration (or a saved one) `POST /confs?force=yes`: push a new configuration even if another has been posted before * _`DELETE /confs/`: not allowed_, administrator has to push an older with `?force=yes` **And perhaps:** * `PUT /confs/prepared/`: modify a value in the future configuration * `DELETE /confs/prepared//`: delete a hash entry (virtual host for example) * `GET /confs/prepared/`: get value from prepared configuration if exists, get current value otherwise ## Sessions Note that global can be replaced by persistent to list persistent sessions. * Sessions list: `/sessions/global` * Session: `/sessions/global/` * **TODO**: Session key: `/sessions/global//` * Delete session: `DELETE /sessions/global/` * Filters: * All connected users which username start by a letter: `/sessions/global?_whatToTrace=*&groupBy=_whatToTrace` * User's sessions: `/sessions/global?_whatToTrace=foo.bar` * IP's sessions: `/sessions/global?ip=1.2.3.4` * Double sessions by IP: `/sessions/global?doubleIP` * Group by: * First letter of Connected users: `/sessions/global?groupBy=substr(_whatToTrace,1)` * Order: * Sessions sorted by user: `/sessions/global?orderBy=_whatToTrace` Note that sessions are grouped automaticaly. ## Notifications * Notifications list: `/notifications/actives` * Notification: `/notifications/actives/` * Notified elements list: `/notifications/done` * Notified element: `/notifications/done/` * New session: `POST /notifications` * Filters: * All notifications for users which name starts by a letter: `/notifications?_whatToTrace=*&groupBy=_whatToTrace` * User's notifications: `/notifications/(actives|done)?_whatToTrace=foo.bar` * Mark as notified: `PUT /notifications/actives/ done=1` * Delete notofication: `DELETE /notifications/done/`