-
Notifications
You must be signed in to change notification settings - Fork 797
Expand file tree
/
Copy pathmarketplace-content.yaml
More file actions
535 lines (518 loc) · 20.1 KB
/
Copy pathmarketplace-content.yaml
File metadata and controls
535 lines (518 loc) · 20.1 KB
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
openapi: "3.0.0"
info:
version: 1.0.0
title: Content API
description: The API to manage the Marketplace content for Mendix apps.
termsOfService: https://www.mendix.com/terms-of-use/
contact:
name: Mendix Support
url: 'https://support.mendix.com'
servers:
- url: "https://marketplace-api.mendix.com/v1"
paths:
/content:
get:
tags:
- content
summary: Returns the list of content.
description: "Returns both public and private content belonging to your company. The content metadata is from the last published version of the content. This endpoint uses pagination."
operationId: getContent
parameters:
- $ref: '#/components/parameters/name'
- $ref: '#/components/parameters/isPrivate'
- $ref: '#/components/parameters/isCompanyApproved'
- $ref: '#/components/parameters/publishedSince'
- $ref: '#/components/parameters/limitContent'
- $ref: '#/components/parameters/offsetContent'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/content'
'400':
$ref: '#/components/responses/error400'
'401':
$ref: '#/components/responses/error401'
'500':
$ref: '#/components/responses/error500'
/content/{contentId}:
get:
tags:
- content
summary: Returns the specific content for the given content id.
description: "The content metadata is from the last published version of the content. You can query both public and private content belonging to your company."
operationId: getSpecificContent
parameters:
- $ref: '#/components/parameters/contentId'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/specificContent'
'400':
$ref: '#/components/responses/error400'
'401':
$ref: '#/components/responses/error401'
'404':
$ref: '#/components/responses/error404'
'500':
$ref: '#/components/responses/error500'
/content/{contentId}/versions:
get:
tags:
- content
summary: Returns all versions of the content.
description: "The content metadata is from the last published version of the content. You can query both public and private content belonging to your company."
operationId: getContentVersions
parameters:
- $ref: '#/components/parameters/contentId'
- $ref: '#/components/parameters/versionId'
- $ref: '#/components/parameters/supportedMendixVersion'
- $ref: '#/components/parameters/publishedSince'
- $ref: '#/components/parameters/limitContentVersions'
- $ref: '#/components/parameters/offsetContent'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/contentVersions'
'400':
$ref: '#/components/responses/error400'
'401':
$ref: '#/components/responses/error401'
'500':
$ref: '#/components/responses/error500'
/versions/{versionId}/download:
get:
tags:
- content
summary: Downloads the source file of a specific version.
description: "Downloads the original source file associated with the specified version"
operationId: getVersionDownload
parameters:
- $ref: '#/components/parameters/versionId'
responses:
'200':
description: Downloads package version successfully
'400':
$ref: '#/components/responses/error400'
'404':
$ref: '#/components/responses/error404'
'500':
$ref: '#/components/responses/error500'
components:
parameters:
contentId:
name: contentId
in: path
description: |-
This is the identifier of the content, representing the number used in the URL of the content details page. For instance, it is '170' for 'https://marketplace.mendix.com/link/component/170'.
It can also be retrieved by querying the Content API using the name of the last published version of the content. For instance, ```GET https://marketplace-api.mendix.com/v1/content?name=Community%20Commons``` will return the contentId for 'Community Commons'.
required: true
schema:
type: integer
versionId:
name: versionId
in: query
description: "This is the UUID of the published version."
required: false
schema:
type: string
format: UUID
name:
name: name
in: query
description: "Allows you to do a query on the name of the last published version of the content. This can help to get the identifier of the content. It does a precise match for the value passed in the filter."
required: false
schema:
type: string
supportedMendixVersion:
name: supportedMendixVersion
in: query
description: "Allows you to find the version that is supported by the Mendix version passed in the filter. If multiple supported versions match the value, it returns the most recent published version."
required: false
schema:
type: string
pattern: "^\\b((?:\\d{1,3}|1000)(?:\\.\\d{1,3}|\\.1000){0,2})\\b$"
example: '10.1.1'
isPrivate:
name: isPrivate
in: query
description: "Allows you to filter on public or private content. Supported values are `true` or `false`. If the value is `true`, it returns only the last published versions of the private content belonging to your company. If the value is `false`, it returns only the last published versions of the public content belonging to your company. If no value is passed, then it returns the last published versions of both public and private content belonging to your company."
required: false
schema:
type: string
isCompanyApproved:
name: isCompanyApproved
in: query
description: "Allows you to filter on company-approved content. This filter is only applicable if the company has enabled the company-approved badge functionality. For more information, refer to https://docs.mendix.com/control-center/company-approved/. Supported values are `true` or `false`. If the value is `true`, it returns only the last published versions of the company-approved content. If the value is `false`, it returns only the last published versions of the non-company-approved content. If no value is passed, it returns the last published versions of both company-approved and non-company-approved content."
required: false
schema:
type: string
publishedSince:
name: publishedSince
in: query
description: "Allows you to find the content whose last published version was published since the date passed the filter. You must provide a value in the full-date format as specified in RFC 3339, for example: 2023-09-01."
required: false
schema:
type: string
format: yyyy-MM-dd
limit:
name: limit
in: query
required: false
schema:
type: integer
format: int64
minimum: 1
maximum: 100
default: 10
limitContent:
name: limit
in: query
required: false
description: "This defines the maximum number of content that can be returned per request. If no limit is specified, the default value is 10. However, the limit cannot exceed 100. If the value provided exceeds 100, the limit is automatically set to 20 without generating an error message."
schema:
type: integer
format: int64
minimum: 1
maximum: 100
default: 10
limitContentVersions:
name: limit
in: query
required: false
description: "This defines the maximum number of content versions that can be returned per request. If no limit is specified, the default value is 10. However, the limit cannot exceed 20. If the value provided exceeds 20, the limit is automatically set to 20 without generating an error message."
schema:
type: integer
format: int64
minimum: 1
maximum: 20
default: 10
offsetContent:
name: offset
in: query
required: false
description: "The offset is the zero-based index of the first content to be returned on the page."
schema:
type: integer
format: int64
minimum: 0
default: 0
responses:
error400:
description: |-
The request may contain invalid or missing data.
The error message gives additional information.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
examples:
example-400:
value:
error:
code: 400
message: Bad Request
detail: "The request could not be processed by the server because the input parsing/processing failed."
error401:
description: |-
No usable authentication credentials were found.
The error message gives additional information.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
examples:
example-401:
value:
error:
code: 401
message: Unauthorized
detail: "The credentials could not be authenticated or no credentials were provided."
error404:
description: |-
The required item could not be found.
The error message gives additional information.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
examples:
example-404:
value:
error:
code: 404
message: Not Found
detail: "The content is not found."
error500:
description: |-
An error occurred during the processing of the request.
The error message gives additional information.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
examples:
example-500:
value:
error:
code: 500
message: Internal Server Error
detail: "Something went wrong."
schemas:
error:
type: object
properties:
code:
type: integer
minimum: 0
example: 400
message:
type: string
example: Bad Request
detail:
type: string
example: Malformed request body
appCategories:
type: array
items:
type: object
properties:
name:
type: string
example: "Authentication"
uuid:
type: string
format: uuid
example: 346a2cad-6b96-477a-9225-3957b73ctest
specificContent:
type: object
required:
- contentId
- publisher
- type
- isPrivate
- latestVersion
properties:
contentId:
type: integer
format: int64
example: 50
description: "This is the identifier of the content."
publisher:
type: string
example: "Automation Company Ltd."
description: "This is the company that owns the content."
type:
type: string
example: "Module"
description: "This returns the type of the content selected during onboarding. For the full list of the content types, see: https://docs.mendix.com/appstore/general/app-store-overview/."
categories:
$ref: '#/components/schemas/appCategories'
description: "This returns all the categories selected during onboarding of the content. If there is no category, no value is returned."
supportCategory:
type: string
example: "Community"
enum:
- Community
- Platform
- Partner
- Extended
- Deprecated
- Siemens
description: "The type of support for this content. For more information, see https://docs.mendix.com/appstore/general/app-store-content-support/"
licenseUrl:
type: string
format: url
example: "http://www.apache.org/licenses/LICENSE-2.0.html"
description: "The license selected during onboarding."
isPrivate:
type: boolean
description: "This indicates whether the content is public or private."
isCompanyApproved:
type: boolean
description: "This indicates whether the content is company-approved. This attribute is only returned if the company has enabled the company-approved badge functionality. For more information, refer to https://docs.mendix.com/control-center/company-approved/."
latestVersion:
$ref: '#/components/schemas/version'
content:
type: object
description: "The list of content that includes various elements such as modules, widgets, templates, or other components that developers create and share with the Mendix community."
properties:
items:
type: array
items:
$ref: '#/components/schemas/specificContent'
contentVersions:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/contentVersion'
version:
type: object
properties:
name:
type: string
example: "3d Viewer"
description: "This is the name of the version of the content."
versionId:
type: string
format: uuid
description: "This is the UUID of the version."
versionNumber:
type: string
pattern: "^\\b((?:\\d{1,3}|1000)(?:\\.\\d{1,3}|\\.1000){0,2})(?:-[a-zA-Z]+)?\\b$"
example: '10.1.1'
description: "This is the version number. The format of the version number is major.minor.patch, for example: `1.0.0`."
minSupportedMendixVersion:
type: string
pattern: "^\\b((?:\\d{1,3}|1000)(?:\\.\\d{1,3}|\\.1000){0,2})\\b$"
example: '10.1.1'
description: "This is the Studio Pro version selected during the onboarding. This means any Studio Pro version equal to or greater than this version is compatible with the latest version of the content."
publicationDate:
type: string
format: yyyy-MM-ddTHH-mm-ssZ
example: '2023-09-01T09:04:00Z'
downloadURL:
type: string
format: uri
example: "https://example.com/content/versions/{versionId}/download"
description: "This is the URL used to download the specific version of the component."
versionReference:
type: object
description: "A reference to a version with basic identifying information."
required:
- versionId
- versionNumber
- minSupportedMendixVersion
properties:
versionId:
type: string
format: uuid
description: "This is the UUID of the version."
versionNumber:
type: string
pattern: "^\\b((?:\\d{1,3}|1000)(?:\\.\\d{1,3}|\\.1000){0,2})(?:-[a-zA-Z]+)?\\b$"
example: '10.1.1'
description: "This is the version number. The format of the version number is major.minor.patch; for example, `1.0.0`."
minSupportedMendixVersion:
type: string
pattern: "^\\b((?:\\d{1,3}|1000)(?:\\.\\d{1,3}|\\.1000){0,2})\\b$"
example: '10.1.1'
description: "This is the Studio Pro version selected during the onboarding. This means any Studio Pro version equal to or greater than this version is compatible with the latest version of the content."
securityIssue:
type: object
required:
- code
properties:
code:
type: string
example: "CVE-2023-12345"
description: "This is the CVE or CWE identifier for the security issue."
regularVersion:
allOf:
- $ref: '#/components/schemas/version'
- type: object
required:
- releaseNotes
- versionType
properties:
releaseNotes:
type: string
example: "These are the release notes for this version."
description: "These are the release notes for the published versions."
versionType:
type: string
enum:
- Regular
example: "Regular"
description: "This is the version type. It indicates that this is a regular version with no known vulnerabilities."
vulnerableVersion:
allOf:
- $ref: '#/components/schemas/version'
- type: object
required:
- releaseNotes
- versionType
- vulnerabilities
- securityFixVersions
properties:
releaseNotes:
type: string
example: "These are the release notes for this version."
description: "These are the release notes for the published versions."
versionType:
type: string
enum:
- Vulnerable
example: "Vulnerable"
description: "This is the version type. It indicates that this version has known vulnerabilities."
vulnerabilities:
type: array
description: "This lists the CVE or CWE identifiers for the vulnerabilities present in this version."
items:
$ref: '#/components/schemas/securityIssue'
securityFixVersions:
type: array
description: "This lists the security fix versions that address the vulnerabilities in this version."
items:
$ref: '#/components/schemas/versionReference'
securityFixVersion:
allOf:
- $ref: '#/components/schemas/version'
- type: object
required:
- releaseNotes
- versionType
- fixedSecurityIssues
- affectedVersions
properties:
releaseNotes:
type: string
example: "These are the release notes for this version."
description: "These are the release notes for the published versions."
versionType:
type: string
enum:
- SecurityFix
example: "SecurityFix"
description: "This is the version type. It indicates that this version fixes one or multiple security issues."
fixedSecurityIssues:
type: array
description: "This lists the CVE or CWE identifiers for the security issues that were fixed in this version."
items:
$ref: '#/components/schemas/securityIssue'
affectedVersions:
type: array
description: "This lists the vulnerable versions that are fixed by this security fix version."
items:
$ref: '#/components/schemas/versionReference'
contentVersion:
oneOf:
- $ref: '#/components/schemas/regularVersion'
- $ref: '#/components/schemas/vulnerableVersion'
- $ref: '#/components/schemas/securityFixVersion'
discriminator:
propertyName: versionType
mapping:
Regular: '#/components/schemas/regularVersion'
Vulnerable: '#/components/schemas/vulnerableVersion'
SecurityFix: '#/components/schemas/securityFixVersion'
securitySchemes:
Personal Access Token:
name: Authorization
type: apiKey
in: header
description: 'For more information about requesting and using a token see the [documentation](https://docs.mendix.com//portal/user-settings/#pat).<br/> The header must be set to `MxToken <Your PAT>`.'
security:
- Personal Access Token: []
tags:
- name: content