Vijay VK | 269194f | 2020-01-15 21:59:05 +0000 | [diff] [blame] | 1 | .. This work is licensed under a |
| 2 | Creative Commons Attribution 4.0 International License. |
| 3 | |
| 4 | Onboarding HTTP API (MOD) |
| 5 | ========================= |
| 6 | |
| 7 | .. toctree:: |
| 8 | :maxdepth: 3 |
| 9 | |
| 10 | |
| 11 | Description |
| 12 | ~~~~~~~~~~~ |
| 13 | |
| 14 | Onboarding API is sub-component under MOD provides following function: |
| 15 | |
| 16 | 1. API to add/update data-formats |
| 17 | 2. API to add/update components (component_Spec) |
| 18 | |
| 19 | These API can be invoked by MS owners or by Acumos adapter to upload artifact into MOD catalog |
| 20 | |
| 21 | .. csv-table:: |
| 22 | :header: "API name", "Swagger" |
| 23 | :widths: 10,5 |
| 24 | |
| 25 | "Inventory", ":download:`link <mod-onboardingapi.json>`" |
| 26 | |
| 27 | Base URL |
| 28 | ~~~~~~~~ |
| 29 | |
| 30 | http:///onboarding |
| 31 | |
| 32 | ONBOARDING |
| 33 | ~~~~~~~~~~ |
| 34 | |
| 35 | |
| 36 | Default namespace |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | GET ``/components/{component_id}`` |
| 43 | ---------------------------------- |
| 44 | |
| 45 | |
| 46 | |
| 47 | Description |
| 48 | +++++++++++ |
| 49 | |
| 50 | .. raw:: html |
| 51 | |
| 52 | Get a Component |
| 53 | |
| 54 | Parameters |
| 55 | ++++++++++ |
| 56 | |
| 57 | .. csv-table:: |
| 58 | :delim: | |
| 59 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 60 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 61 | |
| 62 | component_id | path | Yes | string | | | |
| 63 | |
| 64 | |
| 65 | Request |
| 66 | +++++++ |
| 67 | |
| 68 | |
| 69 | Headers |
| 70 | ^^^^^^^ |
| 71 | |
| 72 | .. code-block:: javascript |
| 73 | |
| 74 | X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html |
| 75 | |
| 76 | |
| 77 | Responses |
| 78 | +++++++++ |
| 79 | |
| 80 | **200** |
| 81 | ^^^^^^^ |
| 82 | |
| 83 | Success |
| 84 | |
| 85 | |
| 86 | Type: :ref:`component fields <d_41cf5e14516a536474c8079d332e86c7>` extended :ref:`inline <i_34dba329148d5512a1350568d728c028>` |
| 87 | |
| 88 | **Example:** |
| 89 | |
| 90 | .. code-block:: javascript |
| 91 | |
| 92 | { |
| 93 | "componentType": "somestring", |
| 94 | "componentUrl": "somestring", |
| 95 | "description": "somestring", |
| 96 | "id": "somestring", |
| 97 | "modified": "2015-01-01T15:00:00.000Z", |
| 98 | "name": "somestring", |
| 99 | "owner": "somestring", |
| 100 | "spec": {}, |
| 101 | "status": "somestring", |
| 102 | "version": "somestring", |
| 103 | "whenAdded": "2015-01-01T15:00:00.000Z" |
| 104 | } |
| 105 | |
| 106 | **404** |
| 107 | ^^^^^^^ |
| 108 | |
| 109 | Component not found in Catalog |
| 110 | |
| 111 | |
| 112 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 113 | |
| 114 | **Example:** |
| 115 | |
| 116 | .. code-block:: javascript |
| 117 | |
| 118 | { |
| 119 | "message": "somestring" |
| 120 | } |
| 121 | |
| 122 | **500** |
| 123 | ^^^^^^^ |
| 124 | |
| 125 | Internal Server Error |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | GET ``/components`` |
| 133 | ------------------- |
| 134 | |
| 135 | |
| 136 | |
| 137 | Description |
| 138 | +++++++++++ |
| 139 | |
| 140 | .. raw:: html |
| 141 | |
| 142 | Get list of Components in the catalog |
| 143 | |
| 144 | Parameters |
| 145 | ++++++++++ |
| 146 | |
| 147 | .. csv-table:: |
| 148 | :delim: | |
| 149 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 150 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 151 | |
| 152 | name | query | No | string | | | Name of component to filter for |
| 153 | version | query | No | string | | | Version of component to filter for |
| 154 | |
| 155 | |
| 156 | Request |
| 157 | +++++++ |
| 158 | |
| 159 | |
| 160 | Headers |
| 161 | ^^^^^^^ |
| 162 | |
| 163 | .. code-block:: javascript |
| 164 | |
| 165 | X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html |
| 166 | |
| 167 | |
| 168 | Responses |
| 169 | +++++++++ |
| 170 | |
| 171 | **200** |
| 172 | ^^^^^^^ |
| 173 | |
| 174 | Success |
| 175 | |
| 176 | |
| 177 | Type: :ref:`Component List <d_53b82f243acb3fd79572e5a8e909c801>` |
| 178 | |
| 179 | **Example:** |
| 180 | |
| 181 | .. code-block:: javascript |
| 182 | |
| 183 | { |
| 184 | "components": [ |
| 185 | { |
| 186 | "componentType": "somestring", |
| 187 | "componentUrl": "somestring", |
| 188 | "description": "somestring", |
| 189 | "id": "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" |
| 196 | }, |
| 197 | { |
| 198 | "componentType": "somestring", |
| 199 | "componentUrl": "somestring", |
| 200 | "description": "somestring", |
| 201 | "id": "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" |
| 208 | } |
| 209 | ] |
| 210 | } |
| 211 | |
| 212 | **500** |
| 213 | ^^^^^^^ |
| 214 | |
| 215 | Internal Server Error |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | GET ``/dataformats/{dataformat_id}`` |
| 223 | ------------------------------------ |
| 224 | |
| 225 | |
| 226 | |
| 227 | Description |
| 228 | +++++++++++ |
| 229 | |
| 230 | .. raw:: html |
| 231 | |
| 232 | Get a Data Format |
| 233 | |
| 234 | Parameters |
| 235 | ++++++++++ |
| 236 | |
| 237 | .. csv-table:: |
| 238 | :delim: | |
| 239 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 240 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 241 | |
| 242 | dataformat_id | path | Yes | string | | | |
| 243 | |
| 244 | |
| 245 | Request |
| 246 | +++++++ |
| 247 | |
| 248 | |
| 249 | Headers |
| 250 | ^^^^^^^ |
| 251 | |
| 252 | .. code-block:: javascript |
| 253 | |
| 254 | X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html |
| 255 | |
| 256 | |
| 257 | Responses |
| 258 | +++++++++ |
| 259 | |
| 260 | **200** |
| 261 | ^^^^^^^ |
| 262 | |
| 263 | Success |
| 264 | |
| 265 | |
| 266 | Type: :ref:`dataformat fields <d_68ab1278c950fd214a4077565fd97922>` extended :ref:`inline <i_19c008f5124504e9d9c719d157dab70f>` |
| 267 | |
| 268 | **Example:** |
| 269 | |
| 270 | .. code-block:: javascript |
| 271 | |
| 272 | { |
| 273 | "dataFormatUrl": "somestring", |
| 274 | "description": "somestring", |
| 275 | "id": "somestring", |
| 276 | "modified": "2015-01-01T15:00:00.000Z", |
| 277 | "name": "somestring", |
| 278 | "owner": "somestring", |
| 279 | "spec": {}, |
| 280 | "status": "somestring", |
| 281 | "version": "somestring", |
| 282 | "whenAdded": "2015-01-01T15:00:00.000Z" |
| 283 | } |
| 284 | |
| 285 | **404** |
| 286 | ^^^^^^^ |
| 287 | |
| 288 | Data Format not found in Catalog |
| 289 | |
| 290 | |
| 291 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 292 | |
| 293 | **Example:** |
| 294 | |
| 295 | .. code-block:: javascript |
| 296 | |
| 297 | { |
| 298 | "message": "somestring" |
| 299 | } |
| 300 | |
| 301 | **500** |
| 302 | ^^^^^^^ |
| 303 | |
| 304 | Internal Server Error |
| 305 | |
| 306 | |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | GET ``/dataformats`` |
| 312 | -------------------- |
| 313 | |
| 314 | |
| 315 | |
| 316 | Description |
| 317 | +++++++++++ |
| 318 | |
| 319 | .. raw:: html |
| 320 | |
| 321 | Get list of Data Formats in the catalog |
| 322 | |
| 323 | |
| 324 | Request |
| 325 | +++++++ |
| 326 | |
| 327 | |
| 328 | Headers |
| 329 | ^^^^^^^ |
| 330 | |
| 331 | .. code-block:: javascript |
| 332 | |
| 333 | X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html |
| 334 | |
| 335 | |
| 336 | Responses |
| 337 | +++++++++ |
| 338 | |
| 339 | **200** |
| 340 | ^^^^^^^ |
| 341 | |
| 342 | Success |
| 343 | |
| 344 | |
| 345 | Type: :ref:`Data Format List <d_9479fe3b8fa2fcaeb723c198da99e791>` |
| 346 | |
| 347 | **Example:** |
| 348 | |
| 349 | .. code-block:: javascript |
| 350 | |
| 351 | { |
| 352 | "dataFormats": [ |
| 353 | { |
| 354 | "dataFormatUrl": "somestring", |
| 355 | "description": "somestring", |
| 356 | "id": "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" |
| 363 | }, |
| 364 | { |
| 365 | "dataFormatUrl": "somestring", |
| 366 | "description": "somestring", |
| 367 | "id": "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" |
| 374 | } |
| 375 | ] |
| 376 | } |
| 377 | |
| 378 | **500** |
| 379 | ^^^^^^^ |
| 380 | |
| 381 | Internal Server Error |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | PATCH ``/components/{component_id}`` |
| 389 | ------------------------------------ |
| 390 | |
| 391 | |
| 392 | |
| 393 | Description |
| 394 | +++++++++++ |
| 395 | |
| 396 | .. raw:: html |
| 397 | |
| 398 | Update a Component's status in the Catalog |
| 399 | |
| 400 | Parameters |
| 401 | ++++++++++ |
| 402 | |
| 403 | .. csv-table:: |
| 404 | :delim: | |
| 405 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 406 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 407 | |
| 408 | component_id | path | Yes | string | | | |
| 409 | |
| 410 | |
| 411 | Request |
| 412 | +++++++ |
| 413 | |
| 414 | |
| 415 | |
| 416 | .. _d_fb61d9acd5848e8d882a33934d47ad4f: |
| 417 | |
| 418 | Body |
| 419 | ^^^^ |
| 420 | |
| 421 | .. csv-table:: |
| 422 | :delim: | |
| 423 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 424 | :widths: 20, 10, 15, 15, 30, 25 |
| 425 | |
| 426 | owner | Yes | string | | | User ID |
| 427 | status | Yes | string | | {'enum': ['published', 'revoked']} | . . . . .[published] is the only status change supported right now |
| 428 | |
| 429 | .. code-block:: javascript |
| 430 | |
| 431 | { |
| 432 | "owner": "somestring", |
| 433 | "status": "published" |
| 434 | } |
| 435 | |
| 436 | Responses |
| 437 | +++++++++ |
| 438 | |
| 439 | **200** |
| 440 | ^^^^^^^ |
| 441 | |
| 442 | Success, Component status updated |
| 443 | |
| 444 | |
| 445 | **400** |
| 446 | ^^^^^^^ |
| 447 | |
| 448 | Bad Request |
| 449 | |
| 450 | |
| 451 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 452 | |
| 453 | **Example:** |
| 454 | |
| 455 | .. code-block:: javascript |
| 456 | |
| 457 | { |
| 458 | "message": "somestring" |
| 459 | } |
| 460 | |
| 461 | **403** |
| 462 | ^^^^^^^ |
| 463 | |
| 464 | Forbidden Request |
| 465 | |
| 466 | |
| 467 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 468 | |
| 469 | **Example:** |
| 470 | |
| 471 | .. code-block:: javascript |
| 472 | |
| 473 | { |
| 474 | "message": "somestring" |
| 475 | } |
| 476 | |
| 477 | **404** |
| 478 | ^^^^^^^ |
| 479 | |
| 480 | Component not found in Catalog |
| 481 | |
| 482 | |
| 483 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 484 | |
| 485 | **Example:** |
| 486 | |
| 487 | .. code-block:: javascript |
| 488 | |
| 489 | { |
| 490 | "message": "somestring" |
| 491 | } |
| 492 | |
| 493 | **500** |
| 494 | ^^^^^^^ |
| 495 | |
| 496 | Internal Server Error |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | PATCH ``/dataformats/{dataformat_id}`` |
| 504 | -------------------------------------- |
| 505 | |
| 506 | |
| 507 | |
| 508 | Description |
| 509 | +++++++++++ |
| 510 | |
| 511 | .. raw:: html |
| 512 | |
| 513 | Update a Data Format's status in the Catalog |
| 514 | |
| 515 | Parameters |
| 516 | ++++++++++ |
| 517 | |
| 518 | .. csv-table:: |
| 519 | :delim: | |
| 520 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 521 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 522 | |
| 523 | dataformat_id | path | Yes | string | | | |
| 524 | |
| 525 | |
| 526 | Request |
| 527 | +++++++ |
| 528 | |
| 529 | |
| 530 | |
| 531 | .. _d_fb61d9acd5848e8d882a33934d47ad4f: |
| 532 | |
| 533 | Body |
| 534 | ^^^^ |
| 535 | |
| 536 | .. csv-table:: |
| 537 | :delim: | |
| 538 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 539 | :widths: 20, 10, 15, 15, 30, 25 |
| 540 | |
| 541 | owner | Yes | string | | | User ID |
| 542 | status | Yes | string | | {'enum': ['published', 'revoked']} | . . . . .[published] is the only status change supported right now |
| 543 | |
| 544 | .. code-block:: javascript |
| 545 | |
| 546 | { |
| 547 | "owner": "somestring", |
| 548 | "status": "published" |
| 549 | } |
| 550 | |
| 551 | Responses |
| 552 | +++++++++ |
| 553 | |
| 554 | **200** |
| 555 | ^^^^^^^ |
| 556 | |
| 557 | Success, Data Format status updated |
| 558 | |
| 559 | |
| 560 | **400** |
| 561 | ^^^^^^^ |
| 562 | |
| 563 | Bad Request |
| 564 | |
| 565 | |
| 566 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 567 | |
| 568 | **Example:** |
| 569 | |
| 570 | .. code-block:: javascript |
| 571 | |
| 572 | { |
| 573 | "message": "somestring" |
| 574 | } |
| 575 | |
| 576 | **403** |
| 577 | ^^^^^^^ |
| 578 | |
| 579 | Forbidden Request |
| 580 | |
| 581 | |
| 582 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 583 | |
| 584 | **Example:** |
| 585 | |
| 586 | .. code-block:: javascript |
| 587 | |
| 588 | { |
| 589 | "message": "somestring" |
| 590 | } |
| 591 | |
| 592 | **404** |
| 593 | ^^^^^^^ |
| 594 | |
| 595 | Data Format not found in Catalog |
| 596 | |
| 597 | |
| 598 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 599 | |
| 600 | **Example:** |
| 601 | |
| 602 | .. code-block:: javascript |
| 603 | |
| 604 | { |
| 605 | "message": "somestring" |
| 606 | } |
| 607 | |
| 608 | **500** |
| 609 | ^^^^^^^ |
| 610 | |
| 611 | Internal Server Error |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | POST ``/components`` |
| 619 | -------------------- |
| 620 | |
| 621 | |
| 622 | |
| 623 | Description |
| 624 | +++++++++++ |
| 625 | |
| 626 | .. raw:: html |
| 627 | |
| 628 | Add a Component to the Catalog |
| 629 | |
| 630 | |
| 631 | Request |
| 632 | +++++++ |
| 633 | |
| 634 | |
| 635 | Headers |
| 636 | ^^^^^^^ |
| 637 | |
| 638 | .. code-block:: javascript |
| 639 | |
| 640 | X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html |
| 641 | |
| 642 | |
| 643 | |
| 644 | .. _d_fd89ec3540efda71c3748235024e0b4d: |
| 645 | |
| 646 | Body |
| 647 | ^^^^ |
| 648 | |
| 649 | .. csv-table:: |
| 650 | :delim: | |
| 651 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 652 | :widths: 20, 10, 15, 15, 30, 25 |
| 653 | |
| 654 | owner | No | string | | | |
| 655 | 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 |
| 656 | |
| 657 | .. _i_793f480461dccbb35537f2001ab7af5b: |
| 658 | |
| 659 | **Spec schema:** |
| 660 | |
| 661 | |
| 662 | 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 |
| 663 | |
| 664 | |
| 665 | |
| 666 | .. code-block:: javascript |
| 667 | |
| 668 | { |
| 669 | "owner": "somestring", |
| 670 | "spec": {} |
| 671 | } |
| 672 | |
| 673 | Responses |
| 674 | +++++++++ |
| 675 | |
| 676 | **200** |
| 677 | ^^^^^^^ |
| 678 | |
| 679 | Success |
| 680 | |
| 681 | |
| 682 | Type: :ref:`Component post <d_9eafe9d5168f431205b9fce1312b32bb>` |
| 683 | |
| 684 | **Example:** |
| 685 | |
| 686 | .. code-block:: javascript |
| 687 | |
| 688 | { |
| 689 | "componentUrl": "somestring" |
| 690 | } |
| 691 | |
| 692 | **400** |
| 693 | ^^^^^^^ |
| 694 | |
| 695 | Bad Request |
| 696 | |
| 697 | |
| 698 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 699 | |
| 700 | **Example:** |
| 701 | |
| 702 | .. code-block:: javascript |
| 703 | |
| 704 | { |
| 705 | "message": "somestring" |
| 706 | } |
| 707 | |
| 708 | **409** |
| 709 | ^^^^^^^ |
| 710 | |
| 711 | Component already exists |
| 712 | |
| 713 | |
| 714 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 715 | |
| 716 | **Example:** |
| 717 | |
| 718 | .. code-block:: javascript |
| 719 | |
| 720 | { |
| 721 | "message": "somestring" |
| 722 | } |
| 723 | |
| 724 | **500** |
| 725 | ^^^^^^^ |
| 726 | |
| 727 | Internal Server Error |
| 728 | |
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 | POST ``/dataformats`` |
| 735 | --------------------- |
| 736 | |
| 737 | |
| 738 | |
| 739 | Description |
| 740 | +++++++++++ |
| 741 | |
| 742 | .. raw:: html |
| 743 | |
| 744 | Add a Data Format to the Catalog |
| 745 | |
| 746 | |
| 747 | Request |
| 748 | +++++++ |
| 749 | |
| 750 | |
| 751 | Headers |
| 752 | ^^^^^^^ |
| 753 | |
| 754 | .. code-block:: javascript |
| 755 | |
| 756 | X-Fields: An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html |
| 757 | |
| 758 | |
| 759 | |
| 760 | .. _d_7a085a9ab5ed1527229588d3b6d2c4c2: |
| 761 | |
| 762 | Body |
| 763 | ^^^^ |
| 764 | |
| 765 | .. csv-table:: |
| 766 | :delim: | |
| 767 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 768 | :widths: 20, 10, 15, 15, 30, 25 |
| 769 | |
| 770 | owner | No | string | | | |
| 771 | 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 |
| 772 | |
| 773 | .. _i_24d5c9ce4ae509ac2272fb61bf0e2003: |
| 774 | |
| 775 | **Spec schema:** |
| 776 | |
| 777 | |
| 778 | 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 |
| 779 | |
| 780 | |
| 781 | |
| 782 | .. code-block:: javascript |
| 783 | |
| 784 | { |
| 785 | "owner": "somestring", |
| 786 | "spec": {} |
| 787 | } |
| 788 | |
| 789 | Responses |
| 790 | +++++++++ |
| 791 | |
| 792 | **200** |
| 793 | ^^^^^^^ |
| 794 | |
| 795 | Success |
| 796 | |
| 797 | |
| 798 | Type: :ref:`Data Format post <d_6557e42aae4abfe7f132d85f512a1a26>` |
| 799 | |
| 800 | **Example:** |
| 801 | |
| 802 | .. code-block:: javascript |
| 803 | |
| 804 | { |
| 805 | "dataFormatUrl": "somestring" |
| 806 | } |
| 807 | |
| 808 | **400** |
| 809 | ^^^^^^^ |
| 810 | |
| 811 | Bad Request |
| 812 | |
| 813 | |
| 814 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 815 | |
| 816 | **Example:** |
| 817 | |
| 818 | .. code-block:: javascript |
| 819 | |
| 820 | { |
| 821 | "message": "somestring" |
| 822 | } |
| 823 | |
| 824 | **409** |
| 825 | ^^^^^^^ |
| 826 | |
| 827 | Data Format already exists |
| 828 | |
| 829 | |
| 830 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 831 | |
| 832 | **Example:** |
| 833 | |
| 834 | .. code-block:: javascript |
| 835 | |
| 836 | { |
| 837 | "message": "somestring" |
| 838 | } |
| 839 | |
| 840 | **500** |
| 841 | ^^^^^^^ |
| 842 | |
| 843 | Internal Server Error |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | PUT ``/components/{component_id}`` |
| 851 | ---------------------------------- |
| 852 | |
| 853 | |
| 854 | |
| 855 | Description |
| 856 | +++++++++++ |
| 857 | |
| 858 | .. raw:: html |
| 859 | |
| 860 | Replace a Component Spec in the Catalog |
| 861 | |
| 862 | Parameters |
| 863 | ++++++++++ |
| 864 | |
| 865 | .. csv-table:: |
| 866 | :delim: | |
| 867 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 868 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 869 | |
| 870 | component_id | path | Yes | string | | | |
| 871 | |
| 872 | |
| 873 | Request |
| 874 | +++++++ |
| 875 | |
| 876 | |
| 877 | |
| 878 | .. _d_fd89ec3540efda71c3748235024e0b4d: |
| 879 | |
| 880 | Body |
| 881 | ^^^^ |
| 882 | |
| 883 | .. csv-table:: |
| 884 | :delim: | |
| 885 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 886 | :widths: 20, 10, 15, 15, 30, 25 |
| 887 | |
| 888 | owner | No | string | | | |
| 889 | 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 |
| 890 | |
| 891 | .. _i_793f480461dccbb35537f2001ab7af5b: |
| 892 | |
| 893 | **Spec schema:** |
| 894 | |
| 895 | |
| 896 | 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 |
| 897 | |
| 898 | |
| 899 | |
| 900 | .. code-block:: javascript |
| 901 | |
| 902 | { |
| 903 | "owner": "somestring", |
| 904 | "spec": {} |
| 905 | } |
| 906 | |
| 907 | Responses |
| 908 | +++++++++ |
| 909 | |
| 910 | **200** |
| 911 | ^^^^^^^ |
| 912 | |
| 913 | Success, Component replaced |
| 914 | |
| 915 | |
| 916 | **400** |
| 917 | ^^^^^^^ |
| 918 | |
| 919 | Bad Request |
| 920 | |
| 921 | |
| 922 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 923 | |
| 924 | **Example:** |
| 925 | |
| 926 | .. code-block:: javascript |
| 927 | |
| 928 | { |
| 929 | "message": "somestring" |
| 930 | } |
| 931 | |
| 932 | **404** |
| 933 | ^^^^^^^ |
| 934 | |
| 935 | Component not found in Catalog |
| 936 | |
| 937 | |
| 938 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 939 | |
| 940 | **Example:** |
| 941 | |
| 942 | .. code-block:: javascript |
| 943 | |
| 944 | { |
| 945 | "message": "somestring" |
| 946 | } |
| 947 | |
| 948 | **500** |
| 949 | ^^^^^^^ |
| 950 | |
| 951 | Internal Server Error |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | PUT ``/dataformats/{dataformat_id}`` |
| 959 | ------------------------------------ |
| 960 | |
| 961 | |
| 962 | |
| 963 | Description |
| 964 | +++++++++++ |
| 965 | |
| 966 | .. raw:: html |
| 967 | |
| 968 | Replace a Data Format Spec in the Catalog |
| 969 | |
| 970 | Parameters |
| 971 | ++++++++++ |
| 972 | |
| 973 | .. csv-table:: |
| 974 | :delim: | |
| 975 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 976 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 977 | |
| 978 | dataformat_id | path | Yes | string | | | |
| 979 | |
| 980 | |
| 981 | Request |
| 982 | +++++++ |
| 983 | |
| 984 | |
| 985 | |
| 986 | .. _d_7a085a9ab5ed1527229588d3b6d2c4c2: |
| 987 | |
| 988 | Body |
| 989 | ^^^^ |
| 990 | |
| 991 | .. csv-table:: |
| 992 | :delim: | |
| 993 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 994 | :widths: 20, 10, 15, 15, 30, 25 |
| 995 | |
| 996 | owner | No | string | | | |
| 997 | 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 |
| 998 | |
| 999 | .. _i_24d5c9ce4ae509ac2272fb61bf0e2003: |
| 1000 | |
| 1001 | **Spec schema:** |
| 1002 | |
| 1003 | |
| 1004 | 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 |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | .. code-block:: javascript |
| 1009 | |
| 1010 | { |
| 1011 | "owner": "somestring", |
| 1012 | "spec": {} |
| 1013 | } |
| 1014 | |
| 1015 | Responses |
| 1016 | +++++++++ |
| 1017 | |
| 1018 | **200** |
| 1019 | ^^^^^^^ |
| 1020 | |
| 1021 | Success, Data Format added |
| 1022 | |
| 1023 | |
| 1024 | **400** |
| 1025 | ^^^^^^^ |
| 1026 | |
| 1027 | Bad Request |
| 1028 | |
| 1029 | |
| 1030 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 1031 | |
| 1032 | **Example:** |
| 1033 | |
| 1034 | .. code-block:: javascript |
| 1035 | |
| 1036 | { |
| 1037 | "message": "somestring" |
| 1038 | } |
| 1039 | |
| 1040 | **404** |
| 1041 | ^^^^^^^ |
| 1042 | |
| 1043 | Data Format not found in Catalog |
| 1044 | |
| 1045 | |
| 1046 | Type: :ref:`Error message <d_e8453714bcbe180e59d1dfbfc583c9cb>` |
| 1047 | |
| 1048 | **Example:** |
| 1049 | |
| 1050 | .. code-block:: javascript |
| 1051 | |
| 1052 | { |
| 1053 | "message": "somestring" |
| 1054 | } |
| 1055 | |
| 1056 | **500** |
| 1057 | ^^^^^^^ |
| 1058 | |
| 1059 | Internal Server Error |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | Data Structures |
| 1066 | ~~~~~~~~~~~~~~~ |
| 1067 | |
| 1068 | .. _d_53b82f243acb3fd79572e5a8e909c801: |
| 1069 | |
| 1070 | Component List Model Structure |
| 1071 | ------------------------------ |
| 1072 | |
| 1073 | .. csv-table:: |
| 1074 | :delim: | |
| 1075 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1076 | :widths: 20, 10, 15, 15, 30, 25 |
| 1077 | |
| 1078 | components | No | array of :ref:`component fields <d_41cf5e14516a536474c8079d332e86c7>` | | | |
| 1079 | |
| 1080 | .. _d_fd89ec3540efda71c3748235024e0b4d: |
| 1081 | |
| 1082 | Component Spec Model Structure |
| 1083 | ------------------------------ |
| 1084 | |
| 1085 | .. csv-table:: |
| 1086 | :delim: | |
| 1087 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1088 | :widths: 20, 10, 15, 15, 30, 25 |
| 1089 | |
| 1090 | owner | No | string | | | |
| 1091 | 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 |
| 1092 | |
| 1093 | .. _i_793f480461dccbb35537f2001ab7af5b: |
| 1094 | |
| 1095 | **Spec schema:** |
| 1096 | |
| 1097 | |
| 1098 | 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 |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | .. _d_9eafe9d5168f431205b9fce1312b32bb: |
| 1103 | |
| 1104 | Component post Model Structure |
| 1105 | ------------------------------ |
| 1106 | |
| 1107 | .. csv-table:: |
| 1108 | :delim: | |
| 1109 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1110 | :widths: 20, 10, 15, 15, 30, 25 |
| 1111 | |
| 1112 | componentUrl | Yes | string | | | . . . . Url to the Component Specification |
| 1113 | |
| 1114 | .. _d_9479fe3b8fa2fcaeb723c198da99e791: |
| 1115 | |
| 1116 | Data Format List Model Structure |
| 1117 | -------------------------------- |
| 1118 | |
| 1119 | .. csv-table:: |
| 1120 | :delim: | |
| 1121 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1122 | :widths: 20, 10, 15, 15, 30, 25 |
| 1123 | |
| 1124 | dataFormats | No | array of :ref:`dataformat fields <d_68ab1278c950fd214a4077565fd97922>` | | | |
| 1125 | |
| 1126 | .. _d_7a085a9ab5ed1527229588d3b6d2c4c2: |
| 1127 | |
| 1128 | Data Format Spec Model Structure |
| 1129 | -------------------------------- |
| 1130 | |
| 1131 | .. csv-table:: |
| 1132 | :delim: | |
| 1133 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1134 | :widths: 20, 10, 15, 15, 30, 25 |
| 1135 | |
| 1136 | owner | No | string | | | |
| 1137 | 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 |
| 1138 | |
| 1139 | .. _i_24d5c9ce4ae509ac2272fb61bf0e2003: |
| 1140 | |
| 1141 | **Spec schema:** |
| 1142 | |
| 1143 | |
| 1144 | 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 |
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | .. _d_6557e42aae4abfe7f132d85f512a1a26: |
| 1149 | |
| 1150 | Data Format post Model Structure |
| 1151 | -------------------------------- |
| 1152 | |
| 1153 | .. csv-table:: |
| 1154 | :delim: | |
| 1155 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1156 | :widths: 20, 10, 15, 15, 30, 25 |
| 1157 | |
| 1158 | dataFormatUrl | Yes | string | | | . . . . Url to the Data Format Specification |
| 1159 | |
| 1160 | .. _d_e8453714bcbe180e59d1dfbfc583c9cb: |
| 1161 | |
| 1162 | Error message Model Structure |
| 1163 | ----------------------------- |
| 1164 | |
| 1165 | .. csv-table:: |
| 1166 | :delim: | |
| 1167 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1168 | :widths: 20, 10, 15, 15, 30, 25 |
| 1169 | |
| 1170 | message | No | string | | | . . . . .Details about the unsuccessful API request |
| 1171 | |
| 1172 | .. _d_fb61d9acd5848e8d882a33934d47ad4f: |
| 1173 | |
| 1174 | Patch Spec Model Structure |
| 1175 | -------------------------- |
| 1176 | |
| 1177 | .. csv-table:: |
| 1178 | :delim: | |
| 1179 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1180 | :widths: 20, 10, 15, 15, 30, 25 |
| 1181 | |
| 1182 | owner | Yes | string | | | User ID |
| 1183 | status | Yes | string | | {'enum': ['published', 'revoked']} | . . . . .[published] is the only status change supported right now |
| 1184 | |
| 1185 | .. _d_41cf5e14516a536474c8079d332e86c7: |
| 1186 | |
| 1187 | component fields Model Structure |
| 1188 | -------------------------------- |
| 1189 | |
| 1190 | .. csv-table:: |
| 1191 | :delim: | |
| 1192 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1193 | :widths: 20, 10, 15, 15, 30, 25 |
| 1194 | |
| 1195 | componentType | Yes | string | | | . . . . only 'docker' |
| 1196 | componentUrl | Yes | string | | | . . . . Url to the Component Specification |
| 1197 | description | Yes | string | | | . . . . Description of the component |
| 1198 | id | Yes | string | | | . . . . ID of the component |
| 1199 | modified | Yes | string | date-time | | . . . . When component was last modified |
| 1200 | name | Yes | string | | | . . . . Name of the component |
| 1201 | owner | Yes | string | | | . . . . ID of who added the component |
| 1202 | status | Yes | string | | | . . . . Status of the component |
| 1203 | version | Yes | string | | | . . . . Version of the component |
| 1204 | whenAdded | Yes | string | date-time | | . . . . When component was added to the Catalog |
| 1205 | |
| 1206 | .. _d_c86e31bb6b9a2aaf18cab261f501cdf1: |
| 1207 | |
| 1208 | component fields by id Model Structure |
| 1209 | -------------------------------------- |
| 1210 | |
| 1211 | :ref:`component fields <d_41cf5e14516a536474c8079d332e86c7>` extended :ref:`inline <i_34dba329148d5512a1350568d728c028>` |
| 1212 | |
| 1213 | .. _i_34dba329148d5512a1350568d728c028: |
| 1214 | |
| 1215 | **Inline schema:** |
| 1216 | |
| 1217 | |
| 1218 | .. csv-table:: |
| 1219 | :delim: | |
| 1220 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1221 | :widths: 20, 10, 15, 15, 30, 25 |
| 1222 | |
| 1223 | componentType | Yes | string | | | . . . . only 'docker' |
| 1224 | componentUrl | Yes | string | | | . . . . Url to the Component Specification |
| 1225 | description | Yes | string | | | . . . . Description of the component |
| 1226 | id | Yes | string | | | . . . . ID of the component |
| 1227 | modified | Yes | string | date-time | | . . . . When component was last modified |
| 1228 | name | Yes | string | | | . . . . Name of the component |
| 1229 | owner | Yes | string | | | . . . . ID of who added the component |
| 1230 | spec | Yes | :ref:`spec <i_ea9c5ae5ca1fb737a10e33ba863d3d34>` | | | The Component Specification (json) |
| 1231 | status | Yes | string | | | . . . . Status of the component |
| 1232 | version | Yes | string | | | . . . . Version of the component |
| 1233 | whenAdded | Yes | string | date-time | | . . . . When component was added to the Catalog |
| 1234 | |
| 1235 | .. _i_ea9c5ae5ca1fb737a10e33ba863d3d34: |
| 1236 | |
| 1237 | **Spec schema:** |
| 1238 | |
| 1239 | |
| 1240 | The Component Specification (json) |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | .. _d_68ab1278c950fd214a4077565fd97922: |
| 1245 | |
| 1246 | dataformat fields Model Structure |
| 1247 | --------------------------------- |
| 1248 | |
| 1249 | .. csv-table:: |
| 1250 | :delim: | |
| 1251 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1252 | :widths: 20, 10, 15, 15, 30, 25 |
| 1253 | |
| 1254 | dataFormatUrl | Yes | string | | | . . . . Url to the Data Format Specification |
| 1255 | description | Yes | string | | | . . . . Description of the data format |
| 1256 | id | Yes | string | | | . . . . ID of the data format |
| 1257 | modified | Yes | string | date-time | | . . . . When data format was last modified |
| 1258 | name | Yes | string | | | . . . . Name of the data format |
| 1259 | owner | Yes | string | | | . . . . ID of who added the data format |
| 1260 | status | Yes | string | | | . . . . Status of the data format |
| 1261 | version | Yes | string | | | . . . . Version of the data format |
| 1262 | whenAdded | Yes | string | date-time | | . . . . When data format was added to the Catalog |
| 1263 | |
| 1264 | .. _d_9c3ce799741cd0dae7f4d25c049e8a79: |
| 1265 | |
| 1266 | dataformat fields by id Model Structure |
| 1267 | --------------------------------------- |
| 1268 | |
| 1269 | :ref:`dataformat fields <d_68ab1278c950fd214a4077565fd97922>` extended :ref:`inline <i_19c008f5124504e9d9c719d157dab70f>` |
| 1270 | |
| 1271 | .. _i_19c008f5124504e9d9c719d157dab70f: |
| 1272 | |
| 1273 | **Inline schema:** |
| 1274 | |
| 1275 | |
| 1276 | .. csv-table:: |
| 1277 | :delim: | |
| 1278 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 1279 | :widths: 20, 10, 15, 15, 30, 25 |
| 1280 | |
| 1281 | dataFormatUrl | Yes | string | | | . . . . Url to the Data Format Specification |
| 1282 | description | Yes | string | | | . . . . Description of the data format |
| 1283 | id | Yes | string | | | . . . . ID of the data format |
| 1284 | modified | Yes | string | date-time | | . . . . When data format was last modified |
| 1285 | name | Yes | string | | | . . . . Name of the data format |
| 1286 | owner | Yes | string | | | . . . . ID of who added the data format |
| 1287 | spec | Yes | :ref:`spec <i_c9a99411463ded6c619772d83b3882c8>` | | | The Data Format Specification (json) |
| 1288 | status | Yes | string | | | . . . . Status of the data format |
| 1289 | version | Yes | string | | | . . . . Version of the data format |
| 1290 | whenAdded | Yes | string | date-time | | . . . . When data format was added to the Catalog |
| 1291 | |
| 1292 | .. _i_c9a99411463ded6c619772d83b3882c8: |
| 1293 | |
| 1294 | **Spec schema:** |
| 1295 | |
| 1296 | |
| 1297 | The Data Format Specification (json) |