-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
336 lines (332 loc) · 11.2 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
openapi: 3.0.1
info:
title: Account-Export API
description: "Export account configuration settings from the Imperva platform to\
\ a zip file in standard Terraform format. For the full feature documentation,\
\ see [Export Account Configuration](https://docs.imperva.com/bundle/cloud-application-security/page/account-export.htm)."
license:
name: The terms in the absence of an applicable signed agreement between you and
Imperva
url: https://www.imperva.com/legal/license-agreement/
version: 1.0.0
servers:
- url: https://api.imperva.com/account-export-import
description: Imperva API server
security:
- api_key: []
- api_id: []
paths:
/v3/export:
post:
tags:
- Account configuration export
summary: Initiate the export process
description: "This API initiates the export process for an account (parent or\
\ sub account). The process is asynchronous. The response body contains the\
\ handler parameter, that is used to identify the current export process.\
\ Send this handler in the download request. It can also be used to check\
\ the status and retrieve the process results."
operationId: exportAsync
parameters:
- name: caid
in: query
description: The account ID to work on
required: true
schema:
type: integer
format: int64
- name: x-API-Id
in: header
description: An API ID created and managed in the Imperva Cloud Security Console
and used for authentication
required: true
schema:
type: string
- name: x-API-Key
in: header
description: An API key created and managed in the Imperva Cloud Security
Console and used for authentication
required: true
schema:
type: string
responses:
"202":
description: Export is in progress
content:
'*/*':
schema:
$ref: '#/components/schemas/AsyncResponse'
example:
handler: 1234-abcd-5678-efgh-12qw45rt67ty
status: Export is in progress
"403":
description: "This resource, or one of its associated resources, is currently\
\ at work. Please try again later"
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 403
id: 20014b504cb97819
source:
pointer: /export
title: Operation Forbidden
detail: "This resource, or one of its associated resources, is currently\
\ at work. Please try again later"
"401":
description: Authentication missing or invalid
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 500
id: 20014b504cb97819
source:
pointer: /export
title: Authentication Error
detail: Authentication missing or invalid
"500":
description: Something went wrong. Contact support
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 500
id: 20014b504cb97819
source:
pointer: /export
title: Internal Server Error
detail: Something went wrong. Contact support
/v3/export/{resourceType}/{id}:
post:
tags:
- Account configuration export
summary: "Initiate the export process for a single resource: site or policy."
description: "This API initiates the export process for a single resource: site\
\ or policy. The process is asynchronous. The response body contains a code,\
\ located in the handler parameter, that is used to identify the current export\
\ process. Send this code in the download request. It can also be used to\
\ check the status and retrieve the process results."
operationId: exportRootResource
parameters:
- name: caid
in: query
description: The account to work on
required: true
schema:
type: integer
format: int64
- name: resourceType
in: path
description: "The resource type to be exported: SITE or POLICY"
required: true
schema:
type: string
- name: id
in: path
description: The Imperva ID of the website or policy
required: true
schema:
type: integer
format: int64
- name: x-API-Id
in: header
description: An API ID created and managed in the Imperva Cloud Security Console
and used for authentication
required: true
schema:
type: string
- name: x-API-Key
in: header
description: An API key created and managed in the Imperva Cloud Security
Console and used for authentication
required: true
schema:
type: string
responses:
"403":
description: "This resource, or one of its associated resources, is currently\
\ at work. Please try again later"
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 403
id: 20014b504cb97819
source:
pointer: /export/SITE/1234
title: Operation Forbidden
detail: "This resource, or one of its associated resources, is currently\
\ at work. Please try again later"
"202":
description: Export is in progress
content:
'*/*':
schema:
$ref: '#/components/schemas/AsyncResponse'
example:
handler: 1234-abcd-5678-efgh-12qw45rt67ty
status: Export is in progress
"500":
description: Something went wrong. Contact support
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 500
id: 20014b504cb97819
source:
pointer: /export/SITE/1234
title: Internal Server Error
detail: Something went wrong. Contact support
"401":
description: Authentication missing or invalid
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 500
id: 20014b504cb97819
source:
pointer: /export/SITE/1234
title: Authentication Error
detail: Authentication missing or invalid
/v3/export/download/{handler}:
get:
tags:
- Account configuration export
summary: Download the exported zip file after successful export
description: |-
This API is used to download the exported zip file after export is complete.
While the export process is in progress the response status will be 202. Once the export process has finished successfully, the response status will be 200 and the file will be served.
operationId: downloadAsync
parameters:
- name: caid
in: query
description: The account to work on.
required: true
schema:
type: integer
format: int64
- name: handler
in: path
description: The handler received in the export response. The handler identifies
the export process and is used to check the status and retrieve the process
zip file when it is ready.
required: true
schema:
type: string
- name: x-API-Id
in: header
description: An API ID created and managed in the Imperva Cloud Security Console
and used for authentication
required: true
schema:
type: string
- name: x-API-Key
in: header
description: An API key created and managed in the Imperva Cloud Security
Console and used for authentication
required: true
schema:
type: string
responses:
"202":
description: Export is in progress
content:
'*/*':
schema:
$ref: '#/components/schemas/AsyncResponse'
example:
handler: 1234-abcd-5678-efgh-12qw45rt67ty
status: Export is in progress
"404":
description: Resource Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 404
id: 20014b504cb97819
source:
pointer: /export/download/1234-abcd-5678-efgh-12qw45rt67ty
title: Resource Not Found
detail: Resource Not Found
"200":
description: Successful operation
content:
'*/*':
schema:
type: object
"500":
description: Something went wrong. Contact support
content:
'*/*':
schema:
$ref: '#/components/schemas/APIError'
example:
errors:
- status: 500
id: 20014b504cb97819
source:
pointer: /export/download/1234-abcd-5678-efgh-12qw45rt67ty
title: Internal Server Error
detail: Something went wrong. Contact support
components:
schemas:
AsyncResponse:
type: object
properties:
handler:
type: string
description: The code provided in the export response. Used to identify
the associated zip file when sending the download request.
status:
type: string
description: The HTTP response status code indicating the status of the
export process.
APIError:
type: object
properties:
status:
type: integer
format: int32
id:
type: string
code:
type: string
source:
type: object
additionalProperties:
type: object
title:
type: string
detail:
type: string
securitySchemes:
api_key:
type: apiKey
description: An API key created and managed in the Imperva Cloud Security Console
and used for authentication
name: x-API-Key
in: header
api_id:
type: apiKey
description: An API ID created and managed in the Imperva Cloud Security Console
and used for authentication
name: x-API-Id
in: header