-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtaskmanager.v1.2.0.openapi.json
336 lines (336 loc) · 12.8 KB
/
taskmanager.v1.2.0.openapi.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
{
"openapi" : "3.0.2",
"info" : {
"contact" : {
"email" : "[email protected]",
"name" : "Bosch Rexroth Support",
"url" : "https://www.boschrexroth.com"
},
"description" : "API description to manage system tasks on ctrlX OS devices",
"title" : "ctrlX OS Task Manager",
"version" : "1.2.0"
},
"servers" : [ {
"description" : "Use this, if this page and the api are on the same server",
"url" : "/task-manager/api/v1"
}, {
"url" : "{protocol}://{host}/task-manager/api/v1",
"variables" : {
"protocol" : {
"default" : "https",
"description" : "Protocol to access the host (http or https)",
"enum" : [ "https", "http" ]
},
"host" : {
"default" : "localhost:443",
"description" : "Hostname (or IP) and port of the Service"
}
}
} ],
"tags" : [ {
"description" : "Group all snaps and processes related information",
"name" : "processes"
} ],
"paths" : {
"/processes" : {
"get" : {
"description" : "Returns list of snaps and its threads",
"operationId" : "getProcesses",
"parameters" : [ {
"description" : "If the withThreads parameter is set to true, the response will include processes and threads. If it is set to false, the response will contain only processes and no threads.",
"explode" : true,
"in" : "query",
"name" : "withThreads",
"required" : false,
"schema" : {
"default" : true,
"type" : "boolean"
},
"style" : "form"
} ],
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Processes"
}
}
},
"description" : "list of all process and threads"
},
"401" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"403" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"500" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
}
},
"summary" : "Get list of snaps and their related threads",
"tags" : [ "processes" ]
}
}
},
"components" : {
"parameters" : {
"withThreads" : {
"description" : "If the withThreads parameter is set to true, the response will include processes and threads. If it is set to false, the response will contain only processes and no threads.",
"explode" : true,
"in" : "query",
"name" : "withThreads",
"required" : false,
"schema" : {
"default" : true,
"type" : "boolean"
},
"style" : "form"
}
},
"responses" : {
"Unauthorized" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"Forbidden" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"InternalServerError" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
}
},
"schemas" : {
"Processes" : {
"description" : "list of the processes of the system",
"example" : {
"processes" : [ {
"cpuUsage" : 5.4,
"memoryUsage" : 5242,
"appName" : "Device Admin",
"name" : "control",
"isThread" : true,
"pid" : 4100,
"state" : "running",
"priority" : 20,
"lastUsedCpuCore" : 1,
"ppid" : 2373
}, {
"cpuUsage" : 5.4,
"memoryUsage" : 5242,
"appName" : "Device Admin",
"name" : "control",
"isThread" : true,
"pid" : 4100,
"state" : "running",
"priority" : 20,
"lastUsedCpuCore" : 1,
"ppid" : 2373
} ]
},
"properties" : {
"processes" : {
"items" : {
"$ref" : "#/components/schemas/Process"
},
"type" : "array"
}
},
"type" : "object"
},
"Process" : {
"description" : "describes process, it's cpu usage and memory usage",
"example" : {
"cpuUsage" : 5.4,
"memoryUsage" : 5242,
"appName" : "Device Admin",
"name" : "control",
"isThread" : true,
"pid" : 4100,
"state" : "running",
"priority" : 20,
"lastUsedCpuCore" : 1,
"ppid" : 2373
},
"properties" : {
"name" : {
"description" : "the name of the process or thread based on the executable name or the thread name",
"example" : "control",
"type" : "string"
},
"pid" : {
"description" : "the process id assigned by the system",
"example" : 4100,
"type" : "integer"
},
"ppid" : {
"description" : "the parent process id (ppid). A ppid 1 means, that the process was initiated by the init process, all processes can be traced down to this process. The kernel has a pid of 0.",
"example" : 2373,
"type" : "integer"
},
"memoryUsage" : {
"description" : "memory usage of the process in bytes. For threads the memory usage is the usage of the overall process, not the usage of a single thread.",
"example" : 5242,
"format" : "int64",
"type" : "integer"
},
"cpuUsage" : {
"description" : "cpu usage of the process or thread in percentage",
"example" : 5.4,
"type" : "number"
},
"appName" : {
"description" : "The name of the app that has spawn the process or thread.",
"example" : "Device Admin",
"type" : "string"
},
"priority" : {
"description" : "Priority of the process or thread. rt for real time processes or threads.",
"example" : 20,
"type" : "integer"
},
"state" : {
"description" : "Current state of the process or thread",
"enum" : [ "running", "uninterruptibleSleep", "interruptibleSleep", "stopped", "zombie" ],
"example" : "running",
"type" : "string"
},
"lastUsedCpuCore" : {
"description" : "Last used cpu core of the process or thread",
"example" : 1,
"format" : "int64",
"type" : "integer"
},
"isThread" : {
"description" : "Indicates if the process is a thread. A thread is the smallest unit of execution within a process. Threads share the same resources, such as memory space and file descriptors, with other threads in the same process. On the other hand, a process is an independent program that runs in its own memory space and has its own resources.",
"example" : true,
"type" : "boolean"
}
},
"type" : "object"
},
"Problem" : {
"description" : "This document defines a \"problem detail\" as a way to carry machine-readable details of errors in a HTTP response to avoid the need to define new error response formats for HTTP APIs.\n",
"properties" : {
"type" : {
"default" : "about:blank",
"description" : "A URI reference [RFC3986] that identifies the problem type. \nThis specification encourages that, when dereferenced, \nit provide human-readable documentation for the problem type \n(e.g., using HTML [W3C.REC-html5-20141028]). When this member \nis not present, its value is assumed to be \"about:blank\".\n",
"example" : "https://example.com/probs/out-of-credit",
"format" : "uri",
"type" : "string"
},
"title" : {
"description" : "A short, human-readable summary of the problem type. \nIt SHOULD NOT change from occurrence to occurrence of the problem, \nexcept for purposes of localization (e.g., using proactive content \nnegotiation; see [RFC7231], Section 3.4).\n",
"example" : "You do not have enough credit.",
"type" : "string"
},
"status" : {
"description" : "The HTTP status code ([RFC7231], Section 6) generated by the \norigin server for this occurrence of the problem.\n",
"example" : 403,
"format" : "int32",
"type" : "integer"
},
"detail" : {
"description" : "A human-readable explanation specific to this occurrence of the problem.\n",
"example" : "Your current balance is 30, but that costs 50.",
"type" : "string"
},
"instance" : {
"description" : "A URI reference that identifies the specific occurrence of the problem.\nIt may or may not yield further information if dereferenced.\n",
"example" : "/account/12345/msgs/abc",
"type" : "string"
},
"code" : {
"deprecated" : true,
"description" : "An error code issued by the system that caused the original problem.\nThis code can be used to track down the root cause of the error.\n",
"example" : "F360001",
"type" : "string"
},
"mainDiagnosisCode" : {
"description" : "The main diagnosis code is issued by the system that caused the problem.\nThis code can be used to track down the root cause and source of the error.\nIt can be used to search in the documentation for a solution.\nIt SHOULD NOT change from occurrence to occurrence of the same problem.\n",
"example" : "080F0100",
"type" : "string"
},
"detailedDiagnosisCode" : {
"description" : "The detailed diagnosis code issued by the system that caused the problem.\nThis code can be used to track down the detailed cause and source of the error.\nIt can be used to search in the documentation for a solution.\nThe detailed diagnosis code gives additional information about the cause of the error.\nIt SHOULD NOT change from occurrence to occurrence of the same problem.\n",
"example" : "00666001",
"type" : "string"
},
"dynamicDescription" : {
"description" : "A dynamic description gives detailed information about the occurrence of a problem.\nIt can change between different occurrences of the same error.\n",
"example" : "value = -4.5",
"type" : "string"
},
"severity" : {
"description" : " Severity of a problem as defined RFC5424 of the Syslog standard, see https://tools.ietf.org/html/rfc5424",
"enum" : [ "Emergency", "Alert", "Critical", "Error", "Warning", "Notice", "Informational", "Debug" ],
"example" : "Error",
"type" : "string"
},
"links" : {
"description" : "Collection of links to fix the problem. E.g. links to online user manual,\nto an online community (using tags) or a developer chat (e.g. Slack).\n",
"items" : {
"example" : "https://stackoverflow.com/questions/tagged/boschrexroth+controlx+f360001",
"format" : "uri",
"type" : "string"
},
"type" : "array"
},
"moreInfo" : {
"additionalProperties" : true,
"example" : {
"trace" : "ExampleClass.cpp#452 Null pointer exception",
"class" : "ExampleClass"
},
"type" : "object"
}
},
"required" : [ "title", "type" ],
"type" : "object",
"x-version" : "1.0.0"
}
}
}
}