+ afb_apiset_update_hooks(target_set, NULL);
+ afb_evt_update_hooks();
+ return;
+}
+#else
+static void f_trace(afb_req_t req)
+{
+ afb_req_reply(req, NULL, afb_error_text_not_available, NULL);
+}
+#endif
+
+static void f_session(afb_req_t req)
+{
+ struct json_object *r = NULL;
+ struct afb_xreq *xreq = xreq_from_req_x2(req);
+
+ /* check right to call it */
+ if (xreq->context.super) {
+ afb_req_fail(req, "invalid", "reserved to direct clients");
+ return;
+ }
+
+ /* make the result */
+ wrap_json_pack(&r, "{s:s,s:i,s:i}",
+ "uuid", afb_session_uuid(xreq->context.session),
+ "timeout", afb_session_timeout(xreq->context.session),
+ "remain", afb_session_what_remains(xreq->context.session));
+ afb_req_success(req, r, NULL);