7188dc7f9b7c67b18608a62819a6d8ffffbc41be
[vfc/nfvo/lcm.git] / docs / platform / APIs / NSLCM_API / NSLCM_API_Specification_v0.1.rst
1 \r
2 \r
3 Network services lifecycle management northbound APIs\r
4 ==========\r
5 \r
6  {\r
7    "swagger": "2.0",\r
8 \r
9    "info": {\r
10 \r
11      "version": "1.0.0",\r
12 \r
13      "title": "ONAP VFC Network Service Lifecycle Management API",\r
14 \r
15      "description": "VFC Network Service Lifecycle Management Rest API.",\r
16 \r
17      "contact": {\r
18 \r
19        "name": "ONAP VFC team",\r
20 \r
21        "email": "onap-discuss@lists.onap.org",\r
22 \r
23        "url": "https://gerrit.onap.org/r/#/admin/projects/vfc/nfvo/lcm"\r
24 \r
25      }\r
26 \r
27    },\r
28 \r
29    "basePath": "/api/nslcm/v1",\r
30 \r
31    "schemes": [\r
32 \r
33      "http",\r
34      "https"\r
35 \r
36    ],\r
37 \r
38    "consumes": [\r
39 \r
40      "application/json"\r
41 \r
42    ],\r
43    "produces": [\r
44 \r
45      "application/json"\r
46 \r
47    ],\r
48    "paths": {\r
49 \r
50      "/ns": {\r
51 \r
52        "post": {\r
53 \r
54          "tags": [\r
55 \r
56            "ns"\r
57 \r
58          ],\r
59          "summary": "ns create",\r
60 \r
61          "description": "ns create",\r
62 \r
63          "operationId": "ns_create",\r
64 \r
65          "parameters": [\r
66 \r
67            {\r
68 \r
69              "in": "body",\r
70 \r
71              "name": "NSCreateRequest",\r
72 \r
73              "description": "NS Instance Create Request",\r
74 \r
75              "required": true,\r
76 \r
77              "schema": {\r
78 \r
79                "$ref": "#/definitions/NsCreateRequest"\r
80 \r
81              }\r
82 \r
83            }\r
84 \r
85          ],\r
86 \r
87          "responses": {\r
88 \r
89            "200": {\r
90 \r
91              "description": "successful operation",\r
92 \r
93              "schema": {\r
94 \r
95                "$ref": "#/definitions/NsCreateResponse"\r
96 \r
97              }\r
98 \r
99            }\r
100 \r
101          }\r
102 \r
103        },\r
104 \r
105        "get": {\r
106 \r
107          "tags": [\r
108 \r
109            "ns"\r
110 \r
111          ],\r
112 \r
113          "summary": "ns get",\r
114 \r
115          "description": "ns get",\r
116 \r
117          "operationId": "ns_get",\r
118 \r
119          "parameters": [],\r
120 \r
121          "responses": {\r
122 \r
123            "200": {\r
124 \r
125              "description": "successful operation",\r
126 \r
127              "schema": {\r
128 \r
129                "$ref": "#/definitions/NsInfo"\r
130 \r
131              }\r
132 \r
133            }\r
134 \r
135          }\r
136 \r
137        }\r
138 \r
139      },\r
140 \r
141      "/ns/{nsInstanceId}/Instantiate": {\r
142 \r
143        "post": {\r
144 \r
145          "tags": [\r
146 \r
147            "ns"\r
148 \r
149          ],\r
150 \r
151          "summary": "ns Instantiate",\r
152 \r
153          "description": "ns Instantiate",\r
154 \r
155          "operationId": "ns_Instantiate",\r
156 \r
157          "parameters": [\r
158 \r
159            {\r
160              "required": true,\r
161 \r
162              "type": "string",\r
163 \r
164              "description": "",\r
165 \r
166              "name": "nsInstanceId",\r
167 \r
168              "in": "path"\r
169 \r
170            },\r
171            {\r
172 \r
173              "in": "body",\r
174 \r
175              "name": "NSInstantiateRequest",\r
176 \r
177              "description": "NS Instantiate Request Body",\r
178 \r
179              "required": true,\r
180 \r
181              "schema": {\r
182 \r
183                "$ref": "#/definitions/NsInstantiateRequest"\r
184 \r
185              }\r
186 \r
187            }\r
188 \r
189          ],\r
190 \r
191          "responses": {\r
192 \r
193            "200": {\r
194 \r
195              "description": "",\r
196 \r
197              "schema": {\r
198 \r
199                "$ref": "#/definitions/JobInfo"\r
200 \r
201              }\r
202 \r
203            },\r
204 \r
205            "201": {\r
206 \r
207              "description": "Invalid Request"\r
208 \r
209            }\r
210 \r
211          }\r
212 \r
213        }\r
214 \r
215      },\r
216 \r
217      "/ns/{nsInstanceId}/scale": {\r
218 \r
219        "post": {\r
220 \r
221          "tags": [\r
222 \r
223            "ns"\r
224 \r
225          ],\r
226 \r
227          "summary": "ns scale",\r
228 \r
229          "description": "ns scale",\r
230 \r
231          "operationId": "ns_scale",\r
232 \r
233          "parameters": [\r
234 \r
235            {\r
236 \r
237              "required": true,\r
238 \r
239              "type": "string",\r
240 \r
241              "description": "",\r
242 \r
243              "name": "nsInstanceId",\r
244 \r
245              "in": "path"\r
246 \r
247            },\r
248 \r
249            {\r
250 \r
251              "in": "body",\r
252 \r
253              "name": "ScaleNSRequest",\r
254 \r
255              "description": "Scale NS Request Body",\r
256 \r
257              "required": true,\r
258 \r
259              "schema": {\r
260 \r
261                "$ref": "#/definitions/NsScaleRequest"\r
262 \r
263              }\r
264 \r
265            }\r
266 \r
267          ],\r
268 \r
269          "responses": {\r
270 \r
271            "200": {\r
272 \r
273              "description": "",\r
274 \r
275              "schema": {\r
276 \r
277                "$ref": "#/definitions/JobInfo"\r
278 \r
279              }\r
280 \r
281            },\r
282 \r
283            "201": {\r
284 \r
285              "description": "Invalid Request"\r
286 \r
287            }\r
288 \r
289          }\r
290 \r
291        }\r
292 \r
293      },\r
294 \r
295      "/ns/{ns_instance_id}/heal": {\r
296 \r
297        "post": {\r
298 \r
299          "tags": [\r
300 \r
301            "ns"\r
302 \r
303          ],\r
304 \r
305          "summary": "ns heal",\r
306 \r
307          "description": "ns heal",\r
308 \r
309          "operationId": "ns_heal",\r
310 \r
311          "parameters": [\r
312 \r
313            {\r
314              "required": true,\r
315 \r
316              "type": "string",\r
317 \r
318              "description": "Identifier of the NS instance.",\r
319 \r
320              "name": "ns_instance_id",\r
321 \r
322              "in": "path"\r
323 \r
324            },\r
325 \r
326            {\r
327 \r
328              "in": "body",\r
329 \r
330              "name": "healVnfData",\r
331 \r
332              "description": "healVnfData",\r
333 \r
334              "required": true,\r
335 \r
336              "schema": {\r
337 \r
338                "$ref": "#/definitions/NsHealRequest"\r
339 \r
340              }\r
341 \r
342            }\r
343 \r
344          ],\r
345 \r
346          "responses": {\r
347 \r
348            "202": {\r
349 \r
350              "description": "",\r
351 \r
352              "schema": {\r
353 \r
354                "$ref": "#/definitions/JobInfo"\r
355 \r
356              }\r
357 \r
358            },\r
359 \r
360            "500": {\r
361 \r
362              "description": "the url is invalid"\r
363 \r
364            }\r
365 \r
366          }\r
367 \r
368        }\r
369 \r
370      },\r
371 \r
372      "/ns/{ns_instance_id}/terminate": {\r
373 \r
374        "post": {\r
375 \r
376          "tags": [\r
377 \r
378            "ns"\r
379 \r
380          ],\r
381 \r
382          "summary": "ns terminate",\r
383 \r
384          "description": "ns terminate",\r
385 \r
386          "operationId": "ns_terminate",\r
387 \r
388          "parameters": [\r
389 \r
390            {\r
391 \r
392              "required": true,\r
393 \r
394              "type": "string",\r
395 \r
396              "description": "Identifier of the NS instance.",\r
397 \r
398              "name": "ns_instance_id",\r
399 \r
400              "in": "path"\r
401 \r
402            },\r
403 \r
404            {\r
405              "in": "body",\r
406 \r
407              "name": "NsTerminateRequest",\r
408 \r
409              "description": "NsTerminateRequest",\r
410 \r
411              "required": true,\r
412 \r
413              "schema": {\r
414 \r
415                "$ref": "#/definitions/NsTerminateRequest"\r
416 \r
417              }\r
418 \r
419            }\r
420 \r
421          ],\r
422 \r
423          "responses": {\r
424 \r
425            "202": {\r
426 \r
427              "description": "",\r
428 \r
429              "schema": {\r
430 \r
431                "$ref": "#/definitions/JobInfo"\r
432 \r
433              }\r
434 \r
435            },\r
436 \r
437            "500": {\r
438 \r
439              "description": "the url is invalid"\r
440 \r
441            }\r
442 \r
443          }\r
444 \r
445        }\r
446 \r
447      },\r
448      "/ns/{ns_instance_id}": {\r
449 \r
450        "delete": {\r
451 \r
452          "tags": [\r
453 \r
454            "ns"\r
455 \r
456          ],\r
457 \r
458          "summary": "ns delete",\r
459 \r
460          "description": "ns delete",\r
461 \r
462          "operationId": "ns_delete",\r
463 \r
464          "parameters": [\r
465 \r
466            {\r
467              "required": true,\r
468 \r
469              "type": "string",\r
470 \r
471              "description": "Identifier of the NS instance.",\r
472 \r
473              "name": "ns_instance_id",\r
474 \r
475              "in": "path"\r
476 \r
477            }\r
478 \r
479          ],\r
480 \r
481          "responses": {\r
482 \r
483            "204": {\r
484 \r
485              "description": "The NS instance resource and the associated NS identifier were deleted successfully."\r
486 \r
487            }\r
488 \r
489          }\r
490 \r
491        }\r
492 \r
493      },\r
494 \r
495      "/jobs/{jobId}": {\r
496 \r
497        "post": {\r
498 \r
499          "tags": [\r
500 \r
501            "job"\r
502 \r
503          ],\r
504 \r
505          "summary": "jobstatus",\r
506 \r
507          "description": "",\r
508 \r
509          "operationId": "jobstatus",\r
510 \r
511          "parameters": [\r
512 \r
513            {\r
514              "required": true,\r
515 \r
516              "type": "string",\r
517 \r
518              "description": "",\r
519 \r
520              "name": "jobId",\r
521 \r
522              "in": "path"\r
523 \r
524            },\r
525 \r
526            {\r
527 \r
528              "in": "body",\r
529 \r
530              "name": "body",\r
531 \r
532              "description": "request param",\r
533 \r
534              "required": true,\r
535 \r
536              "schema": {\r
537 \r
538                "$ref": "#/definitions/JobProgressRequest"\r
539 \r
540              }\r
541 \r
542            }\r
543 \r
544          ],\r
545 \r
546          "responses": {\r
547 \r
548            "202": {\r
549 \r
550              "description": ""\r
551 \r
552            }\r
553 \r
554          }\r
555 \r
556        }\r
557 \r
558      }\r
559 \r
560    },\r
561 \r
562    "definitions": {\r
563 \r
564      "NsCreateRequest": {\r
565 \r
566        "type": "object",\r
567 \r
568        "properties": {\r
569 \r
570          "context":{\r
571 \r
572             "type": "object",\r
573 \r
574             "properties": {\r
575 \r
576               "globalCustomerId":{\r
577 \r
578                  "type": "string",\r
579                  "description": "the global customer id"\r
580 \r
581               },\r
582 \r
583               "serviceType":{\r
584                  "type": "string",\r
585 \r
586                  "description": "service type"\r
587 \r
588               }\r
589 \r
590             }\r
591 \r
592          },\r
593 \r
594          "csarId": {\r
595 \r
596            "type": "string",\r
597 \r
598            "description": "the NS package ID"\r
599 \r
600          },\r
601 \r
602          "nsName": {\r
603 \r
604            "type": "string"\r
605 \r
606          },\r
607 \r
608          "description": {\r
609 \r
610            "type": "string"\r
611 \r
612          }\r
613 \r
614        }\r
615 \r
616      },\r
617 \r
618      "NsCreateResponse": {\r
619 \r
620        "type": "object",\r
621 \r
622        "properties": {\r
623 \r
624          "nsInstanceId": {\r
625 \r
626            "type": "string"\r
627 \r
628          }\r
629 \r
630        }\r
631 \r
632      },\r
633      "NsInstantiateRequest": {\r
634 \r
635        "type": "object",\r
636 \r
637        "properties": {\r
638 \r
639          "LocationConstraints": {\r
640 \r
641            "type": "array",\r
642 \r
643            "items": {\r
644 \r
645              "$ref": "#/definitions/LocationConstraint"\r
646 \r
647            }\r
648 \r
649          },\r
650 \r
651          "additionalParamForNs": {\r
652 \r
653            "type": "string"\r
654 \r
655          }\r
656 \r
657        }\r
658 \r
659      },\r
660 \r
661      "LocationConstraint": {\r
662 \r
663        "type": "object",\r
664 \r
665        "properties": {\r
666 \r
667          "vnfProfileId": {\r
668 \r
669            "type": "string"\r
670 \r
671          },\r
672          "locationConstraints": {\r
673 \r
674            "type": "object",\r
675 \r
676            "properties": {\r
677 \r
678              "vimid": {\r
679 \r
680                "type": "string"\r
681 \r
682              }\r
683 \r
684            }\r
685 \r
686          }\r
687 \r
688        }\r
689 \r
690      },\r
691 \r
692      "NsScaleRequest": {\r
693 \r
694        "type": "object",\r
695 \r
696        "properties": {\r
697 \r
698          "scaleType": {\r
699 \r
700            "type": "string"\r
701 \r
702          },\r
703 \r
704          "scaleNsByStepsData": {\r
705 \r
706            "$ref": "#/definitions/NsScaleByStepsData"\r
707 \r
708          }\r
709 \r
710        }\r
711 \r
712      },\r
713 \r
714      "NsScaleByStepsData": {\r
715 \r
716        "type": "object",\r
717 \r
718        "properties": {\r
719 \r
720          "scalingDirection": {\r
721 \r
722            "type": "string"\r
723 \r
724          },\r
725 \r
726          "aspectId": {\r
727 \r
728            "type": "string"\r
729 \r
730          },\r
731 \r
732          "numberOfSteps": {\r
733 \r
734            "type": "integer"\r
735 \r
736          }\r
737 \r
738        }\r
739 \r
740      },\r
741 \r
742      "NsHealRequest": {\r
743 \r
744        "type": "object",\r
745 \r
746        "properties": {\r
747 \r
748          "vnfInstanceId": {\r
749 \r
750            "type": "string"\r
751 \r
752          },\r
753 \r
754          "cause": {\r
755 \r
756            "type": "string"\r
757 \r
758          },\r
759 \r
760          "additionalParams": {\r
761 \r
762            "type": "object",\r
763 \r
764            "properties": {\r
765 \r
766              "action": {\r
767 \r
768                "type": "string"\r
769 \r
770              },\r
771 \r
772              "actionvminfo": {\r
773 \r
774                "type": "object",\r
775 \r
776                "properties": {\r
777 \r
778                  "vmid": {\r
779 \r
780                    "type": "string"\r
781 \r
782                  },\r
783 \r
784                  "vmname": {\r
785 \r
786                    "type": "string"\r
787 \r
788                  }\r
789 \r
790                }\r
791 \r
792              }\r
793 \r
794            }\r
795 \r
796          }\r
797 \r
798        }\r
799 \r
800      },\r
801 \r
802      "NsTerminateRequest": {\r
803 \r
804        "type": "object",\r
805 \r
806        "properties": {\r
807 \r
808          "terminationType": {\r
809 \r
810            "type": "string"\r
811 \r
812          },\r
813 \r
814          "gracefulTerminationTimeout": {\r
815 \r
816            "type": "string"\r
817 \r
818          }\r
819 \r
820        }\r
821 \r
822      },\r
823 \r
824      "JobInfo": {\r
825 \r
826        "type": "object",\r
827 \r
828        "properties": {\r
829 \r
830          "jobId": {\r
831 \r
832            "type": "string"\r
833 \r
834          }\r
835 \r
836        }\r
837 \r
838      },\r
839 \r
840      "JobProgressRequest": {\r
841 \r
842        "type": "object",\r
843 \r
844        "properties": {\r
845 \r
846          "progress": {\r
847 \r
848            "type": "string"\r
849 \r
850          },\r
851 \r
852          "desc": {\r
853 \r
854            "type": "string"\r
855 \r
856          },\r
857 \r
858          "errcode": {\r
859 \r
860            "type": "string"\r
861 \r
862          }\r
863 \r
864        }\r
865 \r
866      },\r
867 \r
868      "NsInfo": {\r
869 \r
870        "type": "object",\r
871 \r
872        "properties": {\r
873 \r
874          "nsInstanceId": {\r
875 \r
876            "type": "string"\r
877 \r
878          },\r
879 \r
880          "nsName": {\r
881 \r
882            "type": "string"\r
883 \r
884          },\r
885 \r
886          "description": {\r
887 \r
888            "type": "string"\r
889 \r
890          },\r
891 \r
892          "nsdId": {\r
893 \r
894            "type": "string"\r
895 \r
896          },\r
897 \r
898          "vnfInfo": {\r
899 \r
900            "type": "array",\r
901 \r
902            "items": {\r
903 \r
904              "$ref": "#/definitions/vnfInfo"\r
905 \r
906            }\r
907 \r
908          },\r
909 \r
910          "vlInfo": {\r
911 \r
912            "type": "array",\r
913 \r
914            "items": {\r
915 \r
916              "$ref": "#/definitions/vlInfo"\r
917 \r
918            }\r
919 \r
920          },\r
921 \r
922          "vnffgInfo": {\r
923 \r
924            "type": "array",\r
925 \r
926            "items": {\r
927 \r
928              "$ref": "#/definitions/vnffgInfo"\r
929 \r
930            }\r
931 \r
932          },\r
933 \r
934          "nsState": {\r
935 \r
936            "type": "string"\r
937 \r
938          }\r
939 \r
940        }\r
941 \r
942      },\r
943 \r
944      "vnfInfo": {\r
945 \r
946        "type": "object",\r
947 \r
948        "properties": {\r
949 \r
950          "vnfInstanceId": {\r
951 \r
952            "type": "string"\r
953 \r
954          },\r
955 \r
956          "vnfInstanceName": {\r
957 \r
958            "type": "string"\r
959 \r
960          },\r
961 \r
962          "vnfdId": {\r
963 \r
964            "type": "string"\r
965 \r
966          }\r
967 \r
968        }\r
969 \r
970      },\r
971 \r
972      "vlInfo": {\r
973 \r
974        "type": "object",\r
975 \r
976        "properties": {\r
977 \r
978          "vlInstanceId": {\r
979 \r
980            "type": "string"\r
981 \r
982          },\r
983 \r
984          "vlInstanceName": {\r
985 \r
986            "type": "string"\r
987 \r
988          },\r
989 \r
990          "vldId": {\r
991 \r
992            "type": "string"\r
993 \r
994          },\r
995 \r
996          "relatedCpInstanceId": {\r
997 \r
998            "type": "array",\r
999 \r
1000            "items": {\r
1001 \r
1002              "$ref": "#/definitions/cpInfo"\r
1003 \r
1004            }\r
1005 \r
1006          }\r
1007 \r
1008        }\r
1009 \r
1010      },\r
1011 \r
1012      "cpInfo": {\r
1013 \r
1014        "type": "object",\r
1015 \r
1016        "properties": {\r
1017 \r
1018          "cpInstanceId": {\r
1019 \r
1020            "type": "string"\r
1021 \r
1022          },\r
1023 \r
1024          "cpInstanceName": {\r
1025 \r
1026            "type": "string"\r
1027 \r
1028          },\r
1029 \r
1030          "cpdId": {\r
1031 \r
1032            "type": "string"\r
1033 \r
1034          }\r
1035 \r
1036        }\r
1037 \r
1038      },\r
1039      "vnffgInfo": {\r
1040 \r
1041        "type": "object",\r
1042 \r
1043        "properties": {\r
1044 \r
1045          "vnffgInstanceId": {\r
1046 \r
1047            "type": "string"\r
1048 \r
1049          },\r
1050 \r
1051          "vnfId": {\r
1052 \r
1053            "type": "string"\r
1054 \r
1055          },\r
1056          "pnfId": {\r
1057 \r
1058            "type": "string"\r
1059 \r
1060          },\r
1061 \r
1062          "virtualLinkId": {\r
1063 \r
1064            "type": "string"\r
1065 \r
1066          },\r
1067 \r
1068          "cpId": {\r
1069 \r
1070            "type": "string"\r
1071 \r
1072          },\r
1073 \r
1074          "nfp": {\r
1075 \r
1076            "type": "string"\r
1077 \r
1078          }\r
1079 \r
1080        }\r
1081 \r
1082      }\r
1083 \r
1084    }\r
1085 \r
1086  }