-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
168 lines (168 loc) · 4.82 KB
/
openapi.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
openapi: 3.0.1
info:
title: Apply Server
description: 'This is the Apply Server ReST API documenation. You can run the methods against your own server by adding your domain and port under which the server is running and authorize witha valid API key'
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
externalDocs:
description: GitHub Repository
url: https://github.com/Netcentric/apply-server
servers:
- url: http://{domain}:{port}
variables:
domain:
default: localhost
description: The server domain under which the Apply Server is running
port:
default: '448'
description: The port under which the Apply Server is running
security:
- apiKey: []
paths:
/{configurationArchiveFileName}:
post:
summary: Upload configuration archive and run the default script
parameters:
- in: path
name: configurationArchiveFileName
required: true
schema:
type: string
description: The file name of the configuraton archive (from which the format is determined). Only extensions tar.gz, tgz, tar and zip are supported.
example: package-name.tar.gz
requestBody:
description: The configuration archive in zip or tar.gz format
content:
application/octet-stream:
schema:
type: string
format: binary
required: true
responses:
400:
description: Invalid api key supplied
content: {}
500:
description: IP not allowed or some other internal exception.
content: {}
200:
description: Successfull upload and executon
content:
text/plain:
schema:
type: string
/{command}:
post:
summary: Run a specific command
parameters:
- in: path
name: command
required: true
schema:
type: string
description: The command which was registered when the server was started.
example: myscript
responses:
400:
description: Invalid api key supplied.
content: {}
500:
description: IP not allowed or some other internal exception.
content: {}
200:
description: Successfull upload and execution.
content:
text/plain:
schema:
type: string
/:
get:
summary: Retrieve possible get paths.
responses:
400:
description: Invalid api key supplied.
content: {}
200:
description: A HTML page containing links to all supported GET operations.
content:
text/html:
schema:
type: string
post:
summary: Upload configuration archive and run default script
parameters:
- in: query
name: format
required: true
schema:
type: string
enum:
- tar.gz
- tgz
- tar
- zip
description: The extension of the given configuraton archive (from which the format is determined).
example: tar.gz
requestBody:
description: The configuration archive in the given format.
content:
application/octet-stream:
schema:
type: string
format: binary
required: true
responses:
400:
description: Invalid api key supplied or script already running.
content: {}
500:
description: IP not allowed or some other internal exception.
content: {}
200:
description: Successfull upload and execution.
content:
text/plain:
schema:
type: string
/run/{index}:
get:
summary: Get script execution output of script with given index
parameters:
- in: header
name: apikey
schema:
type: string
required: true
example: MT7HpOKnx5
- in: path
name: index
required: true
schema:
type: integer
description: The index of the configuration file to execute.
responses:
200:
description: Found output of script.
content:
text/plain:
schema:
type: string
/download.tar.gz:
get:
summary: Download the configuration archive
responses:
200:
description: Downloaded file
content:
application/gzip:
schema:
type: string
format: binary
components:
securitySchemes:
apiKey:
type: apiKey
name: apikey
in: header