api-v3: First draft
[src/app-framework-binder.git] / src / devtools / monitor-api.json
index 8361d57..ca4a9b3 100644 (file)
           "tag": { "type": "string", "description": "tag for grouping traces", "default": "trace" },
           "api": { "type": "string", "description": "api for requests, daemons and services" },
           "verb": { "type": "string", "description": "verb for requests" },
-          "session": { "type": "string", "description": "session for requests" },
+          "uuid": { "type": "string", "description": "uuid of session for requests" },
           "pattern": { "type": "string", "description": "pattern for events" },
           "request": { "$ref": "#/components/schemas/trace-add-request" },
           "daemon": { "$ref": "#/components/schemas/trace-add-daemon" },
           "service": { "$ref": "#/components/schemas/trace-add-service" },
           "event": { "$ref": "#/components/schemas/trace-add-event" },
+          "session": { "$ref": "#/components/schemas/trace-add-session" },
           "for": { "$ref": "#/components/schemas/trace-add" }
         },
         "examples": [
           "end",
           "event",
           "extra",
-          "fail",
           "get",
           "json",
           "life",
           "ref",
+         "reply",
           "result",
           "session",
           "session_close",
           "subcallsync",
           "subcallsync_result",
           "subscribe",
-          "success",
           "unref",
           "unstore",
           "unsubscribe",
           "push_before"
         ]
       },
+      "trace-add-session": {
+        "anyOf": [
+          { "type": "array", "items": { "$ref": "#/components/schemas/trace-session-names" } },
+          { "$ref": "#/components/schemas/trace-session-names" }
+        ]
+      },
+      "trace-session-names": {
+        "title": "name of traceable items for sessions",
+        "enum": [
+          "*",
+          "addref",
+          "all",
+          "close",
+          "common",
+          "create",
+          "destroy",
+          "renew",
+          "unref"
+        ]
+      },
       "trace-drop": {
         "anyOf": [
           { "type": "boolean" },
             "properties": {
               "event": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] },
               "tag": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] },
-              "session": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] }
+              "uuid": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] }
             }
           }
         ]
       }
-    },
-    "x-permissions": {
-        "trace": {
-          "permission": "urn:AGL:permission:monitor:public:trace"
-        },
-        "set": {
-          "permission": "urn:AGL:permission:monitor:public:set"
-        },
-        "get": {
-          "permission": "urn:AGL:permission:monitor:public:get"
-        },
-        "get-or-set": {
-          "anyOf": [
-            { "$ref": "#/components/x-permissions/get" },
-            { "$ref": "#/components/x-permissions/set" }
-          ]
-        }
     }
   },
   "paths": {
     "/get": {
       "description": "Get monitoring data.",
+      "x-permissions": { "session": "check" },
       "get": {
-        "x-permissions": {
-          "$ref": "#/components/x-permissions/get-or-set"
-        },
         "parameters": [
           {
             "in": "query",
     },
     "/set": {
       "description": "Set monitoring actions.",
+      "x-permissions": { "session": "check" },
       "get": {
-        "x-permissions": {
-          "$ref": "#/components/x-permissions/set"
-        },
         "parameters": [
           {
             "in": "query",
     },
     "/trace": {
       "description": "Set monitoring actions.",
+      "x-permissions": { "session": "check" },
       "get": {
-        "x-permissions": {
-          "$ref": "#/components/x-permissions/trace"
-        },
         "parameters": [
           {
             "in": "query",
           }
         }
       }
+    },
+    "/session": {
+      "description": "describes the session.",
+      "x-permissions": { "session": "check" },
+      "get": {
+        "parameters": [
+          {
+            "in": "query",
+            "name": "refresh-token",
+            "required": false,
+            "schema": { "type": "boolean" }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "A complex object array response",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/afb-reply"
+                }
+              }
+            }
+          }
+        }
+      }
     }
   }
 }