--- /dev/null
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Edge Orchestration",
+ "description": "Edge Orchestration support to deliver distributed service process environment.",
+ "version": "v1-20190307"
+ },
+ "schemes": [
+ "http"
+ ],
+ "tags": [
+ {
+ "name": "Device Resource",
+ "description": "Device resource"
+ },
+ {
+ "name": "Service Manager",
+ "description": "Managing services"
+ }
+ ],
+ "paths": {
+ "/api/v1/device/resource/usage/cpu": {
+ "get": {
+ "tags": [
+ "Device Resource"
+ ],
+ "description": "Get device cpu usage",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/CPU"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/device/resource/usage/memory": {
+ "get": {
+ "tags": [
+ "Device Resource"
+ ],
+ "description": "Get device memory usage",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/Memory"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/device/resource/usage/network": {
+ "get": {
+ "tags": [
+ "Device Resource"
+ ],
+ "description": "Get device network usage",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/Network"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/device/resource/usage/disk": {
+ "get": {
+ "tags": [
+ "Device Resource"
+ ],
+ "description": "Get device disk usage",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/Disk"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/servicemgr/service": {
+ "post": {
+ "tags": [
+ "Service Manager"
+ ],
+ "description": "Create service",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Parameters for request service execution",
+ "schema": {
+ "$ref": "#/definitions/ServiceRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/APIResponse"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Service Manager"
+ ],
+ "description": "Destroy service",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/APIResponse"
+ }
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "Service Manager"
+ ],
+ "description": "Get Service list",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/ServiceList"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/servicemgr/service/{serviceID}": {
+ "get": {
+ "tags": [
+ "Service Manager"
+ ],
+ "description": "Get service information",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "serviceID",
+ "in": "path",
+ "description": "Name of service",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful operation",
+ "schema": {
+ "$ref": "#/definitions/ServiceInfo"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "CPU": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "string",
+ "description": "Usage of CPU",
+ "example": "0.187383"
+ }
+ }
+ },
+ "Memory": {
+ "type": "object",
+ "properties": {
+ "memory": {
+ "type": "string",
+ "description": "Usage of Memory",
+ "example": "11.871336"
+ }
+ }
+ },
+ "Network": {
+ "type": "object",
+ "properties": {
+ "network": {
+ "type": "string",
+ "description": "Usage of Network",
+ "example": "0.003023"
+ }
+ }
+ },
+ "Disk": {
+ "type": "object",
+ "properties": {
+ "network": {
+ "type": "string",
+ "description": "Usage of Disk",
+ "example": ""
+ }
+ }
+ },
+ "SystemParam": {
+ "type": "object",
+ "properties": {
+ "ipAddr": {
+ "type": "string",
+ "description": "IP Addr of device requesting service",
+ "example": "127.0.0.1"
+ },
+ "port": {
+ "type": "string",
+ "description": "Port number of device requesting service",
+ "example": "5432"
+ }
+ }
+ },
+ "UserParam": {
+ "type": "object",
+ "properties": {
+ "arguments": {
+ "type": "string",
+ "description": "User parameter of requesting service",
+ "example": "5"
+ }
+ }
+ },
+ "ServiceRequest": {
+ "type": "object",
+ "properties": {
+ "serviceName": {
+ "type": "string",
+ "description": "Name of requested service",
+ "example": "helloWorld_service"
+ },
+ "status": {
+ "type": "string",
+ "description": "Status of requested service",
+ "example": "Start"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of resource for requested service",
+ "example": "CPU"
+ },
+ "systemParam": {
+ "$ref": "#/definitions/SystemParam"
+ },
+ "userParam": {
+ "$ref": "#/definitions/UserParam"
+ }
+ }
+ },
+ "ServiceInfo": {
+ "type": "object",
+ "properties": {
+ "serviceName": {
+ "type": "string",
+ "description": "Service name",
+ "example": "helloWorld_service"
+ },
+ "serviceID": {
+ "type": "string",
+ "description": "Unique ID of service",
+ "example": "helloWorld_service_deviceID_UUID"
+ },
+ "status": {
+ "type": "string",
+ "description": "Status of service",
+ "example": "Start"
+ },
+ "deviceID": {
+ "type": "string",
+ "description": "DeviceID on which the service is operating",
+ "example": "Edge_deviceID"
+ }
+ }
+ },
+ "ServiceList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ServiceInfo"
+ }
+ },
+ "APIResponse": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "Return the status of the request"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+---
+swagger: "2.0"
+info:
+ description: "Edge Orchestration support to deliver distributed service process\
+ \ environment."
+ version: "v1-20190307"
+ title: "Edge Orchestration"
+tags:
+- name: "Device Resource"
+ description: "Device resource"
+- name: "Service Manager"
+ description: "Managing services"
+schemes:
+- "http"
+paths:
+ /api/v1/device/resource/usage/cpu:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device cpu usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/CPU"
+ /api/v1/device/resource/usage/memory:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device memory usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/Memory"
+ /api/v1/device/resource/usage/network:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device network usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/Network"
+ /api/v1/device/resource/usage/disk:
+ get:
+ tags:
+ - "Device Resource"
+ description: "Get device disk usage"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/Disk"
+ /api/v1/servicemgr/service:
+ get:
+ tags:
+ - "Service Manager"
+ description: "Get Service list"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/ServiceList"
+ post:
+ tags:
+ - "Service Manager"
+ description: "Create service"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters:
+ - in: "body"
+ name: "body"
+ description: "Parameters for request service execution"
+ required: false
+ schema:
+ $ref: "#/definitions/ServiceRequest"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/APIResponse"
+ delete:
+ tags:
+ - "Service Manager"
+ description: "Destroy service"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters: []
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/APIResponse"
+ /api/v1/servicemgr/service/{serviceID}:
+ get:
+ tags:
+ - "Service Manager"
+ description: "Get service information"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters:
+ - name: "serviceID"
+ in: "path"
+ description: "Name of service"
+ required: true
+ type: "string"
+ x-exportParamName: "ServiceID"
+ responses:
+ 200:
+ description: "Successful operation"
+ schema:
+ $ref: "#/definitions/ServiceInfo"
+definitions:
+ CPU:
+ type: "object"
+ properties:
+ cpu:
+ type: "string"
+ example: "0.187383"
+ description: "Usage of CPU"
+ example:
+ cpu: "0.187383"
+ Memory:
+ type: "object"
+ properties:
+ memory:
+ type: "string"
+ example: "11.871336"
+ description: "Usage of Memory"
+ example:
+ memory: "11.871336"
+ Network:
+ type: "object"
+ properties:
+ network:
+ type: "string"
+ example: "0.003023"
+ description: "Usage of Network"
+ example:
+ network: "0.003023"
+ Disk:
+ type: "object"
+ properties:
+ network:
+ type: "string"
+ example: ""
+ description: "Usage of Disk"
+ example:
+ network: ""
+ SystemParam:
+ type: "object"
+ properties:
+ ipAddr:
+ type: "string"
+ example: "127.0.0.1"
+ description: "IP Addr of device requesting service"
+ port:
+ type: "string"
+ example: "5432"
+ description: "Port number of device requesting service"
+ example:
+ port: "5432"
+ ipAddr: "127.0.0.1"
+ UserParam:
+ type: "object"
+ properties:
+ arguments:
+ type: "string"
+ example: "5"
+ description: "User parameter of requesting service"
+ example:
+ arguments: "5"
+ ServiceRequest:
+ type: "object"
+ properties:
+ serviceName:
+ type: "string"
+ example: "helloWorld_service"
+ description: "Name of requested service"
+ status:
+ type: "string"
+ example: "Start"
+ description: "Status of requested service"
+ type:
+ type: "string"
+ example: "CPU"
+ description: "Type of resource for requested service"
+ systemParam:
+ $ref: "#/definitions/SystemParam"
+ userParam:
+ $ref: "#/definitions/UserParam"
+ example:
+ userParam:
+ arguments: "5"
+ serviceName: "helloWorld_service"
+ type: "CPU"
+ systemParam:
+ port: "5432"
+ ipAddr: "127.0.0.1"
+ status: "Start"
+ ServiceInfo:
+ type: "object"
+ properties:
+ serviceName:
+ type: "string"
+ example: "helloWorld_service"
+ description: "Service name"
+ serviceID:
+ type: "string"
+ example: "helloWorld_service_deviceID_UUID"
+ description: "Unique ID of service"
+ status:
+ type: "string"
+ example: "Start"
+ description: "Status of service"
+ deviceID:
+ type: "string"
+ example: "Edge_deviceID"
+ description: "DeviceID on which the service is operating"
+ example:
+ serviceName: "helloWorld_service"
+ serviceID: "helloWorld_service_deviceID_UUID"
+ deviceID: "Edge_deviceID"
+ status: "Start"
+ ServiceList:
+ type: "array"
+ items:
+ $ref: "#/definitions/ServiceInfo"
+ APIResponse:
+ type: "object"
+ properties:
+ message:
+ type: "string"
+ description: "Return the status of the request"
+ example:
+ message: "message"