Fedora 30 packaging fix issu
[src/app-framework-binder.git] / src / devtools / monitor-api.json
1 {
2   "openapi": "3.0.0",
3   "info": {
4     "description": "monitoring of bindings and internals",
5     "title": "monitor",
6     "version": "1.0",
7     "x-binding-c-generator": {
8       "api": "monitor",
9       "version": 2,
10       "prefix": "f_",
11       "postfix": "",
12       "preinit": null,
13       "init": null,
14       "onevent": null,
15       "scope": "static",
16       "private": true
17     }
18   },
19   "servers": [
20     {
21       "url": "ws://{host}:{port}/api/monitor",
22       "description": "The API server.",
23       "variables": {
24         "host": {
25           "default": "localhost"
26         },
27         "port": {
28           "default": "1234"
29         }
30       },
31       "x-afb-events": [
32         {
33           "$ref": "#/components/schemas/afb-event"
34         }
35       ]
36     }
37   ],
38   "components": {
39     "schemas": {
40       "afb-reply": {
41         "$ref": "#/components/schemas/afb-reply-v1"
42       },
43       "afb-event": {
44         "$ref": "#/components/schemas/afb-event-v1"
45       },
46       "afb-reply-v1": {
47         "title": "Generic response.",
48         "type": "object",
49         "required": [ "jtype", "request" ],
50         "properties": {
51           "jtype": {
52             "type": "string",
53             "const": "afb-reply"
54           },
55           "request": {
56             "type": "object",
57             "required": [ "status" ],
58             "properties": {
59               "status": { "type": "string" },
60               "info": { "type": "string" },
61               "token": { "type": "string" },
62               "uuid": { "type": "string" },
63               "reqid": { "type": "string" }
64             }
65           },
66           "response": { "type": "object" }
67         }
68       },
69       "afb-event-v1": {
70         "type": "object",
71         "required": [ "jtype", "event" ],
72         "properties": {
73           "jtype": {
74             "type": "string",
75             "const": "afb-event"
76           },
77           "event": { "type": "string" },
78           "data": { "type": "object" }
79         }
80       },
81       "set-verbosity": {
82         "anyOf": [
83           { "$ref": "#/components/schemas/verbosity-map" },
84           { "$ref": "#/components/schemas/verbosity-level" }
85         ]
86       },
87       "get-request": {
88         "type": "object",
89         "properties": {
90           "verbosity": { "$ref": "#/components/schemas/get-verbosity" },
91           "apis": { "$ref": "#/components/schemas/get-apis" }
92         }
93       },
94       "get-response": {
95         "type": "object",
96         "properties": {
97           "verbosity": { "$ref": "#/components/schemas/verbosity-map" },
98           "apis": { "type": "object" }
99         }
100       },
101       "get-verbosity": {
102         "anyOf": [
103           { "type": "boolean" },
104           { "type": "array", "items": { "type": "string" } },
105           { "type": "object" }
106         ]
107       },
108       "get-apis": {
109         "anyOf": [
110           { "type": "boolean" },
111           { "type": "array", "items": { "type": "string" } },
112           { "type": "object" }
113         ]
114       },
115       "verbosity-map": {
116         "type": "object",
117         "patternProperties": { "^.*$": { "$ref": "#/components/schemas/verbosity-level" } }
118       },
119       "verbosity-level": {
120         "enum": [ "debug", 3, "info", 2, "notice", "warning", 1, "error", 0 ]
121       },
122       "trace-add": {
123         "anyOf": [
124           { "type": "array", "items": { "$ref": "#/components/schemas/trace-add-object" } },
125           { "$ref": "#/components/schemas/trace-add-any" }
126         ]
127       },
128       "trace-add-any": {
129         "anyOf": [
130           { "$ref": "#/components/schemas/trace-add-request" },
131           { "$ref": "#/components/schemas/trace-add-object" }
132         ]
133       },
134       "trace-add-object": {
135         "type": "object",
136         "properties": {
137           "name": { "type": "string", "description": "name of the generated event", "default": "trace" },
138           "tag": { "type": "string", "description": "tag for grouping traces", "default": "trace" },
139           "api": { "type": "string", "description": "api for requests, daemons and services" },
140           "verb": { "type": "string", "description": "verb for requests" },
141           "uuid": { "type": "string", "description": "uuid of session for requests" },
142           "pattern": { "type": "string", "description": "pattern for events" },
143           "request": { "$ref": "#/components/schemas/trace-add-request" },
144           "daemon": { "$ref": "#/components/schemas/trace-add-daemon" },
145           "service": { "$ref": "#/components/schemas/trace-add-service" },
146           "event": { "$ref": "#/components/schemas/trace-add-event" },
147           "session": { "$ref": "#/components/schemas/trace-add-session" },
148           "for": { "$ref": "#/components/schemas/trace-add" }
149         },
150         "examples": [
151           { "tag": "1", "for": [ "common", { "api": "xxx", "request": "*", "daemon": "*", "service": "*" } ] }
152         ]
153       },
154       "trace-add-request": {
155         "anyOf": [
156           { "type": "array", "items": { "$ref": "#/components/schemas/trace-request-names" } },
157           { "$ref": "#/components/schemas/trace-request-names" }
158         ]
159       },
160       "trace-request-names": {
161         "title": "name of traceable items of requests",
162         "enum": [
163           "*",
164           "addref",
165           "all",
166           "args",
167           "begin",
168           "common",
169           "context",
170           "context_get",
171           "context_set",
172           "end",
173           "event",
174           "extra",
175           "get",
176           "json",
177           "life",
178           "ref",
179           "reply",
180           "result",
181           "session",
182           "session_close",
183           "session_set_LOA",
184           "simple",
185           "store",
186           "stores",
187           "subcall",
188           "subcall_result",
189           "subcalls",
190           "subcallsync",
191           "subcallsync_result",
192           "subscribe",
193           "unref",
194           "unstore",
195           "unsubscribe",
196           "vverbose"
197         ]
198       },
199       "trace-add-daemon": {
200         "anyOf": [
201           { "type": "array", "items": { "$ref": "#/components/schemas/trace-daemon-names" } },
202           { "$ref": "#/components/schemas/trace-daemon-names" }
203         ]
204       },
205       "trace-daemon-names": {
206         "title": "name of traceable items of daemons",
207         "enum": [
208           "*",
209           "all",
210           "common",
211           "event_broadcast_after",
212           "event_broadcast_before",
213           "event_make",
214           "extra",
215           "get_event_loop",
216           "get_system_bus",
217           "get_user_bus",
218           "queue_job",
219           "require_api",
220           "require_api_result",
221           "rootdir_get_fd",
222           "rootdir_open_locale",
223           "unstore_req",
224           "vverbose"
225         ]
226       },
227       "trace-add-service": {
228         "anyOf": [
229           { "type": "array", "items": { "$ref": "#/components/schemas/trace-service-names" } },
230           { "$ref": "#/components/schemas/trace-service-names" }
231         ]
232       },
233       "trace-service-names": {
234         "title": "name of traceable items of services",
235         "enum": [
236           "*",
237           "all",
238           "call",
239           "call_result",
240           "callsync",
241           "callsync_result",
242           "on_event_after",
243           "on_event_before",
244           "start_after",
245           "start_before"
246         ]
247       },
248       "trace-add-event": {
249         "anyOf": [
250           { "type": "array", "items": { "$ref": "#/components/schemas/trace-event-names" } },
251           { "$ref": "#/components/schemas/trace-event-names" }
252         ]
253       },
254       "trace-event-names": {
255         "title": "name of traceable items of events",
256         "enum": [
257           "*",
258           "all",
259           "broadcast_after",
260           "broadcast_before",
261           "common",
262           "create",
263           "drop",
264           "extra",
265           "name",
266           "push_after",
267           "push_before"
268         ]
269       },
270       "trace-add-session": {
271         "anyOf": [
272           { "type": "array", "items": { "$ref": "#/components/schemas/trace-session-names" } },
273           { "$ref": "#/components/schemas/trace-session-names" }
274         ]
275       },
276       "trace-session-names": {
277         "title": "name of traceable items for sessions",
278         "enum": [
279           "*",
280           "addref",
281           "all",
282           "close",
283           "common",
284           "create",
285           "destroy",
286           "renew",
287           "unref"
288         ]
289       },
290       "trace-drop": {
291         "anyOf": [
292           { "type": "boolean" },
293           {
294             "type": "object",
295             "properties": {
296               "event": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] },
297               "tag": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] },
298               "uuid": { "anyOf": [  { "type": "string" }, { "type": "array", "items": "string" } ] }
299             }
300           }
301         ]
302       }
303     }
304   },
305   "paths": {
306     "/get": {
307       "description": "Get monitoring data.",
308       "x-permissions": { "session": "check" },
309       "get": {
310         "parameters": [
311           {
312             "in": "query",
313             "name": "verbosity",
314             "required": false,
315             "schema": { "$ref": "#/components/schemas/get-verbosity" }
316           },
317           {
318             "in": "query",
319             "name": "apis",
320             "required": false,
321             "schema": { "$ref": "#/components/schemas/get-apis" }
322           }
323         ],
324         "responses": {
325           "200": {
326             "description": "A complex object array response",
327             "content": {
328               "application/json": {
329                 "schema": {
330                   "$ref": "#/components/schemas/afb-reply"
331                 }
332               }
333             }
334           }
335         }
336       }
337     },
338     "/set": {
339       "description": "Set monitoring actions.",
340       "x-permissions": { "session": "check" },
341       "get": {
342         "parameters": [
343           {
344             "in": "query",
345             "name": "verbosity",
346             "required": false,
347             "schema": { "$ref": "#/components/schemas/set-verbosity" }
348           }
349         ],
350         "responses": {
351           "200": {
352             "description": "A complex object array response",
353             "content": {
354               "application/json": {
355                 "schema": {
356                   "$ref": "#/components/schemas/afb-reply"
357                 }
358               }
359             }
360           }
361         }
362       }
363     },
364     "/trace": {
365       "description": "Set monitoring actions.",
366       "x-permissions": { "session": "check" },
367       "get": {
368         "parameters": [
369           {
370             "in": "query",
371             "name": "add",
372             "required": false,
373             "schema": { "$ref": "#/components/schemas/trace-add" }
374           },
375           {
376             "in": "query",
377             "name": "drop",
378             "required": false,
379             "schema": { "$ref": "#/components/schemas/trace-drop" }
380           }
381         ],
382         "responses": {
383           "200": {
384             "description": "A complex object array response",
385             "content": {
386               "application/json": {
387                 "schema": {
388                   "$ref": "#/components/schemas/afb-reply"
389                 }
390               }
391             }
392           }
393         }
394       }
395     },
396     "/session": {
397       "description": "describes the session.",
398       "x-permissions": { "session": "check" },
399       "get": {
400         "parameters": [
401           {
402             "in": "query",
403             "name": "refresh-token",
404             "required": false,
405             "schema": { "type": "boolean" }
406           }
407         ],
408         "responses": {
409           "200": {
410             "description": "A complex object array response",
411             "content": {
412               "application/json": {
413                 "schema": {
414                   "$ref": "#/components/schemas/afb-reply"
415                 }
416               }
417             }
418           }
419         }
420       }
421     }
422   }
423 }