VILLAScontroller API (0.0.1)
Download OpenAPI specification:Download
Steffen Vogel: svogel2@eonerc.rwth-aachen.de License: Apache-2.0
A HTTP/REST API for controlling VILLAScontroller remotely for querying component status as well as issuing control actions.
Response samples
- 200
Content type
application/json
{- "components": [
- "f4751894-205e-11eb-aefb-0741ff98abca",
- "3ddd318e-fee1-46d7-bff4-7c064d640d4e"
], - "status": {
- "version": "0.3.2",
- "uptime": 15.38102650642395,
- "host": "lat.0l.de",
- "kernel": {
- "sysname": "Linux",
- "nodename": "lat.0l.de",
- "release": "5.13.14-200.fc34.x86_64",
- "version": "#1 SMP Fri Sep 3 15:33:01 UTC 2021",
- "machine": "x86_64"
}
}
}
Response samples
- 200
Content type
application/json
{- "components": [ ],
- "status": {
- "state": "idle",
- "version": "0.3.2",
- "uptime": 480.25064611434937,
- "host": "lat.0l.de",
- "kernel": {
- "sysname": "Linux",
- "nodename": "lat.0l.de",
- "release": "5.13.14-200.fc34.x86_64",
- "version": "#1 SMP Fri Sep 3 15:33:01 UTC 2021",
- "machine": "x86_64"
}, - "managed_by": "f4751894-205e-11eb-aefb-0741ff98abca"
}, - "properties": {
- "category": "manager",
- "type": "generic",
- "name": "Standard Controller",
- "realm": "de.rwth-aachen.eonerc.acs",
- "uuid": "f4751894-205e-11eb-aefb-0741ff98abca"
}, - "schema": {
- "create": {
- "type": "object",
- "default": { },
- "required": [
- "name",
- "category",
- "location",
- "owner",
- "realm",
- "type",
- "api_url",
- "ws_url"
], - "properties": {
- "name": {
- "type": "string",
- "title": "Component name",
- "default": "New Component",
- "examples": "Generic Simulator #1"
}, - "owner": {
- "type": "string",
- "title": "Component owner",
- "examples": [
- "rmr",
- "svg"
]
}, - "realm": {
- "type": "string",
- "title": "Component realm",
- "default": "",
- "examples": [
- "de.rwth-aachen.eonerc.acs"
]
}, - "category": {
- "type": "string",
- "title": "Component category",
- "examples": [
- "simulator"
]
}, - "location": {
- "type": "string",
- "title": "Component location",
- "examples": [
- "Richard's PC"
]
}, - "type": {
- "type": "string",
- "default": "generic"
}, - "uuid": {
- "type": "string",
- "format": "uuid"
}, - "ws_url": {
- "type": "string",
}, - "api_url": {
- "type": "string",
}, - "shell": {
- "type": "boolean",
- "default": false,
- "examples": [
- true
]
}, - "whitelist": {
- "type": "array",
- "title": "The whitelist schema",
- "default": [ ],
- "examples": [
- [
- "/sbin/ping",
- "^echo"
]
], - "additionalItems": true,
- "items": {
- "anyOf": [
- {
- "type": "string",
- "examples": [
- "/sbin/ping",
- "^echo"
]
}
]
}
}
}
}
}
}
Send a control action to the component
Request Body schema: application/json
action | string Enum: "start" "stop" "pause" "resume" "create" "delete" "shutdown" "reset" |
create (object) or create-2 (object) or start (object) or start-2 (object) |
Responses
Request samples
- Payload
Content type
application/json
{- "action": "start",
- "parameters": {
- "category": "simulator",
- "location": "Richard's PC",
- "name": "Generic Simulator #1",
- "owner": "rmr",
- "realm": "de.rwth-aachen.eonerc.acs",
- "shell": true,
- "type": "generic",
- "uuid": null,
- "whitelist": [
- "/sbin/ping",
- "^echo"
],
}
}