-
Notifications
You must be signed in to change notification settings - Fork 51
/
edge_orchestration_api_secure.yaml
138 lines (122 loc) · 3.61 KB
/
edge_orchestration_api_secure.yaml
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
swagger: '2.0'
info:
title: Edge Orchestration API (secure mode)
description: >-
This provides functionality to execute a service on a remote edge device &
Security Manager setup.
version: v1-20200604
schemes:
- http
tags:
- name: Service Execution
description: Execute a Service on the other Device based on Score
- name: Security Manager
description: Provide Security Manager setup
paths:
'/api/v1/orchestration/services':
post:
tags:
- Service Execution
description: Execute a Service on the other Device
consumes:
- application/json
produces:
- application/json
parameters:
- in: "body"
name: "body"
description: "Name is Service Category, declared in config file and it determines which scoring method will be applied.
Args is a list of Shell Command to execute Service."
required: true
schema:
$ref: "#/definitions/service"
responses:
'200':
description: Successful operation, return handle, as a client ID
schema:
$ref: "#/definitions/handle"
'401':
$ref: '#/definitions/unauthorizederror'
security:
- Bearer: []
'/api/v1/orchestration/securemgr':
post:
tags:
- Security Manager
description: Provide Security Manager setup (verification sub-system)
consumes:
- application/json
produces:
- application/json
parameters:
- in: "body"
name: "body"
description: "Name is security component, it determines which security subsystem will be setuped.
Args is a type of command to security sub-system setup."
required: true
schema:
$ref: "#/definitions/verifier"
responses:
'200':
description: Successful operation, return handle, as a client ID
schema:
$ref: "#/definitions/handle"
'401':
$ref: '#/definitions/unauthorizederror'
security:
- Bearer: []
securityDefinitions:
Bearer:
type: apiKey
name: Authorization
in: header
description: |
For accessing the API a valid JWT token must be passed in the 'Authorization' header.
The following syntax must be used in the 'Authorization' header :
Bearer xxxxxx.yyyyyyy.zzzzzz
definitions:
service:
required:
- ServiceName
- ServiceInfo
properties:
ServiceName:
type: string
example: container_service
ServiceInfo:
type: array
example:
- {"ExecutionType":"native", "ExecCmd":["hellow-world"]}
- {"ExecutionType":"container", "ExecCmd":["docker", "run", "hello-world@sha256:fc6a51919cfeb2e6763f62b6d9e8815acbf7cd2e476ea353743570610737b752"]}
- {"ExecutionType":"android", "ExecCmd":["com.example.hello-world"]}
handle:
required:
- Handle
properties:
Handle:
type: integer
format: int32
example: 7
verifier:
required:
- SecureMgr
- CmdType
- Desc
properties:
SecureMgr:
type: string
example: Verifier
CmdType:
type: string
example:
- addHashCWL
- delHashCWL
- delAllHashCWL
- printAllHashCWL
Desc:
type: array
example:
- {"ContainerHash": "fc6a51919cfeb2e6763f62b6d9e8815acbf7cd2e476ea353743570610737b752",}
unauthorizederror:
description: Access token is missing or invalid
type: string