Initial model changes and api changes for pci-opt
[optf/osdf.git] / docs / sections / swaggerdoc / oof-osdf-has-api.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "description": "This is the ONAP OOF OSDF (Optimization Service Design Framework) API",
5     "version": "1.0.0",
6     "title": "OSDF API",
7     "contact": {
8       "email": "frank.sandoval@oamtechnologies.com"
9     },
10     "license": {
11       "name": "Apache 2.0",
12       "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
13     }
14   },
15   "securityDefinitions": {
16     "basicAuth": {
17       "type": "basic",
18       "description": "HTTP Basic Auth"
19     }
20   },
21   "security": [
22     {
23       "basicAuth": []
24     }
25   ],
26   "paths": {
27     "/v2/placement": {
28       "post": {
29         "summary": "create/update a placement",
30         "operationId": "createPlacement",
31         "description": "create/update a placement",
32         "consumes": [
33           "application/json"
34         ],
35         "produces": [
36           "application/json"
37         ],
38         "parameters": [
39           {
40             "in": "body",
41             "name": "placementRequest",
42             "description": "placement request",
43             "schema": {
44               "$ref": "#/definitions/PlacementRequest"
45             }
46           }
47         ],
48         "responses": {
49           "201": {
50             "description": "An optimization solution is found."
51           },
52           "202": {
53             "description": "An optimization request is accepted"
54           },
55           "400": {
56             "description": "bad request"
57           },
58           "401": {
59             "description": "Request body is not compliant with the API definition"
60           },
61           "404": {
62             "description": "The server cannot find the requested URI"
63           },
64           "405": {
65             "description": "The requested method is not supported by a server."
66           },
67           "500": {
68             "description": "The server encountered an internal server error or timed out"
69           }
70         }
71       }
72     },
73     "/api/oof/placement/v1": {
74       "$ref": "#/paths/~1v2~1placement"
75     },
76     "/api/oof/v1/pci": {
77       "post": {
78         "summary": "Initiate PCI/ANR Optimization",
79         "operationId": "initiatePCIOptRequest",
80         "description": "Initiate PCI/ANR Optimization",
81         "consumes": [
82           "application/json"
83         ],
84         "produces": [
85           "application/json"
86         ],
87         "parameters": [
88           {
89             "in": "body",
90             "name": "PCIOptimizationRequest",
91             "description": "PCI request",
92             "schema": {
93               "$ref": "#/definitions/PCIOptRequest"
94             }
95           }
96         ],
97         "responses": {
98           "201": {
99             "description": "An optimization solution is found."
100           },
101           "202": {
102             "description": "An optimization request is accepted"
103           },
104           "400": {
105             "description": "bad request"
106           },
107           "401": {
108             "description": "Request body is not compliant with the API definition"
109           },
110           "404": {
111             "description": "The server cannot find the requested URI"
112           },
113           "405": {
114             "description": "The requested method is not supported by a server."
115           },
116           "500": {
117             "description": "The server encountered an internal server error or timed out"
118           }
119         }
120       }
121     },
122     "/api/oof/pci/v1": {
123       "$ref": "#/paths/~1api~1oof~1v1~1pci"
124     }
125   },
126   "definitions": {
127     "PlacementRequest": {
128       "type": "object",
129       "required": [
130         "requestInfo",
131         "placementInfo",
132         "licenseInfo",
133         "serviceInfo"
134       ],
135       "properties": {
136         "requestInfo": {
137           "$ref": "#/definitions/RequestInfo"
138         },
139         "placementInfo": {
140           "$ref": "#/definitions/PlacementInfo"
141         },
142         "licenseInfo": {
143           "$ref": "#/definitions/LicenseInfo"
144         },
145         "serviceInfo": {
146           "$ref": "#/definitions/ServiceInfo"
147         }
148       }
149     },
150     "RequestInfo": {
151       "type": "object",
152       "required": [
153         "transactionId",
154         "requestId",
155         "callbackUrl",
156         "sourceId",
157         "requestType",
158         "optimizers",
159         "timeout"
160       ],
161       "properties": {
162         "transactionId": {
163           "type": "string",
164           "format": "uuid",
165           "description": "unique ID to track an ONAP transaction",
166           "example": "d290f1ee-6c54-4b01-90e6-d701748f0851"
167         },
168         "requestId": {
169           "type": "string",
170           "format": "uuid",
171           "description": "A unique ID to track multiple requests associated with a transaction",
172           "example": "d290f1ee-6c54-4b01-90e6-d701748f0851"
173         },
174         "callbackUrl": {
175           "type": "string",
176           "format": "url",
177           "description": "The end point of a callback service where recommendations are posted.",
178           "example": "myDomain.com/myCallback"
179         },
180         "callbackHeader": {
181           "type": "string",
182           "description": "JSON blob. The header information a client expecting in a async callback.",
183           "example": {
184             "blob": "content"
185           }
186         },
187         "sourceId": {
188           "type": "string",
189           "description": "The unique ID of a client making an optimization call.",
190           "example": "d290f1ee-6c54-4b01-90e6-d701748f0851"
191         },
192         "requestType": {
193           "type": "string",
194           "enum": [
195             "create",
196             "update",
197             "delete"
198           ],
199           "description": "The type of a request",
200           "example": "create"
201         },
202         "numSolutions": {
203           "type": "integer",
204           "description": "Expected number of solutions.",
205           "example": 1
206         },
207         "optimizers": {
208           "type": "array",
209           "items": {
210             "type": "string",
211             "enum": [
212               "placement",
213               "pci",
214               "pci-anr"
215             ]
216           },
217           "description": "A list of optimization services.",
218           "example": [
219             "placement"
220           ]
221         },
222         "timeout": {
223           "type": "integer",
224           "description": "A tolerance window (in second) for expecting solutions.",
225           "example": 5
226         }
227       }
228     },
229     "PlacementInfo": {
230       "type": "object",
231       "required": [
232         "requestParameters",
233         "placementDemands"
234       ],
235       "properties": {
236         "requestParameters": {
237           "type": "string",
238           "description": "JSON blob. A service ordering information",
239           "example": {
240             "blob": "content"
241           }
242         },
243         "placementDemands": {
244           "type": "array",
245           "items": {
246             "$ref": "#/definitions/PlacementDemand"
247           },
248           "description": "The resource information for a placement service"
249         },
250         "subscriberInfo": {
251           "type": "object",
252           "items": {
253             "$ref": "#/definitions/SubscriberInfo"
254           },
255           "description": "The information of a service subscriber."
256         }
257       }
258     },
259     "PlacementDemand": {
260       "type": "object",
261       "required": [
262         "resourceModuleName",
263         "serviceResourceId",
264         "resourceModelInfo"
265       ],
266       "properties": {
267         "resourceModuleName": {
268           "type": "string",
269           "description": "A resource name as defined in a service mode",
270           "example": "myResourceName"
271         },
272         "serviceResourceId": {
273           "type": "string",
274           "description": "A unique resource Id with a local scope between client and OOF.",
275           "example": "myResourceId"
276         },
277         "givenPlacement": {
278           "type": "object",
279           "additionalProperties": {
280             "type": "object",
281             "properties": {
282               "key": {
283                 "type": "string"
284               },
285               "value": {
286                 "type": "string"
287               }
288             }
289           },
290           "description": "placement parameters defined in the ordering system, keyname include tenantId",
291           "example": {
292             "tenantId": "1"
293           }
294         },
295         "resourceModelInfo": {
296           "$ref": "#/definitions/ModelMetaData"
297         },
298         "existingCandidates": {
299           "$ref": "#/definitions/Candidates"
300         },
301         "excludedCandidates": {
302           "$ref": "#/definitions/Candidates"
303         },
304         "requiredCandidates": {
305           "$ref": "#/definitions/Candidates"
306         }
307       }
308     },
309     "ModelMetaData": {
310       "type": "object",
311       "required": [
312         "modelInvariantId",
313         "modelVersionId"
314       ],
315       "properties": {
316         "modelInvariantId": {
317           "type": "string",
318           "description": "A model invariant Id as defined in a service model.",
319           "example": "my model invariant Id"
320         },
321         "modelVersionId": {
322           "type": "string",
323           "description": "A unique model Id as defined in a service model.",
324           "example": "my unique model Id"
325         },
326         "modelName": {
327           "type": "string",
328           "description": "A model name as defined in a service model",
329           "example": "my model name"
330         },
331         "modelType": {
332           "type": "string",
333           "description": "A model type as defined in a service model.",
334           "example": "my model type"
335         },
336         "modelVersion": {
337           "type": "string",
338           "description": "A model version as defined in a service model.",
339           "example": "my model version"
340         },
341         "modelCustomizationName": {
342           "type": "string",
343           "description": "A model customization name as defined in a service model.",
344           "example": "my model customization"
345         }
346       }
347     },
348     "Candidates": {
349       "type": "object",
350       "required": [
351         "identifierType",
352         "identifiers"
353       ],
354       "properties": {
355         "identifierType": {
356           "type": "string",
357           "enum": [
358             "service_instance_id",
359             "vnf_name",
360             "cloud_region_id"
361           ],
362           "description": "The type of a candidate.",
363           "example": "service_instance_id"
364         },
365         "identifiers": {
366           "type": "array",
367           "items": {
368             "type": "string"
369           },
370           "description": "A list of identifiers.",
371           "example": "candidateId"
372         },
373         "cloudOwner": {
374           "type": "string",
375           "description": "The name of a cloud owner. Only required if identifierType is cloud_region_id",
376           "example": "cloud_owner"
377         }
378       }
379     },
380     "SubscriberInfo": {
381       "type": "object",
382       "required": [
383         "globalSubscriberId",
384         "subscriberName",
385         "subscriberCommonSiteId"
386       ],
387       "properties": {
388         "globalSubscriberId": {
389           "type": "string",
390           "description": "An ID of a subscriber.",
391           "example": "subscriber_id"
392         },
393         "subscriberName": {
394           "type": "string",
395           "description": "The name of a subscriber. If the name is not known, the value must be 'unknown'",
396           "example": "subscriber_name"
397         },
398         "subscriberCommonSiteId": {
399           "type": "string",
400           "description": "Id representing a subscriber location",
401           "example": "subscriber_location_id"
402         }
403       }
404     },
405     "LicenseInfo": {
406       "type": "object",
407       "required": [
408         "licenseDemands"
409       ],
410       "properties": {
411         "licenseDemands": {
412           "type": "array",
413           "items": {
414             "$ref": "#/definitions/LicenseDemands"
415           },
416           "description": "A list of resources for license selection"
417         }
418       }
419     },
420     "LicenseDemands": {
421       "type": "object",
422       "required": [
423         "resourceModuleName",
424         "serviceResourceId",
425         "resourceModelInfo"
426       ],
427       "properties": {
428         "resourceModuleName": {
429           "type": "string",
430           "description": "A resource name as defined in a service model.",
431           "example": "service_instance_id"
432         },
433         "serviceResourceId": {
434           "type": "string",
435           "description": "A unique resource Id with a local scope between client and OOF.",
436           "example": "service_instance_id"
437         },
438         "resourceModelInfo": {
439           "$ref": "#/definitions/ModelMetaData"
440         },
441         "existingLicenses": {
442           "$ref": "#/definitions/LicenseModel"
443         }
444       }
445     },
446     "LicenseModel": {
447       "type": "object",
448       "required": [
449         "entitlementPoolUUID",
450         "licenseKeyGroupUUID"
451       ],
452       "properties": {
453         "entitlementPoolUUID": {
454           "type": "array",
455           "items": {
456             "type": "string",
457             "format": "uuid"
458           },
459           "description": "Entitlement pool UUIDs associated with a resource.",
460           "example": "candidateId"
461         },
462         "licenseKeyGroupUUID": {
463           "type": "array",
464           "items": {
465             "type": "string",
466             "format": "uuid"
467           },
468           "description": "License key groups associated with a resource",
469           "example": "candidateId"
470         }
471       }
472     },
473     "SynchronousResponse": {
474       "type": "object",
475       "required": [
476         "requestId",
477         "transactionId",
478         "requestStatus"
479       ],
480       "properties": {
481         "requestId": {
482           "type": "string",
483           "format": "uuid",
484           "description": "A unique Id for an ONAP transaction",
485           "example": "ONAP transaction id"
486         },
487         "transactionId": {
488           "type": "string",
489           "format": "uuid",
490           "description": "A unique ID to track multiple requests associated with a transaction.",
491           "example": "requests id"
492         },
493         "statusMessage": {
494           "type": "string",
495           "description": "Reasoning if a requestStatus is failure.",
496           "example": "requestStatus"
497         },
498         "requestStatus": {
499           "type": "string",
500           "enum": [
501             "success",
502             "failure"
503           ],
504           "description": "The status of a request.",
505           "example": "success"
506         }
507       }
508     },
509     "PlacementAsynchronousResponse": {
510       "type": "object",
511       "required": [
512         "requestId",
513         "transactionId",
514         "requestStatus",
515         "solutions"
516       ],
517       "properties": {
518         "requestId": {
519           "type": "string",
520           "format": "uuid",
521           "description": "A unique Id for an ONAP transaction",
522           "example": "ONAP transaction id"
523         },
524         "transactionId": {
525           "type": "string",
526           "format": "uuid",
527           "description": "A unique ID to track multiple requests associated with a transaction.",
528           "example": "requests id"
529         },
530         "statusMessage": {
531           "type": "string",
532           "description": "Reasoning if a requestStatus is failure.",
533           "example": "requestStatus"
534         },
535         "requestStatus": {
536           "type": "string",
537           "enum": [
538             "success",
539             "failure"
540           ],
541           "description": "The status of a request.",
542           "example": "success"
543         },
544         "solutions": {
545           "$ref": "#/definitions/Solutions"
546         }
547       }
548     },
549     "Solutions": {
550       "type": "object",
551       "required": [
552         "placementSolutions",
553         "licenseSolutions"
554       ],
555       "properties": {
556         "placementSolutions": {
557           "type": "array",
558           "items": {
559             "$ref": "#/definitions/ComprehensiveSolution"
560           },
561           "description": "A list of placement solutions."
562         },
563         "licenseSolutions": {
564           "type": "array",
565           "items": {
566             "$ref": "#/definitions/LicenseSolution"
567           },
568           "description": "A list of license solutions."
569         }
570       }
571     },
572     "ComprehensiveSolution": {
573       "type": "object",
574       "required": [
575         "placementSolutions"
576       ],
577       "properties": {
578         "placementSolutions": {
579           "type": "array",
580           "items": {
581             "$ref": "#/definitions/PlacementSolution"
582           },
583           "description": "A list of placement solutions."
584         }
585       }
586     },
587     "PlacementSolution": {
588       "type": "object",
589       "required": [
590         "resourceModuleName",
591         "serviceResourceId",
592         "identifierType",
593         "identifier"
594       ],
595       "properties": {
596         "resourceModuleName": {
597           "type": "string",
598           "description": "The name of a resource as defined in the service model",
599           "example": "resource name"
600         },
601         "serviceResourceId": {
602           "type": "string",
603           "description": "A resource Id as defined in a service model.",
604           "example": "resource id"
605         },
606         "identifierType": {
607           "type": "string",
608           "enum": [
609             "service_instance_id"
610           ],
611           "description": "The type of a candidate.",
612           "example": "candidate type"
613         },
614         "identifier": {
615           "type": "string",
616           "description": "The id of a candidate.",
617           "example": "candidate id"
618         },
619         "assignmentInfo": {
620           "type": "array",
621           "items": {
622             "$ref": "#/definitions/AssignmentInfo"
623           },
624           "description": "Additional information related to a candidate."
625         }
626       }
627     },
628     "AssignmentInfo": {
629       "type": "object",
630       "required": [
631         "key",
632         "value"
633       ],
634       "properties": {
635         "key": {
636           "type": "string",
637           "description": "An attribute name",
638           "example": "attribute name"
639         },
640         "value": {
641           "type": "string",
642           "description": "An attribute value.",
643           "example": "attribute value"
644         }
645       }
646     },
647     "LicenseSolution": {
648       "type": "object",
649       "required": [
650         "resourceModuleName",
651         "serviceResourceId",
652         "entitlementPoolUUID",
653         "licenseKeyGroupUUID",
654         "entitlementPoolInvariantUUID",
655         "licenseKeyGroupInvariantUUID"
656       ],
657       "properties": {
658         "resourceModuleName": {
659           "type": "string",
660           "description": "A resource name as defined in a service",
661           "example": "resource name"
662         },
663         "serviceResourceId": {
664           "type": "string",
665           "description": "A resource Id as defined in a service.",
666           "example": "resource Id"
667         },
668         "entitlementPoolUUID": {
669           "type": "array",
670           "items": {
671             "type": "string",
672             "format": "uuid"
673           },
674           "description": "A list of entitlementPoolUUIDs",
675           "example": "entitlementPoolUUID"
676         },
677         "licenseKeyGroupUUID": {
678           "type": "array",
679           "items": {
680             "type": "string",
681             "format": "uuid"
682           },
683           "description": "A list of licenseKeyGroupUUID.",
684           "example": "licenseKeyGroupUUID"
685         },
686         "entitlementPoolInvariantUUID": {
687           "type": "array",
688           "items": {
689             "type": "string",
690             "format": "uuid"
691           },
692           "description": "A list of entitlementPoolInvariantUUID",
693           "example": "entitlementPoolInvariantUUID"
694         },
695         "licenseKeyGroupInvariantUUID": {
696           "type": "array",
697           "items": {
698             "type": "string",
699             "format": "uuid"
700           },
701           "description": "A list of licenseKeyGroupInvariantUUID",
702           "example": "licenseKeyGroupInvariantUUID"
703         }
704       }
705     },
706     "ServiceInfo": {
707       "type": "object",
708       "required": [
709         "serviceInstanceId",
710         "modelInfo",
711         "serviceName"
712       ],
713       "properties": {
714         "serviceInstanceId": {
715           "type": "string",
716           "description": "A service instance id associated with a request.",
717           "example": "service_instance_id"
718         },
719         "modelInfo": {
720           "$ref": "#/definitions/ModelMetaData"
721         },
722         "serviceName": {
723           "type": "string",
724           "description": "The name of a service",
725           "example": "service_name"
726         }
727       }
728     },
729     "PCIOptRequest": {
730       "type": "object",
731       "required": [
732         "requestInfo",
733         "cellInfo"
734       ],
735       "properties": {
736         "requestInfo": {
737           "$ref": "#/definitions/RequestInfo"
738         },
739         "cellInfo": {
740           "$ref": "#/definitions/CellInfo"
741         }
742       }
743     },
744     "CellInfo": {
745       "type": "object",
746       "required": [
747         "networkId",
748         "cellIdList",
749         "anrInputList",
750         "trigger"
751       ],
752       "properties": {
753         "networkId": {
754           "type": "string",
755           "description": "Id of network requiring PCI optimization",
756           "example": 100
757         },
758         "cellIdList": {
759           "type": "array",
760           "items": {
761             "type": "string"
762           },
763           "description": "List of cellIds triggering need for PCI optimization (eg.potential confusion)",
764           "example": [
765             "cell0001",
766             "cell0002"
767           ]
768         },
769         "anrInputList": {
770           "type": "array",
771           "items": {
772             "$ref": "#/definitions/ANRInfo"
773           },
774           "description": "A list of ANR Input."
775         },
776         "trigger": {
777           "type": "string",
778           "description": "Type of trigger causing need for PCI optimization",
779           "example": "NbrListChange"
780         }
781       }
782     },
783     "PCIAsynchronousResponse": {
784       "type": "object",
785       "required": [
786         "requestId",
787         "transactionId",
788         "requestStatus",
789         "solutions"
790       ],
791       "properties": {
792         "requestId": {
793           "type": "string",
794           "format": "uuid",
795           "description": "A unique Id for an ONAP transaction",
796           "example": "ONAP transaction id"
797         },
798         "transactionId": {
799           "type": "string",
800           "format": "uuid",
801           "description": "A unique ID to track multiple requests associated with a transaction.",
802           "example": "requests id"
803         },
804         "statusMessage": {
805           "type": "string",
806           "description": "Reasoning if a requestStatus is failure.",
807           "example": "requestStatus"
808         },
809         "requestStatus": {
810           "type": "string",
811           "enum": [
812             "success",
813             "failure"
814           ],
815           "description": "The status of a request.",
816           "example": "success"
817         },
818         "solutions": {
819           "$ref": "#/definitions/PCIANRSolutions"
820         }
821       }
822     },
823     "PCIANRSolutions": {
824       "type": "object",
825       "required": [
826         "networkId",
827         "pciSolutions",
828         "anrSolutions"
829       ],
830       "properties": {
831         "networkId": {
832           "type": "string",
833           "description": "Id of network requiring PCI optimization",
834           "example": 100
835         },
836         "pciSolutions": {
837           "type": "array",
838           "items": {
839             "$ref": "#/definitions/PCISolution"
840           },
841           "description": "A list of PCI solutions."
842         },
843         "anrSolutions": {
844           "type": "array",
845           "items": {
846             "$ref": "#/definitions/ANRInfo"
847           },
848           "description": "A list of ANR solutions."
849         }
850       }
851     },
852     "PCISolution": {
853       "type": "object",
854       "required": [
855         "cellId",
856         "pci"
857       ],
858       "properties": {
859         "cellId": {
860           "type": "string",
861           "description": "cellId with modified PCI value",
862           "example": "cell0001"
863         },
864         "pci": {
865           "type": "integer",
866           "description": "New PCI value for cellId",
867           "example": 1
868         }
869       }
870     },
871     "ANRInfo": {
872       "type": "object",
873       "required": [
874         "cellId",
875         "removeableNeighbors"
876       ],
877       "properties": {
878         "cellId": {
879           "type": "string",
880           "description": "cellId with modified PCI value",
881           "example": "cell0001"
882         },
883         "removeableNeighbors": {
884           "type": "array",
885           "items": {
886             "type": "string"
887           },
888           "description": "List of neighbors to be removed",
889           "example": [
890             "cell0002",
891             "cell0003"
892           ]
893         }
894       }
895     }
896   },
897   "schemes": [
898     "https"
899   ],
900   "host": "virtserver.swaggerhub.com",
901   "basePath": "/oof-osdf/v1"
902 }