summaryrefslogtreecommitdiffstats
path: root/afb-source/ctl-apidef.json
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-23 01:00:20 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-23 01:00:20 +0200
commitc74ba24e19a5db52d237628aff012f9fb372f580 (patch)
treec60d2919e1c6941e95931231bf5f75720f9c959d /afb-source/ctl-apidef.json
parentc254a5b100b9ea011dc35b4079ce184e5c842135 (diff)
Restore Basic HTML5 testing Scenario as a Standalone Controller
Diffstat (limited to 'afb-source/ctl-apidef.json')
-rw-r--r--afb-source/ctl-apidef.json228
1 files changed, 228 insertions, 0 deletions
diff --git a/afb-source/ctl-apidef.json b/afb-source/ctl-apidef.json
new file mode 100644
index 0000000..e2207d0
--- /dev/null
+++ b/afb-source/ctl-apidef.json
@@ -0,0 +1,228 @@
+{
+ "openapi": "3.0.0",
+ "$schema": "http:iot.bzh/download/openapi/schema-3.0/default-schema.json",
+ "info": {
+ "description": "",
+ "title": "controler",
+ "version": "1.0",
+ "x-binding-c-generator": {
+ "api": "control",
+ "version": 2,
+ "prefix": "ctlapi_",
+ "postfix": "",
+ "start": null,
+ "onevent": "DispatchOneEvent",
+ "init": "CtlBindingInit",
+ "scope": "",
+ "private": false
+ }
+ },
+ "servers": [
+ {
+ "url": "ws://{host}:{port}/api/polctl",
+ "description": "Unicens2 API.",
+ "variables": {
+ "host": {
+ "default": "localhost"
+ },
+ "port": {
+ "default": "1234"
+ }
+ },
+ "x-afb-events": [
+ {
+ "$ref": "#/components/schemas/afb-event"
+ }
+ ]
+ }
+ ],
+ "components": {
+ "schemas": {
+ "afb-reply": {
+ "$ref": "#/components/schemas/afb-reply-v2"
+ },
+ "afb-event": {
+ "$ref": "#/components/schemas/afb-event-v2"
+ },
+ "afb-reply-v2": {
+ "title": "Generic response.",
+ "type": "object",
+ "required": ["jtype", "request"],
+ "properties": {
+ "jtype": {
+ "type": "string",
+ "const": "afb-reply"
+ },
+ "request": {
+ "type": "object",
+ "required": ["status"],
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "info": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ },
+ "reqid": {
+ "type": "string"
+ }
+ }
+ },
+ "response": {
+ "type": "object"
+ }
+ }
+ },
+ "afb-event-v2": {
+ "type": "object",
+ "required": ["jtype", "event"],
+ "properties": {
+ "jtype": {
+ "type": "string",
+ "const": "afb-event"
+ },
+ "event": {
+ "type": "string"
+ },
+ "data": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-permissions": {
+ "monitor": {
+ "permission": "urn:AGL:permission:audio:public:monitor"
+ },
+ "multimedia": {
+ "permission": "urn:AGL:permission:audio:public:monitor"
+ },
+ "navigation": {
+ "permission": "urn:AGL:permission:audio:public:monitor"
+ },
+ "emergency": {
+ "permission": "urn:AGL:permission:audio:public:emergency"
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "A complex object array response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/afb-reply"
+ }
+ }
+ }
+ }
+ }
+ },
+ "paths": {
+ "/monitor": {
+ "description": "Subcribe Audio Agent Policy Control End",
+ "get": {
+ "x-permissions": {
+ "$ref": "#/components/x-permissions/monitor"
+ },
+ "parameters": [
+ {
+ "in": "query",
+ "name": "event_patern",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/200"
+ }
+ }
+ }
+ },
+ "/dispatch": {
+ "description": "Request Access to Navigation Audio Channel.",
+ "get": {
+ "x-permissions": {
+ "$ref": "#/components/x-permissions/navigation"
+ },
+ "parameters": [
+ {
+ "in": "query",
+ "name": "zone",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/200"
+ }
+ }
+ }
+ },
+ "/request": {
+ "description": "Execute LUA string script.",
+ "get": {
+ "x-permissions": {
+ "$ref": "#/components/x-permissions/navigation"
+ },
+ "parameters": [
+ {
+ "in": "query",
+ "name": "func",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "args",
+ "required": false,
+ "schema": {
+ "type": "array"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/200"
+ }
+ }
+ }
+ },
+ "/debuglua": {
+ "description": "Execute LUA string script.",
+ "get": {
+ "x-permissions": {
+ "$ref": "#/components/x-permissions/navigation"
+ },
+ "parameters": [
+ {
+ "in": "query",
+ "name": "filename",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/components/responses/200"
+ }
+ }
+ }
+ }
+ }
+}