1 .. This work is licensed under a
2 Creative Commons Attribution 4.0 International License.
4 Onboarding HTTP API (MOD)
5 =========================
14 Onboarding API is sub-component under MOD provides following function:
16 1. API to add/update data-formats
17 2. API to add/update components (component_Spec)
19 These API can be invoked by MS owners or by Acumos adapter to upload artifact into MOD catalog
22 :header: "API name", "Swagger"
25 "Inventory", ":download:`link <mod-onboardingapi.json>`"
42 GET ``/components/{component_id}``
43 ----------------------------------
59 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
60 :widths: 20, 15, 10, 10, 10, 20, 30
62 component_id | path | Yes | string | | |
72 .. code-block:: javascript
74 X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html
86 Type: :ref:`component fields <d_41cf5e14516a536474c8079d332e86c7>` extended :ref:`inline <i_34dba329148d5512a1350568d728c028>`
90 .. code-block:: javascript
93 "componentType": "somestring",
94 "componentUrl": "somestring",
95 "description": "somestring",
97 "modified": "2015-01-01T15:00:00.000Z",
99 "owner": "somestring",
101 "status": "somestring",
102 "version": "somestring",
103 "whenAdded": "2015-01-01T15:00:00.000Z"
109 Component not found in Catalog
112 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
116 .. code-block:: javascript
119 "message": "somestring"
125 Internal Server Error
142 Get list of Components in the catalog
149 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
150 :widths: 20, 15, 10, 10, 10, 20, 30
152 name | query | No | string | | | Name of component to filter for
153 version | query | No | string | | | Version of component to filter for
163 .. code-block:: javascript
165 X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html
177 Type: :ref:`Component List <d_53b82f243acb3fd79572e5a8e909c801>`
181 .. code-block:: javascript
186 "componentType": "somestring",
187 "componentUrl": "somestring",
188 "description": "somestring",
190 "modified": "2015-01-01T15:00:00.000Z",
191 "name": "somestring",
192 "owner": "somestring",
193 "status": "somestring",
194 "version": "somestring",
195 "whenAdded": "2015-01-01T15:00:00.000Z"
198 "componentType": "somestring",
199 "componentUrl": "somestring",
200 "description": "somestring",
202 "modified": "2015-01-01T15:00:00.000Z",
203 "name": "somestring",
204 "owner": "somestring",
205 "status": "somestring",
206 "version": "somestring",
207 "whenAdded": "2015-01-01T15:00:00.000Z"
215 Internal Server Error
222 GET ``/dataformats/{dataformat_id}``
223 ------------------------------------
239 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
240 :widths: 20, 15, 10, 10, 10, 20, 30
242 dataformat_id | path | Yes | string | | |
252 .. code-block:: javascript
254 X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html
266 Type: :ref:`dataformat fields <d_68ab1278c950fd214a4077565fd97922>` extended :ref:`inline <i_19c008f5124504e9d9c719d157dab70f>`
270 .. code-block:: javascript
273 "dataFormatUrl": "somestring",
274 "description": "somestring",
276 "modified": "2015-01-01T15:00:00.000Z",
277 "name": "somestring",
278 "owner": "somestring",
280 "status": "somestring",
281 "version": "somestring",
282 "whenAdded": "2015-01-01T15:00:00.000Z"
288 Data Format not found in Catalog
291 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
295 .. code-block:: javascript
298 "message": "somestring"
304 Internal Server Error
321 Get list of Data Formats in the catalog
331 .. code-block:: javascript
333 X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html
345 Type: :ref:`Data Format List <d_9479fe3b8fa2fcaeb723c198da99e791>`
349 .. code-block:: javascript
354 "dataFormatUrl": "somestring",
355 "description": "somestring",
357 "modified": "2015-01-01T15:00:00.000Z",
358 "name": "somestring",
359 "owner": "somestring",
360 "status": "somestring",
361 "version": "somestring",
362 "whenAdded": "2015-01-01T15:00:00.000Z"
365 "dataFormatUrl": "somestring",
366 "description": "somestring",
368 "modified": "2015-01-01T15:00:00.000Z",
369 "name": "somestring",
370 "owner": "somestring",
371 "status": "somestring",
372 "version": "somestring",
373 "whenAdded": "2015-01-01T15:00:00.000Z"
381 Internal Server Error
388 PATCH ``/components/{component_id}``
389 ------------------------------------
398 Update a Component's status in the Catalog
405 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
406 :widths: 20, 15, 10, 10, 10, 20, 30
408 component_id | path | Yes | string | | |
421 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
422 :widths: 20, 10, 15, 15, 30, 25
424 owner | Yes | string | | | User ID
425 status | Yes | string | | {'enum': ['published', 'revoked']} | . . . . .[published] is the only status change supported right now
427 .. code-block:: javascript
430 "owner": "somestring",
431 "status": "published"
440 Success, Component status updated
449 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
453 .. code-block:: javascript
456 "message": "somestring"
465 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
469 .. code-block:: javascript
472 "message": "somestring"
478 Component not found in Catalog
481 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
485 .. code-block:: javascript
488 "message": "somestring"
494 Internal Server Error
501 PATCH ``/dataformats/{dataformat_id}``
502 --------------------------------------
511 Update a Data Format's status in the Catalog
518 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
519 :widths: 20, 15, 10, 10, 10, 20, 30
521 dataformat_id | path | Yes | string | | |
535 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
536 :widths: 20, 10, 15, 15, 30, 25
538 owner | Yes | string | | | User ID
539 status | Yes | string | | {'enum': ['published', 'revoked']} | . . . . .[published] is the only status change supported right now
541 .. code-block:: javascript
544 "owner": "somestring",
545 "status": "published"
554 Success, Data Format status updated
563 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
567 .. code-block:: javascript
570 "message": "somestring"
579 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
583 .. code-block:: javascript
586 "message": "somestring"
592 Data Format not found in Catalog
595 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
599 .. code-block:: javascript
602 "message": "somestring"
608 Internal Server Error
625 Add a Component to the Catalog
635 .. code-block:: javascript
637 X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html
647 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
648 :widths: 20, 10, 15, 15, 30, 25
650 owner | No | string | | |
651 spec | No | :ref:`spec <i_793f480461dccbb35537f2001ab7af5b>` | | | The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
653 .. _i_793f480461dccbb35537f2001ab7af5b:
658 The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
662 .. code-block:: javascript
665 "owner": "somestring",
678 Type: :ref:`Component post <d_9eafe9d5168f431205b9fce1312b32bb>`
682 .. code-block:: javascript
685 "componentUrl": "somestring"
694 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
698 .. code-block:: javascript
701 "message": "somestring"
707 Component already exists
710 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
714 .. code-block:: javascript
717 "message": "somestring"
723 Internal Server Error
730 POST ``/dataformats``
731 ---------------------
740 Add a Data Format to the Catalog
750 .. code-block:: javascript
752 X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html
762 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
763 :widths: 20, 10, 15, 15, 30, 25
765 owner | No | string | | |
766 spec | No | :ref:`spec <i_24d5c9ce4ae509ac2272fb61bf0e2004>` | | | The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
768 .. _i_24d5c9ce4ae509ac2272fb61bf0e2004:
773 The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
777 .. code-block:: javascript
780 "owner": "somestring",
793 Type: :ref:`Data Format post <d_6557e42aae4abfe7f132d85f512a1a26>`
797 .. code-block:: javascript
800 "dataFormatUrl": "somestring"
809 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
813 .. code-block:: javascript
816 "message": "somestring"
822 Data Format already exists
825 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
829 .. code-block:: javascript
832 "message": "somestring"
838 Internal Server Error
845 PUT ``/components/{component_id}``
846 ----------------------------------
855 Replace a Component Spec in the Catalog
862 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
863 :widths: 20, 15, 10, 10, 10, 20, 30
865 component_id | path | Yes | string | | |
878 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
879 :widths: 20, 10, 15, 15, 30, 25
881 owner | No | string | | |
882 spec | No | :ref:`spec <i_793f480461dccbb35537f2001ab7af5c>` | | | The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
884 .. _i_793f480461dccbb35537f2001ab7af5c:
889 The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
893 .. code-block:: javascript
896 "owner": "somestring",
906 Success, Component replaced
915 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
919 .. code-block:: javascript
922 "message": "somestring"
928 Component not found in Catalog
931 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
935 .. code-block:: javascript
938 "message": "somestring"
944 Internal Server Error
951 PUT ``/dataformats/{dataformat_id}``
952 ------------------------------------
961 Replace a Data Format Spec in the Catalog
968 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
969 :widths: 20, 15, 10, 10, 10, 20, 30
971 dataformat_id | path | Yes | string | | |
984 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
985 :widths: 20, 10, 15, 15, 30, 25
987 owner | No | string | | |
988 spec | No | :ref:`spec <i_24d5c9ce4ae509ac2272fb61bf0e2004>` | | | The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
990 .. _i_24d5c9ce4ae509ac2272fb61bf0e2004:
995 The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
999 .. code-block:: javascript
1002 "owner": "somestring",
1012 Success, Data Format added
1021 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
1025 .. code-block:: javascript
1028 "message": "somestring"
1034 Data Format not found in Catalog
1037 Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>`
1041 .. code-block:: javascript
1044 "message": "somestring"
1050 Internal Server Error
1059 .. _d_53b82f243acb3fd79572e5a8e909c801:
1061 Component List Model Structure
1062 ------------------------------
1066 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1067 :widths: 20, 10, 15, 15, 30, 25
1069 components | No | array of :ref:`component fields <d_41cf5e14516a536474c8079d332e86c7>` | | |
1072 Component Spec Model Structure
1073 ------------------------------
1077 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1078 :widths: 20, 10, 15, 15, 30, 25
1080 owner | No | string | | |
1081 spec | No | :ref:`spec <i_793f480461dccbb35537f2001ab7af5v>` | | | The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
1083 .. _i_793f480461dccbb35537f2001ab7af5v:
1088 The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
1092 .. _d_9eafe9d5168f431205b9fce1312b32bb:
1094 Component post Model Structure
1095 ------------------------------
1099 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1100 :widths: 20, 10, 15, 15, 30, 25
1102 componentUrl | Yes | string | | | . . . . Url to the Component Specification
1104 .. _d_9479fe3b8fa2fcaeb723c198da99e791:
1106 Data Format List Model Structure
1107 --------------------------------
1111 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1112 :widths: 20, 10, 15, 15, 30, 25
1114 dataFormats | No | array of :ref:`dataformat fields <d_68ab1278c950fd214a4077565fd97922>` | | |
1117 Data Format Spec Model Structure
1118 --------------------------------
1122 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1123 :widths: 20, 10, 15, 15, 30, 25
1125 owner | No | string | | |
1126 spec | No | :ref:`spec <i_24d5c9ce4ae509ac2272fb61bf0e2003>` | | | The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
1128 .. _i_24d5c9ce4ae509ac2272fb61bf0e2003:
1133 The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
1137 .. _d_6557e42aae4abfe7f132d85f512a1a26:
1139 Data Format post Model Structure
1140 --------------------------------
1144 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1145 :widths: 20, 10, 15, 15, 30, 25
1147 dataFormatUrl | Yes | string | | | . . . . Url to the Data Format Specification
1149 .. _d_e8453714bcbe180e59d1dfbfc583c9cb:
1151 Error message Model Structure
1152 -----------------------------
1156 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1157 :widths: 20, 10, 15, 15, 30, 25
1159 message | No | string | | | . . . . .Details about the unsuccessful API request
1162 Patch Spec Model Structure
1163 --------------------------
1167 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1168 :widths: 20, 10, 15, 15, 30, 25
1170 owner | Yes | string | | | User ID
1171 status | Yes | string | | {'enum': ['published', 'revoked']} | . . . . .[published] is the only status change supported right now
1173 .. _d_41cf5e14516a536474c8079d332e86c7:
1175 component fields Model Structure
1176 --------------------------------
1180 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1181 :widths: 20, 10, 15, 15, 30, 25
1183 componentType | Yes | string | | | . . . . only 'docker'
1184 componentUrl | Yes | string | | | . . . . Url to the Component Specification
1185 description | Yes | string | | | . . . . Description of the component
1186 id | Yes | string | | | . . . . ID of the component
1187 modified | Yes | string | date-time | | . . . . When component was last modified
1188 name | Yes | string | | | . . . . Name of the component
1189 owner | Yes | string | | | . . . . ID of who added the component
1190 status | Yes | string | | | . . . . Status of the component
1191 version | Yes | string | | | . . . . Version of the component
1192 whenAdded | Yes | string | date-time | | . . . . When component was added to the Catalog
1194 .. _d_c86e31bb6b9a2aaf18cab261f501cdf1:
1196 component fields by id Model Structure
1197 --------------------------------------
1199 :ref:`component fields <d_41cf5e14516a536474c8079d332e86c7>` extended :ref:`inline <i_34dba329148d5512a1350568d728c028>`
1201 .. _i_34dba329148d5512a1350568d728c028:
1208 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1209 :widths: 20, 10, 15, 15, 30, 25
1211 componentType | Yes | string | | | . . . . only 'docker'
1212 componentUrl | Yes | string | | | . . . . Url to the Component Specification
1213 description | Yes | string | | | . . . . Description of the component
1214 id | Yes | string | | | . . . . ID of the component
1215 modified | Yes | string | date-time | | . . . . When component was last modified
1216 name | Yes | string | | | . . . . Name of the component
1217 owner | Yes | string | | | . . . . ID of who added the component
1218 spec | Yes | :ref:`spec <i_ea9c5ae5ca1fb737a10e33ba863d3d34>` | | | The Component Specification (json)
1219 status | Yes | string | | | . . . . Status of the component
1220 version | Yes | string | | | . . . . Version of the component
1221 whenAdded | Yes | string | date-time | | . . . . When component was added to the Catalog
1223 .. _i_ea9c5ae5ca1fb737a10e33ba863d3d34:
1228 The Component Specification (json)
1232 .. _d_68ab1278c950fd214a4077565fd97922:
1234 dataformat fields Model Structure
1235 ---------------------------------
1239 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1240 :widths: 20, 10, 15, 15, 30, 25
1242 dataFormatUrl | Yes | string | | | . . . . Url to the Data Format Specification
1243 description | Yes | string | | | . . . . Description of the data format
1244 id | Yes | string | | | . . . . ID of the data format
1245 modified | Yes | string | date-time | | . . . . When data format was last modified
1246 name | Yes | string | | | . . . . Name of the data format
1247 owner | Yes | string | | | . . . . ID of who added the data format
1248 status | Yes | string | | | . . . . Status of the data format
1249 version | Yes | string | | | . . . . Version of the data format
1250 whenAdded | Yes | string | date-time | | . . . . When data format was added to the Catalog
1252 .. _d_9c3ce799741cd0dae7f4d25c049e8a79:
1254 dataformat fields by id Model Structure
1255 ---------------------------------------
1257 :ref:`dataformat fields <d_68ab1278c950fd214a4077565fd97922>` extended :ref:`inline <i_19c008f5124504e9d9c719d157dab70f>`
1259 .. _i_19c008f5124504e9d9c719d157dab70f:
1266 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
1267 :widths: 20, 10, 15, 15, 30, 25
1269 dataFormatUrl | Yes | string | | | . . . . Url to the Data Format Specification
1270 description | Yes | string | | | . . . . Description of the data format
1271 id | Yes | string | | | . . . . ID of the data format
1272 modified | Yes | string | date-time | | . . . . When data format was last modified
1273 name | Yes | string | | | . . . . Name of the data format
1274 owner | Yes | string | | | . . . . ID of who added the data format
1275 spec | Yes | :ref:`spec <i_c9a99411463ded6c619772d83b3882c8>` | | | The Data Format Specification (json)
1276 status | Yes | string | | | . . . . Status of the data format
1277 version | Yes | string | | | . . . . Version of the data format
1278 whenAdded | Yes | string | date-time | | . . . . When data format was added to the Catalog
1280 .. _i_c9a99411463ded6c619772d83b3882c8:
1285 The Data Format Specification (json)