# 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` 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 * Sessions list: `/sessions` * Session: `/sessions/` * **TODO**: Session key: `/sessions//` * Delete session: `DELETE /sessions/` * Filters: * All connected users which username start by a letter: `/sessions?_whatToTrace=*&groupBy=_whatToTrace` * User's sessions: `/sessions?_whatToTrace=foo.bar` * IP's sessions: `/sessions?ip=1.2.3.4` * Double sessions by IP: `/sessions?doubleIP` * Group by: * First letter of Connected users: `/sessions?groupBy=substr(_whatToTrace,1)` * Order: * Sessions sorted by user: `/sessions?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/`