From f80e8747c51a8e2de644c88404b1a0c05c70d680 Mon Sep 17 00:00:00 2001 From: Laurent Velez <laurent.velez@etsi.org> Date: Tue, 27 Jul 2021 16:12:55 +0200 Subject: [PATCH] added Container --- OpenAPI/openapi-Container.json | 330 +++++++++++++++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 OpenAPI/openapi-Container.json diff --git a/OpenAPI/openapi-Container.json b/OpenAPI/openapi-Container.json new file mode 100644 index 0000000..f9817d0 --- /dev/null +++ b/OpenAPI/openapi-Container.json @@ -0,0 +1,330 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Container", + "description": "API for Container resource management", + "version": "0.1" + }, + "servers": [{ + "url": "http://cse-address:8080/aename" + }], + "paths": { + + "/csename": { + "post": { + "description": "Create Container Resource", + "parameters": [{ + "name": "X-M2M-Origin", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "CAdmin" + }, + { + "name": "X-M2M-RVI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "3" + }, + { + "name": "X-M2M-RI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "1234" + } + ], + "requestBody": { + "content": { + "application/json;ty=3": { + "schema": { + "type": "string" + }, + "examples": { + "0": { + "value": "{\n \"m2m:cnt\" : {\n \"rn\": \"cont_name\",\n }\n}" + } + } + } + } + }, + "responses": { + "201": { + "description": "Create Container Response", + "content": { + "application/json": { + + + + + + + + "examples": { + "with no rcn or rcn=1 in the request": { + "value": "{\n \"m2m:cnt\": {\n \"rn\": \"aename\",\n \"api\": \"N01.com.company.aename \",\n \"lbl\": [\"key1\", \"key2\"],\n \"rr\": true,\n \"srv\": [\"3\"],\n \"poa\": [\"http://cse-address:8080\"],\n \"ri\": \"CAdmin\",\n \"ct\": \"20210330T153934,791690\",\n \"lt\": \"20210330T153934,791690\",\n \"et\": \"20220330T153934,791714\",\n \"pi\": \"cse-id\",\n \"ty\": 2,\n \"aei\": \"CAdmin\"\n }\n}" + }, + "rcn=0 in the request": { + "value": " " + }, + "rcn=2 in the request": { + "value": "{\n \"m2m:ae\": \"csename/aename\"\n \n}" + }, + "rcn=3 in the request": { + "value": "{\n \"m2m:rce\": {\n \"ae\": {\n \"rn\": \"aename\",\n \"api\": \"N01.com.company.aename \",\n \"lbl\": [\"key1\", \"key2\"],\n \"rr\": true,\n \"srv\": [\"3\"],\n \"poa\": [\"http://cse-address:8080\"],\n \"ri\": \"CAdmin\",\n \"ct\": \"20210406T171115,934044\",\n \"lt\": \"20210406T171115,934044\",\n \"et\": \"20220406T171115,934064\",\n \"pi\": \"cse-id\",\n \"ty\": 2,\n \"aei\": \"CAdmin\"\n },\n \"uri\": \"csename/aename\"\n }\n }\n \n}" + }, + "rcn=xxxx in the request": { + "value": " + {\n + \"m2m:cnt\": {\n + \"rn\": \"cont_name1\",\n + \"ri\": \"cnt1857223786922737187\",\n + \"ct\": \"20210727T140023,990745\",\n + \"lt\": \"20210727T140023,990745\",\n + \"et\": \"20220727T140023,990745\",\n + \"pi\": \"Caename\",\n + \"st\": 0,\n + \"ty\": 3,\n + \"cni\": 0,\n + \"cbs\": 0 + }\n + }" + } + + + + } + } + } + } + }, + "servers": [{ + "url": "http://cse-address:8080" + }] + }, + "servers": [{ + "url": "http://cse-address:8080" + }] + }, + + + + "/csename/aename": { + "get": { + "description": "Retrieve AE Resource", + "parameters": [{ + "name": "X-M2M-Origin", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "CAdmin" + }, + { + "name": "X-M2M-RVI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "3" + }, + { + "name": "X-M2M-RI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "1234" + } + ], + "responses": { + "200": { + "description": "Retrieve AE Response", + "content": { + "application/json": { + + "examples": { + "with no rcn or rcn=1 in the request": { + "value": "{\n \"m2m:ae\": {\n \"rn\": \"aename\",\n \"api\": \"N01.com.company.aename \",\n \"lbl\": [\"key1\", \"key2\"],\n \"rr\": true,\n \"srv\": [\"3\"],\n \"poa\": [\"http://cse-address:8080\"],\n \"ri\": \"CAdmin\",\n \"ct\": \"20210330T153934,791690\",\n \"lt\": \"20210330T153934,791690\",\n \"et\": \"20220330T153934,791714\",\n \"pi\": \"cse-id\",\n \"ty\": 2,\n \"aei\": \"CAdmin\"\n }\n}" + }, + + "with rcn=4 in the request": { + "value": "{\n \"m2m:ae\": {\n \"rn\": \"aename\",\n \"api\": \"N01.com.company.aename \",\n \"lbl\": [\"key1\", \"key2\"],\n \"rr\": true,\n \"srv\": [\"3\"],\n \"poa\": [\"http://cse-address:8080\"],\n \"ri\": \"CAdmin\",\n \"ct\": \"20210406T171115,934044\",\n \"lt\": \"20210406T171115,934044\",\n \"et\": \"20220406T171115,934064\",\n \"pi\": \"cse-id\",\n \"ty\": 2,\n \"aei\": \"CAdmin\",\n \"m2m:cnt\": \n [{\"rn\": \"data1\",\n \"lbl\": [\"API\"],\n \"ri\": \"cnt7407517254520235341\",\n \"ct\": \"20210407T073116,754629\",\n \"lt\": \"20210407T073116,754629\",\n \"et\": \"20220407T073116,754662\",\n \"pi\": \"CAdmin\",\n \"st\": 0,\n \"ty\": 3,\n \"cni\": 0,\n \"cbs\": 0\n },\n {\n \"rn\": \"data2\",\n \"lbl\": [\"API2\"],\n \"ri\": \"cnt446121489468649928\",\n \"ct\": \"20210407T073158,811116\",\n \"lt\": \"20210407T073158,811116\",\n \"et\": \"20220407T073158,811187\",\n \"pi\": \"CAdmin\",\n \"st\": 0,\n \"ty\": 3,\n \"cni\": 0,\n \"cbs\": 0\n }]\n}\n}" + } + } + } + } + } + }, + "servers": [{ + "url": "http://cse-address:8080" + }] + }, + "put": { + "description": "Update AE resource", + "parameters": [{ + "name": "X-M2M-Origin", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "CAdmin" + }, + { + "name": "X-M2M-RVI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "3" + }, + { + "name": "X-M2M-RI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "1234" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "examples": { + "0": { + "value": "{\n \"m2m:ae\" : {\n \"lbl\": [\"aename bedroom\"],\n \"poa\": [\"http://192.168.1.50:9090\"]\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "Update AE Response", + "content": { + "application/json": { + + "examples": { + "with no rcn or rcn=1 in the request": { + "value": "{\n \"m2m:ae\": {\n \"rn\": \"aename\",\n \"api\": \"N01.com.company.aename \",\n \"lbl\": [\"aename bedroom\"],\n \"rr\": true,\n \"srv\": [\"3\"],\n \"poa\": [\"http://192.168.1.50:9090\"],\n \"ri\": \"CAdmin\",\n \"ct\": \"20210406T171115,934044\",\n \"lt\": \"20210407T080109,896281\",\n \"et\": \"20220406T171115,934064\",\n \"pi\": \"cse-id\",\n \"ty\": 2,\n \"aei\": \"CAdmin\"\n }\n}" + }, + "with rcn=0 in the request": { + "value": "" + } + } + } + } + } + }, + "servers": [{ + "url": "http://cse-address:8080" + }] + }, + + "delete": { + "description": "Delete AE", + "parameters": [{ + "name": "X-M2M-Origin", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "CAdmin" + }, + { + "name": "X-M2M-RVI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "3" + }, + { + "name": "X-M2M-RI", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "example": "1234" + } + ], + "responses": { + "200": { + "description": "Delete AE response", + "content": { + "application/json": { + + "examples": { + "with no rcn or rcn=0 in the request": { + "value": "" + }, + "with rcn=1 in the request": { + "value": "{\n \"m2m:ae\": {\n \"rn\": \"aename\",\n \"api\": \"N01.com.company.aename \",\n \"lbl\": [\"key1\", \"key2\"],\n \"rr\": true,\n \"srv\": [\"3\"],\n \"poa\": [\"http://cse-address:8080\"],\n \"ri\": \"C8r12WReyGd\",\n \"ct\": \"20210407T090236,657104\",\n \"lt\": \"20210407T090236,657104\",\n \"et\": \"20220407T090236,657145\",\n \"pi\": \"cse-id\",\n \"ty\": 2,\n \"aei\": \"C8r12WReyGd\"\n }\n}" + } + } + } + } + } + + + + }, + "servers": [{ + "url": "http://cse-address:8080" + }] + }, + + "servers": [{ + "url": "http://cse-address:8080" + }] + } + + + + + } + +} \ No newline at end of file -- GitLab