-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
306 lines (304 loc) · 9.66 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
openapi: 3.0.0
info:
title: Akeneo PIM UI Extension
description: Akeneo PIM UI extension endpoint manipulation
version: 1.0.0
contact: {}
tags:
- name: UI Extension
description: Manipulate UI Extensions
paths:
/api/rest/v1/ui-extensions:
get:
summary: 'List extensions'
description: 'List all extensions associated with your token'
parameters: []
operationId: list_extensions
tags:
- UI Extension
responses:
'200':
description: |
Returns the list of extensions
content:
application/json:
schema:
$ref: '#/components/schemas/ui_extension_list_response'
post:
summary: 'Add an extension'
description: |
The `configuration` depends on the `position`. Available positions are `pim.product.tab`, `pim.category.tab` and `pim.product.header`, `pim.product-model.header`, `pim.sub-product-model.header`.
For now, the only configuration keys are the same for all the position.
The `type` available are `simple_iframe` and `simple_button`. It depends on the `position` :
- `simple_iframe` for `pim.product.tab`, `pim.category.tab` and `pim.product-grid.action-bar`
- `simple_button` for `pim.product.header`, `pim.product-model.header` and `pim.sub-product-model.header`
operationId: add_extension
tags:
- UI Extension
requestBody:
description: |
whatever
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/ui_extension_simple_button_request"
- $ref: "#/components/schemas/ui_extension_simple_iframe_request"
responses:
'201':
description: |
Ui Extension created
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/ui_extension_simple_button_response"
- $ref: "#/components/schemas/ui_extension_simple_iframe_response"
'400':
description: |
Invalid Json
'422':
description: |
Violation error
/api/rest/v1/ui-extensions/{ui_extension_uuid}:
patch:
summary: 'Update an extension'
description: |
The `configuration` depends on the `position`. Available positions are `pim.product.tab`, `pim.category.tab` and `pim.product.header`, `pim.product-model.header`, `pim.sub-product-model.header`.
For now, the only configuration keys are the same for all the position.
The `type` available are `simple_iframe` and `simple_button`. It depends on the `position` :
- `simple_iframe` for `pim.product.tab`, `pim.category.tab` and `pim.product-grid.action-bar`
- `simple_button` for `pim.product.header`, `pim.product-model.header` and `pim.sub-product-model.header`
parameters:
- $ref: "#/components/parameters/ui_extension_uuid"
operationId: update_extension
tags:
- UI Extension
requestBody:
description: |
whatever
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/ui_extension_simple_button_request"
- $ref: "#/components/schemas/ui_extension_simple_iframe_request"
responses:
'200':
description: |
Ui Extension updated
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/ui_extension_simple_button_response"
- $ref: "#/components/schemas/ui_extension_simple_iframe_response"
'400':
description: |
Invalid Json
'422':
description: |
Violation error
delete:
summary: 'Delete an extension'
description: 'Delete an extension'
parameters:
- $ref: "#/components/parameters/ui_extension_uuid"
operationId: delete_extension
tags:
- UI Extension
responses:
'204':
description: |
Deleted successfully
'404':
description: |
Extension does not exists
security:
- pim_access_token: []
servers:
- url: demo.akeneo.com
description: ''
components:
links: {}
callbacks: {}
parameters:
ui_extension_uuid:
name: ui_extension_uuid
in: path
required: true
schema:
type: string
example: e175d525-8fbf-4b26-9242-1daccf301f8b
schemas:
ui_extension_list_response:
type: array
description: 'Represents a list of extensions'
items:
anyOf:
- $ref: "#/components/schemas/ui_extension_simple_button_request"
- $ref: "#/components/schemas/ui_extension_simple_iframe_request"
ui_extension_simple_button_request:
type: object
properties:
name:
type: string
example: my_awesome_button_extension
version:
type: string
example: V1.02.3
description:
type: string
example: A short human readable description of the extension intent.
position:
type: string
default: pim.product.header
enum: [pim.product.header, pim.product-model.header, pim.sub-product-model.header]
type:
type: string
default: simple_button
configuration:
type: object
properties:
url:
type: string
example: https://www.example.com
default_label:
type: string
example: My awesome button extension
labels:
type: object
properties:
en_US:
type: string
example: My awesome button extension
fr_FR:
type: string
example: Ma super button extension
ui_extension_simple_iframe_request:
type: object
properties:
name:
type: string
example: my_awesome_iframe_extension
version:
type: string
example: 20250301250
description:
type: string
example: A short human readable description of the extension intent.
position:
type: string
default: pim.product.tab
enum: [pim.product.tab, pim.category.tab, pim.product-grid.action-bar]
type:
type: string
default: simple_iframe
configuration:
type: object
properties:
url:
type: string
example: https://www.example.com
default_label:
type: string
example: My awesome iFrame extension
labels:
type: object
properties:
en_US:
type: string
example: My awesome iFrame extension
fr_FR:
type: string
example: Ma super iFrame extension
ui_extension_simple_button_response:
type: object
properties:
uuid:
type: string
example: f641347d-1768-4e7b-8bb1-e2ff34b05875
name:
type: string
example: my_awesome_button_extension
version:
type: string
example: 2.32
description:
type: string
example: A short human readable description of the extension intent.
position:
type: string
default: pim.product.header
enum: [pim.product.header, pim.product-model.header, pim.sub-product-model.header]
status:
type: string
default: active
type:
type: string
default: simple_button
configuration:
type: object
properties:
url:
type: string
example: https://www.example.com
default_label:
type: string
example: My awesome button extension
labels:
type: object
properties:
en_US:
type: string
example: My awesome button extension
fr_FR:
type: string
example: Ma super button extension
ui_extension_simple_iframe_response:
type: object
properties:
uuid:
type: string
example: 5c8026f9-1617-4529-9623-1d7f8a70a89e
name:
type: string
example: my_awesome_iframe_extension
version:
type: string
example: 2025-03-02-109
description:
type: string
example: A short human readable description of the extension intent.
position:
type: string
default: pim.product.tab
enum: [pim.product.tab, pim.category.tab, pim.product-grid.action-bar]
type:
type: string
default: simple_iframe
configuration:
type: object
properties:
url:
type: string
example: https://www.example.com
default_label:
type: string
example: My awesome iFrame extension
labels:
type: object
properties:
en_US:
type: string
example: My awesome iFrame extension
fr_FR:
type: string
example: Ma super iFrame extension
securitySchemes:
pim_access_token:
type: apiKey
name: access_token
in: header