[DOC] Correct ReDoc API documentation 73/124673/1
authorEric Debeau <eric.debeau@orange.com>
Mon, 4 Oct 2021 19:53:46 +0000 (21:53 +0200)
committerEric Debeau <eric.debeau@orange.com>
Mon, 4 Oct 2021 19:57:52 +0000 (21:57 +0200)
Existing solution based on javascript is not working
- solution based on _downloads reference

Use sphinxcontrib-redoc package
- Update conf.py to add the required extensions
- Update conf.py to add ReDoc API documentation
- Add sphinxcontrib-redoc in requirements-docs.txt
- Remove redoc directory
- Copy Swagger JSON file in swagger repo
- Rename Swagger JSON file
- Correct Swagger JSON file to delete bad characters

Small editorial corrections
- Update doc/architecture.rst

Issue-ID: EXTAPI-599

Signed-off-by: Eric Debeau <eric.debeau@orange.com>
Change-Id: I3c2b52ff072f81f5554046498f0cf8419cc3f342

21 files changed:
docs/.gitignore
docs/architecture/architecture.rst
docs/conf.py
docs/offeredapis/offeredapis.rst
docs/offeredapis/redoc/api_hub.js [deleted file]
docs/offeredapis/redoc/api_hub.rst [deleted file]
docs/offeredapis/redoc/api_serviceCatalog.js [deleted file]
docs/offeredapis/redoc/api_serviceCatalog.rst [deleted file]
docs/offeredapis/redoc/api_serviceInventory.js [deleted file]
docs/offeredapis/redoc/api_serviceInventory.rst [deleted file]
docs/offeredapis/redoc/api_serviceOrder.js [deleted file]
docs/offeredapis/redoc/api_serviceOrder.rst [deleted file]
docs/offeredapis/redoc/api_status.js [deleted file]
docs/offeredapis/redoc/api_status.rst [deleted file]
docs/offeredapis/redoc/redoc.js [deleted file]
docs/offeredapis/swagger/hub.json [new file with mode: 0644]
docs/offeredapis/swagger/service_catalog.json [new file with mode: 0644]
docs/offeredapis/swagger/service_inventory.json [new file with mode: 0644]
docs/offeredapis/swagger/service_order.json [new file with mode: 0644]
docs/offeredapis/swagger/status.json [new file with mode: 0644]
docs/requirements-docs.txt

index 43ca5b6..7e9ffa3 100644 (file)
@@ -1,3 +1,4 @@
 /.tox
+/.vscode
 /_build/*
 /__pycache__/*
index b5def70..a44f629 100755 (executable)
@@ -10,15 +10,13 @@ Architecture
 Introduction
 ************
 
-
 NBI stands for NorthBound Interface. It brings to ONAP a set of API that can be
 used by external systems as BSS for example.
 These API are based on **TMF API**.
 
-
-*******************************************
+********************************************
 Global NBI architecture for Honolulu release
-*******************************************
+********************************************
 
 Following illustration provides a global view about NBI architecture,
 integration with other ONAP components and API resource/operation provided.
index 5082a4b..62bf96d 100644 (file)
@@ -11,5 +11,42 @@ intersphinx_mapping = {}
 
 html_last_updated_fmt = '%d-%b-%y %H:%M'
 
+extensions = ['sphinxcontrib.blockdiag', 'sphinxcontrib.redoc']
+
+redoc = [
+            {
+                'name': 'Hub API',
+                'page': 'offeredapis/hub',
+                'spec': 'offeredapis/swagger/hub.json',
+                'embed': True
+            },
+            {
+                'name': 'Service Catalog API',
+                'page': 'offeredapis/service_catalog',
+                'spec': 'offeredapis/swagger/service_catalog.json',
+                'embed': True
+            },
+            {
+                'name': 'Service Inventory API',
+                'page': 'offeredapis/service_inventory',
+                'spec': 'offeredapis/swagger/service_inventory.json',
+                'embed': True
+            },
+            {
+                'name': 'Service Order API',
+                'page': 'offeredapis/service_order',
+                'spec': 'offeredapis/swagger/service_order.json',
+                'embed': True
+            },
+            {
+                'name': 'Status API',
+                'page': 'offeredapis/status',
+                'spec': 'offeredapis/swagger/status.json',
+                'embed': True
+            }
+        ]
+
+redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js'
+
 def setup(app):
-    app.add_css_file("css/ribbon.css")
\ No newline at end of file
+    app.add_css_file("css/ribbon.css")
index d383040..66f657e 100644 (file)
@@ -16,9 +16,9 @@ NBI stands for NorthBound Interface. It brings to ONAP a set of API that can
 be used by external systems as BSS for example. These API are based on
 **TMF API**.
 
-*******************************************
+********************************************
 Global NBI architecture for Honolulu release
-*******************************************
+********************************************
 
 Following illustration provides a global view about **NBI** architecture,
 integration with other ONAP components and API resource/operation provided.
@@ -110,11 +110,11 @@ API Table
 API ReDoc Documentation
 ***********************
 
-* :doc:`API hub <redoc/api_hub>`
-* :doc:`Service Catalog <redoc/api_serviceCatalog>`
-* :doc:`Service Inventory <redoc/api_serviceInventory>`
-* :doc:`Service Order <redoc/api_serviceOrder>`
-* :doc:`Status <redoc/api_status>`
+- `hub <./hub.html>`_
+- `serviceCatalog <./service_catalog.html>`_
+- `serviceInventory <./service_inventory.html>`_
+- `serviceOrder <./service_order.html>`_
+- `status <./status.html>`_
 
 
 ***************
diff --git a/docs/offeredapis/redoc/api_hub.js b/docs/offeredapis/redoc/api_hub.js
deleted file mode 100644 (file)
index 9531a4d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<redoc spec-url='https://docs.onap.org/projects/onap-externalapi-nbi/en/latest/_downloads/7b81c97fc19ddb7f1c31168f77957612/swagger.json'></redoc>
diff --git a/docs/offeredapis/redoc/api_hub.rst b/docs/offeredapis/redoc/api_hub.rst
deleted file mode 100644 (file)
index 95e77fe..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-=======
-API Hub
-=======
-
-.. raw:: html
-   :file: api_hub.js
-
-.. raw:: html
-   :file: redoc.js
diff --git a/docs/offeredapis/redoc/api_serviceCatalog.js b/docs/offeredapis/redoc/api_serviceCatalog.js
deleted file mode 100644 (file)
index 58cc5ca..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<redoc spec-url='https://docs.onap.org/projects/onap-externalapi-nbi/en/latest/_downloads/ebe32f7b0f44f37226c71cfbcc0e1a72/swagger.json'></redoc>
diff --git a/docs/offeredapis/redoc/api_serviceCatalog.rst b/docs/offeredapis/redoc/api_serviceCatalog.rst
deleted file mode 100644 (file)
index 872305f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-===================
-API Service Catalog
-===================
-
-.. raw:: html
-   :file: api_serviceCatalog.js
-
-.. raw:: html
-   :file: redoc.js
diff --git a/docs/offeredapis/redoc/api_serviceInventory.js b/docs/offeredapis/redoc/api_serviceInventory.js
deleted file mode 100644 (file)
index 9098afc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<redoc spec-url='https://docs.onap.org/projects/onap-externalapi-nbi/en/latest/_downloads/2366f0bdc6bb6f4d162f2825288ced96/swagger.json'></redoc>
diff --git a/docs/offeredapis/redoc/api_serviceInventory.rst b/docs/offeredapis/redoc/api_serviceInventory.rst
deleted file mode 100644 (file)
index 36c11c3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-=====================
-API Service Inventory
-=====================
-
-.. raw:: html
-   :file: api_serviceInventory.js
-
-.. raw:: html
-   :file: redoc.js
diff --git a/docs/offeredapis/redoc/api_serviceOrder.js b/docs/offeredapis/redoc/api_serviceOrder.js
deleted file mode 100644 (file)
index 5911168..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<redoc spec-url='https://docs.onap.org/projects/onap-externalapi-nbi/en/latest/_downloads/8570180cc7118dafa09f7a5989d94e6f/swagger.json'></redoc>
diff --git a/docs/offeredapis/redoc/api_serviceOrder.rst b/docs/offeredapis/redoc/api_serviceOrder.rst
deleted file mode 100644 (file)
index 792fb47..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-=================
-API Service Order
-=================
-
-.. raw:: html
-   :file: api_serviceOrder.js
-
-.. raw:: html
-   :file: redoc.js
diff --git a/docs/offeredapis/redoc/api_status.js b/docs/offeredapis/redoc/api_status.js
deleted file mode 100644 (file)
index 2617a38..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<redoc spec-url='https://docs.onap.org/projects/onap-externalapi-nbi/en/latest/_downloads/32f58fbdbdc8b7960948036f1aab7deb/swagger.json'></redoc>
diff --git a/docs/offeredapis/redoc/api_status.rst b/docs/offeredapis/redoc/api_status.rst
deleted file mode 100644 (file)
index fc6acbb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-==========
-API Status
-==========
-
-.. raw:: html
-   :file: api_status.js
-
-.. raw:: html
-   :file: redoc.js
diff --git a/docs/offeredapis/redoc/redoc.js b/docs/offeredapis/redoc/redoc.js
deleted file mode 100644 (file)
index 08ffbaa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<script src="https://cdn.jsdelivr.net/npm/redoc@2.0.0-alpha.17/bundles/redoc.standalone.js"> </script>
\ No newline at end of file
diff --git a/docs/offeredapis/swagger/hub.json b/docs/offeredapis/swagger/hub.json
new file mode 100644 (file)
index 0000000..9d98f10
--- /dev/null
@@ -0,0 +1,294 @@
+
+    {
+    "swagger": "2.0",
+    "info": {
+    "description": "Provides the ability to subscribe to and unsubscribe from External API notifications.\n\n**Main operation**\n\n```\nPOST /hub\n```\n\nrequest sample 1\n\n```\n{\n  \"callback\": \"http://mydomain/notification\",\n  \"query\": \"eventType = ServiceOrderCreationNotification\"\n}\n```\n\nrequest sample 2\n\n```\n{\n  \"callback\": \"http://mydomain/notification\",\n  \"query\": \"eventType=ServiceOrderCreationNotification,ServiceOrderStateChangeNotification\"\n}\n```\n\n**EventType for serviceOrdering**\n\n- ServiceOrderCreationNotification\n- ServiceOrderStateChangeNotification\n- ServiceOrderItemStateChangeNotification\n\n**EventType for serviceInventory**\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n- ServiceRemoveNotification\n\n",
+    "version": "4.1.0",
+    "title": "Hub API",
+    "contact": {
+      "name": "ONAP",
+      "url": "https://onap.readthedocs.io",
+      "email": "onap-discuss@lists.onap.org"
+    },
+    "license": {
+      "name": "Apache 2.0",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0"
+    },
+    "x-planned-retirement-date": "205001",
+    "x-component": "NBI",
+    "x-logo": {
+    "url": "/redoc/logo.png",
+    "backgroundColor": "#FFFFFF"
+    }
+    },
+    
+      "host": "nbi.api.simpledemo.onap.org:30274",
+      "basePath": "/nbi/api/v4",
+      "schemes": [
+      "https"
+      ],
+    "produces": [
+    "application/json;charset=utf-8"
+    ],
+    "tags": [
+    
+      {
+      "name": "Hub",
+      "description": "provided by NBI"
+      }
+    ],
+    "paths": {
+    "x-interface": {
+    "api-version": "4.1.0",
+    "last-mod-release": "Frankfurt"
+    },
+      "/hub": {
+    "post": {
+    "tags": [
+    "Hub"
+    ],
+        "consumes": [
+           "application/json;charset=utf-8"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "hub_Create",
+    "summary": "create hub",
+    "description": "",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "Hub",
+    "required": true,
+    "in": "body",
+    "description": "",
+    "schema": {
+    "$ref": "#/definitions/HubIn"
+      }
+    }
+      ],
+    "responses": {
+    "201": {
+    "description": "Created",
+    "schema": {
+    "$ref": "#/definitions/Hub"
+    }
+    
+    }
+    }
+    },
+    "get": {
+    "tags": [
+    "Hub"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "hub_Find",
+    "summary": "find hub",
+    "description": "",
+    "deprecated": false,
+    
+    "responses": {
+    "200": {
+    "description": "Ok",
+    "schema": {
+      "type": "array",
+      "items": {
+    "$ref": "#/definitions/Hub"
+      }
+    }
+    
+    }
+    }
+    }
+      },
+      "/hub/{hubId}": {
+    "get": {
+    "tags": [
+    "Hub"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "hub_Get",
+    "summary": "get hub",
+    "description": "",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "hubId",
+    "required": true,
+    "in": "path",
+    "type" : "string"
+    }
+      ],
+    "responses": {
+    "200": {
+    "description": "Ok",
+    "schema": {
+    "$ref": "#/definitions/Hub"
+    }
+    
+    }
+    }
+    },
+    "delete": {
+    "tags": [
+    "Hub"
+    ],
+    "operationId": "hub_Delete",
+    "summary": "delete hub",
+    "description": "",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "hubId",
+    "required": true,
+    "in": "path",
+    "type" : "string"
+    }
+      ],
+    "responses": {
+    "204": {
+    "description": "No Content"
+    
+    }
+    }
+    }
+      }
+    },
+    "definitions": {
+        
+
+    "ErrorDetail": {
+    "description": "Error code and message",
+
+    
+    "required": [
+    
+      "code",
+      "message"
+    ],
+    "type": "object",
+    "properties": {
+    "code": {
+    "description": "",
+    "type": "integer",
+    "format": "int32"
+    },
+    "message": {
+    "description": "",
+    "type": "string"
+    },
+    "description": {
+    "description": "",
+    "type": "string"
+    },
+    "infoURL": {
+    "description": "",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "Error": {
+    "description": "Error code and message",
+
+    
+    "required": [
+    
+      "code",
+      "message"
+    ],
+    "type": "object",
+    "properties": {
+    "code": {
+    "description": "",
+    "type": "integer",
+    "format": "int32"
+    },
+    "message": {
+    "description": "",
+    "type": "string"
+    },
+    "description": {
+    "description": "",
+    "type": "string"
+    },
+    "infoURL": {
+    "description": "",
+    "type": "string"
+    },
+    "details": {
+    
+    "type": "array",
+    "items": {
+    "$ref": "#/definitions/ErrorDetail"
+    }
+    }
+    }
+    
+    },    
+
+    "HubIn": {
+    "description": "Hub query and callback",
+
+    
+    "required": [
+    
+      "query",
+      "callback"
+    ],
+    "type": "object",
+    "properties": {
+    "query": {
+    "description": "The query must have an eventType= information.\\nOptionally a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”&serviceOrder.state=COMPLETED",
+    "type": "string"
+    },
+    "callback": {
+    "description": "URL where notification must be send",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "Hub": {
+    "description": "Hub id, query and callback",
+
+    
+    "required": [
+    
+      "id",
+      "query",
+      "callback"
+    ],
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "",
+    "type": "string"
+    },
+    "query": {
+    "description": "The query must have an eventType= information.\\nOptionally a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”&serviceOrder.state=COMPLETED",
+    "type": "string"
+    },
+    "callback": {
+    "description": "URL where notification must be send",
+    "type": "string"
+    }
+    }
+    
+    }
+    }
+    }
+  
diff --git a/docs/offeredapis/swagger/service_catalog.json b/docs/offeredapis/swagger/service_catalog.json
new file mode 100644 (file)
index 0000000..04d4d85
--- /dev/null
@@ -0,0 +1,992 @@
+{
+  "swagger": "2.0",
+  "info": {
+    "description": "# About the ONAP Service Catalog API\n The Service Catalog API is based on a subset of the TM Forum 633 Service Catalog Management API.\n## API Overview\n### General Description \nThis Service Catalog API is used to retrieve as well as create the Service Specifications that ONAP supports. As Services are designed and distributed in ONAP SDC, the Service Catalog API allows external systems such as the Business Support Systems (BSS) to discover and create these Services\n\nThe Service Design Center (SDC) of ONAP allows for the design of Services that can be orchestrated by ONAP. ONAP SDC provides the tools to design the Services composition and topology, which is then represented in TOSCA. This Service Catalog API allows a REST API JSON representation of the Service, including the required attributes needed for Service Instantiation of this Service Topology.\n### Relationship and Dependencies\n This Service Catalog API is related to the TM Forum 633 Service Catalog Management API and also to MEF LSO LEGATO Service Catalog API.\n\nThis API takes a subset of the Service Catalog Management API, namely the ServiceSpecification resource, and maps this standard resource to the ONAP SDC Service Templates/Topology. By doing this we allow a well known, standardized JSON REST representation of the Service Templates available in ONAP to be potentially ordered via Service Orders. \n\n### API Structure and Approach\nThe Service Catalog API can be used to get the details of a specific ONAP Service Template, or can be used to search/list the Service Templates that are available. \n## Getting Started with the API (Hello World)\nThe Service Catalog API is available via two schemes, http and https. For interacting with the API the simplest method is via http. To interact with the this API via https, your Client would be required to load the neccessary https certificate. \n\nThe default installation of ONAP via OOM, will configure the use of two Node ports for External APIs. NodePorts are used to allow client applications, that run outside of Kubernetes, access to ONAP components deployed by OOM. For this Service Catalog API, the External API Framework has a http Node port of 30274. For https, the Node port is 30292.\n\n From outside ONAP, a client can interact with External API by first getting the IP that the NBI docker container is running on, and then using the appropriate nodeport according to the access scheme. For example to access this Service Catalog API to retrieve a list of all Service Specifications available in ONAP you can use http method GET to http://{nbi_ip}:30274/nbi/api/v4/serviceSpecification/ \n### SDK quick intro\nThere are many tools that can be used to view and edit this swagger file like swagger editor, Atom and senya. For example this swagger file can be loaded into https://editor.swagger.io/. This UI acts both as an online editor and viewer. \n### How to start the client side implementation\n* Code generation, is available via the Generate Client option in the swagger editor. Client stubs can be generated in multiple languages, for example java, go, python etc. These Client stub code can be incorporated in the Application you wish to access the Service Catalog API from.\n\n### How to start the server side implementation\n* Not applicable, the service side for this API will be the NBI container running the External API Framework Springboot application.\n\n## API Description\nIncludes summary of information drawn from API definitions in OpenAPI / Swagger files\n### Resource Endpoint / Resource Quick Reference\nGET /serviceSpecification/ : This operation returns a list service specifications from a catalog\n\nPOST /serviceSpecification/ : This operation creates a service specification in catalog\n\nGET /serviceSpecification/{id} : This operation returns the service specifications from a catalog associated with this id. Note the id maps to the uuid of the SDC Service Template in the SDC catalog\n\nGET /serviceSpecification/{id}/specificationInputSchema : This operation returns a service specification Input schema by its id from a catalog. Note again the id corresponds to the uuid of the Service Template in SDC.\n\n### Data Schema\n#### Main API Entities\nDescribe the major entities used in the API\n\nThe main entity of the API is the ServiceSpecification resource. This entity is the top level entity of the API, and is returned as either a single instance when queried with id, or as JSON arroy of ServiceSpecification entities when queried as a list.\n\nThe major child enties are relatedParty which points to the designer of the Template in SDC. The resourceSpecification which point to child resources for the Service Template. The serviceSpecCharacteristics entities are used to describe the attributes that can be supplied to instantiate a Service Instance of this Service Template.\n#### Payload data structures\nIf any, describe the appropriate data structures that are included within payload of the API.\n\nNot applicable\n### Security on the API\nAuthentication; Authorization; Credentials/access token; etc.\n\n https certificate required if using https. No authentication on http requests.In production this API should be behind an API Gateway with the necessary authentication\n### Response Codes\nThe meaning of Status Codes & Errors\n\nSee response codes for each API resource in the API section below\n### Rate Limits and Thresholds\nRequests per unit time allowed; Pagination\n\n No rate limits or thresholds, in production this API should be behind an API Gateway with the necessary limits.\n### Validation constraints\nDescribe any behavioral and structural validation constraints\n\nNot applicable\n### Assumptions\nFor example, any Pre/Post conditions\n\n For this API to function and return Service Specifications, SDC is required to be running and Service models designed in the SDC catalog\n## API Interactions and Flows\n### Interaction Examples\nIllustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc\n\nThe Service Catalog API flow of use can generally follow the sequence below\n\n\n#### Call ONAP to discover what available services it can offer\n\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n[\n  {\r\n        \"id\": \"0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n        \"name\": \"EPLServiceTemplate\",\r\n        \"invariantUUID\": \"ddf31f35-8e71-4f5a-a383-4241b87ca7a7\",\r\n        \"category\": \"Network L4+\",\r\n        \"distributionStatus\": \"DISTRIBUTED\",\r\n        \"version\": \"1.0\",\r\n        \"lifecycleStatus\": \"CERTIFIED\",\r\n        \"relatedParty\": {\r\n            \"id\": \"jm0007\",\r\n            \"role\": \"lastUpdater\"\r\n        }\r\n    }\n]\n```\n#### Using the id returned from the list of Service Specifications, drill into any specific Service Specificaton you want to orchestrate/order using\n\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n{\r\n    \"id\": \"0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n    \"name\": \"EPLServiceTemplate\",\r\n    \"invariantUUID\": \"ddf31f35-8e71-4f5a-a383-4241b87ca7a7\",\r\n    \"toscaModelURL\": \"/sdc/v1/catalog/services/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/toscaModel\",\r\n    \"category\": \"Network L4+\",\r\n    \"distributionStatus\": \"DISTRIBUTED\",\r\n    \"version\": \"1.0\",\r\n    \"lifecycleStatus\": \"CERTIFIED\",\r\n    \"relatedParty\": {\r\n        \"id\": \"jm0007\",\r\n        \"name\": \"Joni Mitchell\",\r\n        \"role\": \"lastUpdater\"\r\n    },\r\n    \"resourceSpecification\": [\r\n        {\r\n            \"id\": \"ec910118-ba94-4517-98b5-5bc10f277f4a\",\r\n            \"version\": \"1.0\",\r\n            \"name\": \"TestVF_1579291137027\",\r\n            \"resourceInstanceName\": \"TestVF_1579291137027 0\",\r\n            \"modelCustomizationName\": \"TestVF_1579291137027 0\",\r\n            \"resourceInvariantUUID\": \"df329320-fe21-49c2-96a8-7217ac7143de\",\r\n            \"resourceType\": \"VF\",\r\n            \"@type\": \"ONAPresource\",\r\n            \"modelCustomizationId\": \"ad5fb501-e472-4d79-a303-1a4a56c0fa75\"\r\n        }\r\n    ],\r\n    \"href\": \"serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n    \"attachment\": [],\r\n    \"@type\": \"ONAPservice\",\r\n    \"instantiationType\": \"A-la-carte\",\r\n    \"serviceSpecCharacteristic\": {\r\n        \"name\": \"TestService_1579291137027_ServiceCharacteristics\",\r\n        \"description\": \"This object describes all the inputs needed from the client to interact with the TestService_1579291137027 Service Topology\",\r\n        \"valueType\": \"object\",\r\n        \"@type\": \"ONAPServiceCharacteristic\",\r\n        \"@schemaLocation\": \"null\",\r\n        \"serviceSpecCharacteristicValue\": {\r\n            \"valueType\": \"object\",\r\n            \"@schemaLocation\": \"/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/specificationInputSchema\",\r\n            \"@type\": \"TestService_1579291137027_ServiceCharacteristic\"\r\n        }\r\n    }\r\n}\n```\n\n#### To access Json Schema of the Parameters required to instantiate the Service from this Service Specification\n\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/specificationInputSchema\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n{\r\n  \"ServiceCharacteristics\" : {\r\n    \"required\" : [ \"mscmevcendpointa_evcendpoint_endPointId\", \"mscmevcendpointz_evcendpoint_endPointId\", \"mscmsubscriberunia_subscriberuni_uniIdentifier\", \"mscmsubscriberuniz_subscriberuni_uniIdentifier\" ],\r\n    \"properties\" : {\r\n      \"mscmevcendpointa_evcendpoint_map\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmsubscriberunia_subscriberuni_uniIdentifier\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"String that is used to allow the Sub-scriber and Service Provider to uniquely identify the UNI for oper-ations purposes.\"\r\n      },\r\n      \"mscmevc0_evc_evcType\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"Point-to-Point, Multipoint-to-Mul-tipoint, or Rooted-Multipoint.\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_map\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_endPointUni\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"Specify the UNI where the EvcEndPoint is located. The EvcEndPoint is said to be at this Uni.\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_ingressBwp\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmsubscriberuniz_subscriberuni_uniIdentifier\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"String that is used to allow the Sub-scriber and Service Provider to uniquely identify the UNI for oper-ations purposes.\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_endPointId\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes.\"\r\n      },\r\n      \"mscmevcendpointa_evcendpoint_endPointId\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes.\"\r\n      },\r\n      \"mscmevcendpointa_evcendpoint_ingressBwp\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n\"mscmevc0_evc_listOfEvcEps\" : {\r\n        \"type\" : \"array\",\r\n        \"description\" : \"A list of EVC EP ID Service Attribute values.\"\r\n      },\r\n      \"mscmevc0_evc_evcId\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmevcendpointa_evcendpoint_endPointUni\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"Specify the UNI where the EvcEndPoint is located. The EvcEndPoint is said to be at this Uni.\"\r\n      }\r\n    }\r\n  }\r\n\n```\n\n## Tutorials\nReference any tutorials or use cases. May use links.\n\nTo learn how the  BBS use case used these APIs, please find the Low Level Designs at:\nhttps://wiki.onap.org/pages/viewpage.action?pageId=48532377\n\n## API Mapping Details\nIncludes:\n* Mapping between use cases/requirements and API calls. The BBS Use case used the Service Catalog API to learn the details of the Broad Service. This ServiceSpecification was then included in a Product Ordering as a Service Candidate from the BSS system.\n\n## Glossary\n### API Version\n\nThe version number has major, minor and revision numbers. E.g. v4.1.0 Only the major version number (without the minor number and revision number) is held in the URL. APIs are described with a major version with “v” following the API Name, e.g.: nbi/api/v4/serviceSpecification. The schema associated with a REST API must have its version number aligned with that of the REST API.\n\nThe major version number is incremented for an incompatible change. The minor version number is incremented for a compatible change. For minor modifications of the API, version numbering must not be updated, provided the following backward compatibility rules are respected:\n* New elements in a data type must be optional (minOccurs=0)\n* Changes in the cardinality of an attribute in a data type must be from mandatory to optional or from lower to greater\n* New attributes defined in an element must be optional (absence of use=”required”)\n* If new enumerated values are included, the former ones and its meaning must be kept\n* If new operations are added, the existing operations must be kept\n* New parameters added to existing operations must be optional and existing parameters must be kept\n\nFor major modifications of the API, not backward compatible and forcing client implementations to be changed, the major version number must be updated.",
+    "version": "4.1.0",
+    "title": "ServiceCatalog API",
+    "contact": {
+      "name": "ONAP",
+      "url": "https://onap.readthedocs.io",
+      "email": "onap-discuss@lists.onap.org"
+    },
+    "license": {
+      "name": "Apache 2.0",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0"
+    },
+    "x-planned-retirement-date": "205001",
+    "x-component": "NBI",
+    "x-logo": {
+      "url": "/redoc/logo.png",
+      "backgroundColor": "#FFFFFF"
+    }
+  },
+  "host": "nbi.api.simpledemo.onap.org:30274",
+  "basePath": "/nbi/api/v4",
+  "schemes": [
+    "http",
+    "https"
+  ],
+  "produces": [
+    "application/json;charset=utf-8"
+  ],
+  "tags": [
+    {
+      "name": "ServiceSpecification",
+      "description": ""
+    }
+  ],
+  "paths": {
+    "x-interface": {
+      "api-version": "4.1.0",
+      "last-mod-release": "Frankfurt"
+    },
+    "/serviceSpecification": {
+      "get": {
+        "tags": [
+          "ServiceSpecification"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "serviceSpecification_Find",
+        "summary": "List service specifications",
+        "description": "This operation returns service specifications from a catalog.\nOnly a predefined set of attribute is proposed : Based on SDC limitations, only attributes category and distributionStatus are available for serviceSpecification filtering\nFields attribute could be used to filter attributes retrieved",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "fields",
+            "required": false,
+            "in": "query",
+            "description": "Field selection - used to filtering the attributes to be retreived",
+            "type": "string"
+          },
+          {
+            "name": "category",
+            "required": false,
+            "in": "query",
+            "description": "Service Category (filter)",
+            "type": "string"
+          },
+          {
+            "name": "distributionStatus",
+            "required": false,
+            "in": "query",
+            "description": "Service distribution status (filter)",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Ok",
+            "schema": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ServiceSpecification"
+              }
+            }
+          },
+          "400": {
+            "description": "Bad Request\n\nList of supported error codes:\n- 20: Invalid URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string parameter value",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "401": {
+            "description": "Unauthorized\n\nList of supported error codes:\n- 40: Missing credentials\n- 41: Invalid credentials\n- 42: Expired credentials",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "403": {
+            "description": "Forbidden\n\nList of supported error codes:\n- 50: Access denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many requests",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "404": {
+            "description": "Not Found\n\nList of supported error codes:\n- 60: Resource not found",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "422": {
+            "description": "Unprocessable entity\n\nFunctional error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "500": {
+            "description": "Internal Server Error\n\nList of supported error codes:\n- 1: Internal error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "503": {
+            "description": "Service Unavailable\n\nList of supported error codes:\n- 5: The service is temporarily unavailable\n- 6: Orange API is over capacity, retry later !",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "ServiceSpecification"
+        ],
+        "consumes": [
+          "application/json;charset=utf-8"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "serviceSpecification_Create",
+        "summary": "Create service specification",
+        "description": "This operation creates a service specification in catalog.\nOnly a predefined set of attributes are proposed : Attributes not supported  due to SDC limitations are excluded",
+        "deprecated": false,
+        "parameters": [
+          {
+            "in": "header",
+            "name": "USER_ID",
+            "description": "The catalog user id",
+            "required": true,
+            "type": "string"
+          },
+          {
+            "in": "body",
+            "name": "ServiceSpecificationRequest",
+            "description": "Request payload in json format",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/ServiceSpecificationRequest"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "Created",
+            "schema": {
+              "$ref": "#/definitions/ServiceSpecificationResponse"
+            }
+          },
+          "400": {
+            "description": "Bad Request\n\nList of supported error codes:\n- 20: Invalid URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid header value",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "401": {
+            "description": "Unauthorized\n\nList of supported error codes:\n- 40: Missing credentials\n- 41: Invalid credentials",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "403": {
+            "description": "Forbidden\n\nList of supported error codes:\n- 50: Access denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many requests",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "404": {
+            "description": "Not Found\n\nList of supported error codes:\n- 60: Resource not found",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "422": {
+            "description": "Unprocessable entity\n\nFunctional error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "500": {
+            "description": "Internal Server Error\n\nList of supported error codes:\n- 1: Internal error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "503": {
+            "description": "Service Unavailable\n\nList of supported error codes:\n- 5: The service is temporarily unavailable\n",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          }
+        }
+      }
+    },
+    "/serviceSpecification/{id}": {
+      "get": {
+        "tags": [
+          "ServiceSpecification"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "serviceSpecification_Get",
+        "summary": "Retrieve a service specification",
+        "description": "This operation returns a service specification by its id from a catalog. Attribute selection is enabled using the fields attribute.",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "required": true,
+            "in": "path",
+            "description": "The Id of the ServiceSpecification",
+            "type": "string"
+          },
+          {
+            "name": "fields",
+            "required": false,
+            "in": "query",
+            "description": "Attribute selection",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Ok",
+            "schema": {
+              "$ref": "#/definitions/ServiceSpecification"
+            }
+          },
+          "400": {
+            "description": "Bad Request\n\nList of supported error codes:\n- 20: Invalid URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string parameter value",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "401": {
+            "description": "Unauthorized\n\nList of supported error codes:\n- 40: Missing credentials\n- 41: Invalid credentials\n- 42: Expired credentials",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "403": {
+            "description": "Forbidden\n\nList of supported error codes:\n- 50: Access denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many requests",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "404": {
+            "description": "Not Found\n\nList of supported error codes:\n- 60: Resource not found",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "422": {
+            "description": "Unprocessable entity\n\nFunctional error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "500": {
+            "description": "Internal Server Error\n\nList of supported error codes:\n- 1: Internal error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "503": {
+            "description": "Service Unavailable\n\nList of supported error codes:\n- 5: The service is temporarily unavailable\n- 6: Orange API is over capacity, retry later !",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          }
+        }
+      }
+    },
+    "/serviceSpecification/{id}/specificationInputSchema": {
+      "get": {
+        "tags": [
+          "ServiceSpecification"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "specificationInputSchemaGet",
+        "summary": "Retrieve a service specification Input Schema",
+        "description": "This operation returns a service specification Input schema by its id from a catalog. Attribute selection is enabled using the fields attribute.",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "required": true,
+            "in": "path",
+            "description": "The Id of the ServiceSpecification",
+            "type": "string"
+          },
+          {
+            "name": "fields",
+            "required": false,
+            "in": "query",
+            "description": "Attribute selection",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Ok",
+            "schema": {
+              "$ref": "#/definitions/SpecificationInputSchema"
+            }
+          },
+          "400": {
+            "description": "Bad Request\n\nList of supported error codes:\n- 20: Invalid URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string parameter value",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "401": {
+            "description": "Unauthorized\n\nList of supported error codes:\n- 40: Missing credentials\n- 41: Invalid credentials\n- 42: Expired credentials",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "403": {
+            "description": "Forbidden\n\nList of supported error codes:\n- 50: Access denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many requests",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "404": {
+            "description": "Not Found\n\nList of supported error codes:\n- 60: Resource not found",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "422": {
+            "description": "Unprocessable entity\n\nFunctional error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "500": {
+            "description": "Internal Server Error\n\nList of supported error codes:\n- 1: Internal error",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          },
+          "503": {
+            "description": "Service Unavailable\n\nList of supported error codes:\n- 5: The service is temporarily unavailable\n- 6: Orange API is over capacity, retry later !",
+            "schema": {
+              "$ref": "#/definitions/ErrorRepresentation"
+            }
+          }
+        }
+      }
+    }
+  },
+  "definitions": {
+    "LifecycleStatusValues": {
+      "description": "Service lifecycle value from ONAP SDC",
+      "type": "string",
+      "enum": [
+        "NOT_CERTIFIED_CHECKOUT",
+        "NOT_CERTIFIED_CHECKIN",
+        "READY_FOR_CERTIFICATION",
+        "CERTIFICATION_IN_PROGRESS",
+        "CERTIFIED"
+      ]
+    },
+    "DistributionStatus": {
+      "description": "Service distribution status from ONAP.",
+      "type": "string",
+      "enum": [
+        "DISTRIBUTION_NOT_APPROVED",
+        "DISTRIBUTION_APPROVED",
+        "DISTRIBUTED",
+        "DISTRIBUTION_REJECTED"
+      ]
+    },
+    "ErrorRepresentation": {
+      "description": "This class is used to describe error.\nfor nbi Beijing release we do not manage additional error for serviceCatalog",
+      "required": [
+        "code",
+        "reason"
+      ],
+      "type": "object",
+      "properties": {
+        "code": {
+          "description": "Application related code (as defined in the API or from a common list)",
+          "type": "integer",
+          "format": "int32"
+        },
+        "reason": {
+          "description": "Text that explains the reason for error. This can be shown to a client user.",
+          "type": "string"
+        },
+        "message": {
+          "description": "Text that provide more details and corrective actions related to the error. This can be shown to a client user",
+          "type": "string"
+        },
+        "status": {
+          "description": "http error code extension like 400-2",
+          "type": "string"
+        },
+        "referenceErrror": {
+          "description": "url pointing to documentation describing the error",
+          "type": "string"
+        },
+        "@type": {
+          "description": "The class type of a REST resource.",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "it provides a link to the schema describing a REST resource.",
+          "type": "string"
+        }
+      }
+    },
+    "TimePeriod": {
+      "description": "A time period",
+      "type": "object",
+      "properties": {
+        "startDateTime": {
+          "description": "Start date and time of the period",
+          "type": "string",
+          "format": "date-time"
+        },
+        "endDateTime": {
+          "description": "End date and time of the period",
+          "type": "string",
+          "format": "date-time"
+        }
+      }
+    },
+    "RelatedPartyRef": {
+      "description": "Party linked to the service catalog.\nin nbi we retrieve information about last updater of the service in SDC",
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of the related party. Filled with lastUpdaterUserId",
+          "type": "string"
+        },
+        "role": {
+          "description": "Role payed by the related party\nOnly role 'lastUpdater' is retrieved in Beijing release",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the related party - Filled with lastUpdatedFullName",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceSpecification": {
+      "description": "ServiceSpecification is a class that offers characteristics to describe a type of service. Functionally, it acts as a template by which Services may be instantiated. By sharing the same specification, these services would therefore share the same set of characteristics.\nthe service information are retrieved in SDC",
+      "required": [
+        "invariantUUID"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of the service specification. Filled with SDC Service uuid",
+          "type": "string"
+        },
+        "href": {
+          "description": "Reference of the service specification",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the service specification- Filled with SDC Service name",
+          "type": "string"
+        },
+        "description": {
+          "description": "A narrative that explains in detail what the service specification is - Filled with SDC Service description",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We used this features to add following attributes:\ninvariantUUID\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory (1)\ndistributionStatus",
+          "type": "string",
+          "default": "ONAPservice"
+        },
+        "@schemaLocation": {
+          "description": "Not used",
+          "type": "string"
+        },
+        "@baseType": {
+          "description": "Not used",
+          "type": "string"
+        },
+        "invariantUUID": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - invariantUUID",
+          "type": "string"
+        },
+        "toscaModelURL": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - toscaModelURL",
+          "type": "string"
+        },
+        "toscaResourceName": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - toscaResourceName",
+          "type": "string"
+        },
+        "category": {
+          "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resource",
+          "type": "string"
+        },
+        "subcategory": {
+          "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resourc",
+          "type": "string"
+        },
+        "distributionStatus": {
+          "$ref": "#/definitions/DistributionStatus"
+        },
+        "version": {
+          "description": "Service specification version - Filled with SDC Service version",
+          "type": "string"
+        },
+        "lifecycleStatus": {
+          "$ref": "#/definitions/LifecycleStatusValues"
+        },
+        "targetServiceSchema": {
+          "$ref": "#/definitions/TargetServiceSchemaRef"
+        },
+        "attachment": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Attachment"
+          }
+        },
+        "relatedParty": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/RelatedPartyRef"
+          }
+        },
+        "resourceSpecification": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ResourceSpecificationRef"
+          }
+        },
+        "serviceSpecCharacteristic": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceSpecCharacteristic"
+          }
+        }
+      }
+    },
+    "ServiceSpecificationRequest": {
+      "description": "ServiceSpecification is a class that offers characteristics to describe a type of service. Functionally, it acts as a template by which Services may be instantiated. By sharing the same specification, these services would therefore share the same set of characteristics.",
+      "type": "object",
+      "required": [
+        "name",
+        "description",
+        "category",
+        "relatedParty"
+      ],
+      "properties": {
+        "name": {
+          "description": "Name of the service specification",
+          "type": "string"
+        },
+        "description": {
+          "description": "A narrative that explains in detail what the service specification",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We use this feature to add following attributes:\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory (1)\ndistributionStatus",
+          "type": "string",
+          "default": "ONAPservice"
+        },
+        "@schemaLocation": {
+          "description": "Not used",
+          "type": "string"
+        },
+        "@baseType": {
+          "description": "Not used",
+          "type": "string"
+        },
+        "toscaModelURL": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - toscaModelURL",
+          "type": "string"
+        },
+        "toscaResourceName": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - toscaResourceName",
+          "type": "string"
+        },
+        "category": {
+          "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resource",
+          "type": "string"
+        },
+        "subcategory": {
+          "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resource",
+          "type": "string"
+        },
+        "version": {
+          "description": "Service specification version",
+          "type": "string"
+        },
+        "lifecycleStatus": {
+          "$ref": "#/definitions/LifecycleStatusValues"
+        },
+        "targetServiceSchema": {
+          "$ref": "#/definitions/TargetServiceSchemaRef"
+        },
+        "attachment": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Attachment"
+          }
+        },
+        "relatedParty": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/RelatedPartyRef"
+          }
+        },
+        "resourceSpecification": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ResourceSpecificationRef"
+          }
+        },
+        "serviceSpecCharacteristic": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceSpecCharacteristicRequest"
+          }
+        }
+      }
+    },
+    "ServiceSpecificationResponse": {
+      "description": "ServiceSpecification is a class that offers characteristics to describe a type of service. Functionally, it acts as a template by which Services may be instantiated. By sharing the same specification, these services would therefore share the same set of characteristics.",
+      "type": "object",
+      "properties": {
+        "name": {
+          "description": "Name of the service specification",
+          "type": "string"
+        },
+        "id": {
+          "description": "id of the created service specification",
+          "type": "string"
+        },
+        "href": {
+          "description": "reference to the created service specification",
+          "type": "string"
+        },
+        "description": {
+          "description": "",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We use this feature to add following attributes:\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory (1)\ndistributionStatus",
+          "type": "string",
+          "default": "ONAPservice"
+        },
+        "@schemaLocation": {
+          "description": "Not used",
+          "type": "string"
+        },
+        "@baseType": {
+          "description": "Not used",
+          "type": "string"
+        },
+        "toscaModelURL": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - toscaModelURL",
+          "type": "string"
+        },
+        "toscaResourceName": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - toscaResourceName",
+          "type": "string"
+        },
+        "category": {
+          "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resource",
+          "type": "string"
+        },
+        "subcategory": {
+          "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resource",
+          "type": "string"
+        },
+        "version": {
+          "description": "Service specification version",
+          "type": "string"
+        },
+        "lifecycleStatus": {
+          "$ref": "#/definitions/LifecycleStatusValues"
+        },
+        "targetServiceSchema": {
+          "$ref": "#/definitions/TargetServiceSchemaRef"
+        },
+        "attachment": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Attachment"
+          }
+        },
+        "relatedParty": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/RelatedPartyRef"
+          }
+        },
+        "resourceSpecification": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ResourceSpecificationRef"
+          }
+        },
+        "serviceSpecCharacteristic": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceSpecCharacteristicRequest"
+          }
+        }
+      }
+    },
+    "ServiceSpecCharacteristic": {
+      "description": "A characteristic quality or distinctive feature of a ServiceSpecification. \nServiceSpecCharacteristics are retrieved in the serviceTosca file in the topology_template section in the inputs section.",
+      "type": "object",
+      "properties": {
+        "name": {
+          "description": "Name of the characteristic - Filled with parameter_name",
+          "type": "string"
+        },
+        "description": {
+          "description": "A narrative that explains in detail what the characteristic is - Filled with parameter_description",
+          "type": "string"
+        },
+        "valueType": {
+          "description": "A kind of value that the characteristic can take on, from Dublin from Dublin we use the object type to describe service characteristic values",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with: 'ONAPserviceCharacteristic'. We do not used this feature in nbi",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "An url pointing to type description - we do not use it",
+          "type": "string"
+        },
+        "required": {
+          "description": "A parameter to define if the characteristic is mandatory - Filled from parameter_required – if not fielded by default ‘true’",
+          "type": "boolean",
+          "default": true
+        },
+        "status": {
+          "description": "Status of the characteristic - filled with status_value",
+          "type": "string"
+        },
+        "serviceSpecCharacteristicValue": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceSpecCharacteristicValue"
+          }
+        }
+      }
+    },
+    "ServiceSpecCharacteristicValueRequest": {
+      "description": "A json schema of the service specification input  characteristic values",
+      "type": "object",
+      "properties": {
+        "valueType": {
+          "description": "This attribute describes the type of value",
+          "type": "string"
+        },
+        "isDefault": {
+          "description": "To describe whether the attribute is to be included by default",
+          "type": "boolean"
+        },
+        "value": {
+          "description": "Value of the attribute",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceSpecCharacteristicRequest": {
+      "description": "A characteristic quality or distinctive feature of a ServiceSpecification.",
+      "type": "object",
+      "properties": {
+        "name": {
+          "description": "Name of the characteristic",
+          "type": "string"
+        },
+        "description": {
+          "description": "A narrative that explains in detail what the characteristic is",
+          "type": "string"
+        },
+        "valueType": {
+          "description": "A kind of value that the characteristic can take on, from Dublin from Dublin we use the object type to describe service characteristic values",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with: 'ONAPserviceCharacteristic'. We do not used this feature in nbi",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "An url pointing to type description - we do not use it",
+          "type": "string"
+        },
+        "required": {
+          "description": "A parameter to define if the characteristic is mandatory",
+          "type": "boolean",
+          "default": true
+        },
+        "serviceSpecCharacteristicValue": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceSpecCharacteristicValueRequest"
+          }
+        }
+      }
+    },
+    "Attachment": {
+      "description": "An attachment is a file uses to describe the service.\nIn nbi we use attachment to retrieve ONAP artifacts.",
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of the attachment - filled with artifactUUID.",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the attachment - filled with artifactName",
+          "type": "string"
+        },
+        "description": {
+          "description": "Description of the attachment - filled with artifactDescription",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPartifact'. We used this features to add following attributes: \nartifactLabel\nartifactGroupType\nartifactTimeout\nartifactChecksum\nartifactVersion\ngeneratedFromUUID",
+          "type": "string",
+          "default": "ONAPartifact"
+        },
+        "artifactLabel": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - artifactLabel",
+          "type": "string"
+        },
+        "artifactGroupType": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - artifactGroupType",
+          "type": "string"
+        },
+        "artifactTimeout": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - artifactTimeout",
+          "type": "string"
+        },
+        "artifactChecksum": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - artifactChecksum",
+          "type": "string"
+        },
+        "artifactVersion": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - artifactVersion",
+          "type": "string"
+        },
+        "generatedFromUUID": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - generatedFromUUID",
+          "type": "string"
+        },
+        "url": {
+          "description": "Uniform Resource Locator, is a web page address - filled with artifactURL",
+          "type": "string"
+        },
+        "mimeType": {
+          "description": "Filled with artifactType",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceSpecCharacteristicValue": {
+      "description": "A number or text that can be assigned to a service specification characteristic.\nServiceSpecCharacteristicValue are retrieved in the service Tosca file",
+      "type": "object",
+      "properties": {
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with: 'ServiceSpecName_ServiceCharacteristic'.",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "An url pointing to type description - we use it in nbi for specifying the specificationInputSchema url",
+          "type": "string"
+        },
+        "valueType": {
+          "description": "A kind of value that the characteristic can take on, from Dublin release we use an object valueType to group the Tosca Model Inputs, the object schema is described by the specificationInputSchema url",
+          "type": "string"
+        }
+      }
+    },
+    "SpecificationInputSchema": {
+      "description": "A json schema of the service specification input characteristics \n. The Inputs in the schema files are obtained the service Tosca file Inputs",
+      "type": "object",
+      "properties": {
+        "ServiceCharacteristics": {
+          "$ref": "#/definitions/SchemaForServiceCharacteristics"
+        }
+      }
+    },
+    "SchemaForServiceCharacteristics": {
+      "description": "The object describing the schema of the service specification input characteristics. \n. The Inputs in the schema files are obtained the service Tosca file Inputs",
+      "type": "object",
+      "properties": {
+        "required": {
+          "description": "defines the parameter key names that are mandatory to send",
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "properties": {
+          "description": "defines all the input key names and types for the Service Instantiation",
+          "type": "object"
+        }
+      }
+    },
+    "ResourceSpecificationRef": {
+      "description": "A list of resourceSpec identified to deliver the service.\nfor nbi we retrieve resource information available in service description (through SDC api) bu as well information retrieved in the TOSCA file.",
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of the resource specification - filled with resourceUUID",
+          "type": "string"
+        },
+        "version": {
+          "description": "Version for this resource specification - filled with resourceVersion",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the resource specification - filled with resourceName",
+          "type": "string"
+        },
+        "@type": {
+          "description": "This attribute allows to dynamically extends TMF class. Valued with: 'ONAPresource'. We used this features to add following attributes:\nresourceInstanceName\nresourceInvariantUUID\nresourceType\nmodelCustomizationName\nmodelCustomizationId",
+          "type": "string",
+          "default": "ONAPresource"
+        },
+        "resourceInstanceName": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - resourceInstanceName",
+          "type": "string"
+        },
+        "resourceInvariantUUID": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - resourceInvariantUUID",
+          "type": "string"
+        },
+        "resourceType": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - resoucreType",
+          "type": "string"
+        },
+        "modelCustomizationName": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - Retrieved in the TOSCA file : attribute name in topology_template/node_template for the resource",
+          "type": "string"
+        },
+        "modelCustomizationId": {
+          "description": "Additional attribute (not in the TMF API) - extended through @type - Retrieved in the TOSCA file : attribute customizationUUID in topology_template/node_template for the resource",
+          "type": "string"
+        }
+      }
+    },
+    "TargetServiceSchemaRef": {
+      "description": "Target Service Schema",
+      "required": [
+        "@type",
+        "@schemaLocation"
+      ],
+      "type": "object",
+      "properties": {
+        "@type": {
+          "description": "",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "",
+          "type": "string"
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/docs/offeredapis/swagger/service_inventory.json b/docs/offeredapis/swagger/service_inventory.json
new file mode 100644 (file)
index 0000000..0adf4de
--- /dev/null
@@ -0,0 +1,618 @@
+
+    {
+    "swagger": "2.0",
+    "info": {
+     "description": "# About the ONAP Service Inventory API\n The Service Inventory API is based on a subset of the TM Forum 638 Service Inventory API.\n## API Overview\n### General Description \nThis Service Inventory API is used to retrieve the Service Instances from the ONAP inventory. As Services are ordered from ONAP via the Service Order API, the Service Inventory API allows external systems such as the Business Support Systems (BSS) to discover the Services that have been created in the ONAP Inventory.\n\nThe Service Design Center (SDC) of ONAP allows for the creation of Services that can be orchestrated by ONAP. Once a Service from the Catalog is ordered, the ONAP Service Orchestrator will create a Service Instance within the AAI of ONAP. This API allows a representation of the Service Inventory in TMF 638 format. The Service Inventory API also supports inventory notifications to external listeners. A List of available subscription for serviceInventory notifications, see /hub resources for more information:\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n- ServiceRemoveNotification\n\n \n### Relationship and Dependencies\n This Service Inventory API is related to the TM Forum 638 Service Inventory API and also to MEF LSO LEGATO Service Inventory API.\n\nThis API takes a subset of the Service Inventory API, namely the Service resource, and maps this standard resource to the ONAP AAI Service Instance. By doing this we allow a well known, standardized JSON REST representation of the Service Instances available in ONAP to be visible by external systems. \n\n### API Structure and Approach\nThe Service Inventory API can be used to get the details of a specific ONAP Service Instance, or can be used to search/list the Service Instances that are in the ONAP AAI. \n## Getting Started with the API (Hello World)\nThe Service Inventory API is available via two schemes, http and https. For interacting with the API the simplest method is via http. To interact with the this API via https, your Client would be required to load the neccessary https certificate. \n\nThe default installation of ONAP via OOM, will configure the use of two Node ports for External APIs. NodePorts are used to allow client applications, that run outside of Kubernetes, access to ONAP components deployed by OOM. For this Service Inventory API, the External API Framework has a http Node port of 30274. For https, the Node port is 30292.\n\n From outside ONAP, a client can interact with External API by first getting the IP that the NBI docker container is running on, and then using the appropriate nodeport according to the access scheme. For example to access this Service Inventory API to retrieve a list of all Service Instances available in ONAP you can use http method GET to http://{nbi_ip}:30274/nbi/api/v4/service/ \n### SDK quick intro\nThere are many tools that can be used to view and edit this swagger file like swagger editor, Atom and senya. For example this swagger file can be loaded into https://editor.swagger.io/. This UI acts both as an online editor and viewer. \n### How to start the client side implementation\n* Code generation, is available via the Generate Client option in the swagger editor. Client stubs can be generated in multiple languages, for example java, go, python etc. These Client stub code can be incorporated in the Application you wish to access the Service Inventory API from.\n\n### How to start the server side implementation\n* Not applicable, the service side for this API will be the NBI container running the External API Framework Springboot application.\n\n## API Description\nIncludes summary of information drawn from API definitions in OpenAPI / Swagger files\n### Resource Endpoint / Resource Quick Reference\nGET /service/ : This operation returns a list service instances from AAI\n\nGET /service/{id} : This operation returns the specific service instance associated with this id. Note the id maps to the service-instance-id of the service-instance object in AAI.\n\n### Data Schema\n#### Main API Entities\nDescribe the major entities used in the API\n\nThe main entity of the API is the Service resource. This entity is the top level entity of the API, and is returned as either a single instance when queried with id, or as JSON arroy of Service entities when queried as a list.\n\nThe major child enties are relatedParty which points to the Customer who ordered the Service. The serviceSpecification which points to the Service template in SDC Catalog that was used to create this service instance.\n#### Payload data structures\nIf any, describe the appropriate data structures that are included within payload of the API.\n\nNot applicable\n### Security on the API\nAuthentication; Authorization; Credentials/access token; etc.\n\n https certificate required if using https. No authentication on http requests.In production this API should be behind an API Gateway with the necessary authentication\n### Response Codes\nThe meaning of Status Codes & Errors\n\nSee response codes for each API resource in the API section below\n### Rate Limits and Thresholds\nRequests per unit time allowed; Pagination\n\n No rate limits or thresholds, in production this API should be behind an API Gateway with the necessary limits.\n### Validation constraints\nDescribe any behavioral and structural validation constraints\n\nNot applicable\n### Assumptions\nFor example, any Pre/Post conditions\n\n For this API to function and return Service Instances, SDC is required to be running and Service models designed in the SDC catalog that have been ordered and instantiated by SO in AAI.\n## API Interactions and Flows\n### Interaction Examples\nIllustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc\n\nThe Service Inventory API flow of use can generally follow the sequence below\n\n\n#### Call ONAP to discover what available services it has in the service inventory by listing them\n\n```\ncurl -X GET \"http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/service/\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Using the id returned from the list of Service instances, drill into any specific Service instance you want to view using\n\n\n\n```\ncurl -X GET \"http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/service/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n{\"id\":\"c96fb8ec-8552-4956-8a8d-65680aaa57cc\",\"name\":\"Service_1234\",\"@type\":\"serviceONAP\",\"supportingResource\":[],\"serviceSpecification\":{\"id\":\"462f84e5-f0e5-44c5-ab95-38fb4bf77064\",\"name\":\"CS Template Name\",\"invariantUUID\":\"88dcb2f0-085b-4548-8b93-0882e37d25d8\",\"@type\":\"ONAPservice\"},\"state\":\"active\",\"relatedParty\":{\"role\":\"ONAPcustomer\",\"id\":\"CustomerId1\"},\"type\":\"service-instance\"}\r\n\n```\n\n",
+    "version": "4.1.0",
+    "title": "ServiceInventory API",
+    "contact": {
+      "name": "ONAP",
+      "url": "https://onap.readthedocs.io",
+      "email": "onap-discuss@lists.onap.org"
+    },
+    "license": {
+      "name": "Apache 2.0",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0"
+    },
+    "x-planned-retirement-date": "205001",
+    "x-component": "NBI",
+    "x-logo": {
+    "url": "/redoc/logo.png",
+    "backgroundColor": "#FFFFFF"
+    }
+    },
+    
+      "host": "nbi.api.simpledemo.onap.org:30274",
+      "basePath": "/nbi/api/v4",
+      "schemes": [
+      "https"
+      ],
+    "produces": [
+    "application/json;charset=utf-8"
+    ],
+    "tags": [
+    
+      {
+      "name": "Service",
+      "description": "Provided by NBI"
+      },
+      {
+      "name": "Notification",
+      "description": "provided by subscriber, which MUST has been registered by creating a Hub ressource on NBI"
+      }
+    ],
+    "paths": {
+    "x-interface": {
+    "api-version": "4.1.0",
+    "last-mod-release": "Frankfurt"
+    },
+      "/service": {
+    "get": {
+    "tags": [
+    "Service"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "service_Find",
+    "summary": "List services",
+    "description": "This operation list service entities. \nAttribute selection is restricted. \nfields attribute may be used to filter retrieved attribute(s) for each service",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "relatedParty.id",
+    "required": false,
+    "in": "query",
+    "description": "",
+    
+    "type": "string"
+    },
+    {
+    "name": "serviceSpecification.id",
+    "required": false,
+    "in": "query",
+    "description": "",
+    
+    "type": "string"
+    },
+    {
+    "name": "serviceSpecification.name",
+    "required": false,
+    "in": "query",
+    "description": "",
+    
+    "type": "string"
+    },
+    {
+    "name": "id",
+    "required": false,
+    "in": "query",
+    "description": "",
+    
+    "type": "string"
+    },
+    {
+    "name": "fields",
+    "required": false,
+    "in": "query",
+    "description": "",
+    
+    "type": "string"
+    }
+      ],
+    "responses": {
+    "200": {
+    "description": "Ok",
+    "schema": {
+      "type": "array",
+      "items": {
+    "$ref": "#/definitions/ListService"
+      }
+    }
+    
+    }
+    }
+    }
+      },
+      "/service/{id}": {
+    "get": {
+    "tags": [
+    "Service"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "service_Get",
+    "summary": "Retrieve a service",
+    "description": "This operation retrieves a service entity. \nAttribute selection is enabled for all first level attributes.",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "id",
+    "required": true,
+    "in": "path",
+    "type" : "string"
+    }
+      ],
+    "responses": {
+    "200": {
+    "description": "Ok",
+    "schema": {
+    "$ref": "#/definitions/Service"
+    }
+    
+    }
+    }
+    }
+      },
+      "/notification": {
+    "post": {
+    "tags": [
+    "Notification"
+    ],
+        "consumes": [
+           "application/json;charset=utf-8"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "notification_Create",
+    "summary": "NBI will send notification to this operation provided by subscribers",
+    "description": "",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "Notification",
+    "required": true,
+    "in": "body",
+    "description": "",
+    "schema": {
+    "$ref": "#/definitions/Notification"
+      }
+    }
+      ],
+    "responses": {
+    "201": {
+    "description": "Created",
+    "schema": {
+    "$ref": "#/definitions/Notification"
+    }
+    
+    }
+    }
+    }
+      }
+    },
+    "definitions": {
+    
+    "eventType": {
+    "description": "The Event Type",
+    
+      "type": "string",
+      "enum": [
+        "ServiceCreationNotification",
+        "ServiceAttributeValueChangeNotification",
+        "ServiceRemoveNotification"]
+    
+    },    
+
+    "ErrorRepresentation": {
+    "description": "This class is used to describe error.",
+
+    
+    "required": [
+    
+      "code",
+      "reason"
+    ],
+    "type": "object",
+    "properties": {
+    "code": {
+    "description": "Application related code (as defined in the API or from a common list)",
+    "type": "integer",
+    "format": "int32"
+    },
+    "reason": {
+    "description": "Text that explains the reason for error. This can be shown to a client user.",
+    "type": "string"
+    },
+    "message": {
+    "description": "Text that provide more details and corrective actions related to the error. This can be shown to a client user.",
+    "type": "string"
+    },
+    "status": {
+    "description": "http error code extension like 400-2",
+    "type": "string"
+    },
+    "referenceError": {
+    "description": "url pointing to documentation describing the error",
+    "type": "string"
+    },
+    "@type": {
+    "description": "The class type of a REST resource.",
+    "type": "string"
+    },
+    "@schemaLocation": {
+    "description": "it provides a link to the schema describing a REST resource.",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "Service": {
+    "description": "Instantiated service (service_instance) in AAI",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of the service - Valued with service-instance-id",
+    "type": "string"
+    },
+    "href": {
+    "description": "Reference of the service\nNot managed in Beijing release",
+    "type": "string"
+    },
+    "name": {
+    "description": "Name of the service - Valued with service-instance-name",
+    "type": "string"
+    },
+    "type": {
+    "description": "Service type - valued with 'service-instance'",
+    "type": "string"
+    },
+    "state": {
+    "description": "State of the service.",
+    "type": "string"
+    },
+    "@type": {
+    "description": "This attribute allows to dynamically extends TMF class. Not used in Beijing release.",
+    "type": "string"
+    },
+    "@baseType": {
+    "description": "Not managed in Beijing release",
+    "type": "string"
+    },
+    "@schemaLocation": {
+    "description": "Not managed in Beijing release",
+    "type": "string"
+    },
+    "serviceSpecification": {
+    
+    "$ref": "#/definitions/ServiceSpecificationRef"
+    },
+    "characteristic": {
+    
+    "type": "array",
+    "items": {
+    "$ref": "#/definitions/ServiceCharacteristic"
+    }
+    },
+    "supportingResource": {
+    
+    "type": "array",
+    "items": {
+    "$ref": "#/definitions/SupportingResource"
+    }
+    },
+    "relatedParty": {
+    
+    "type": "array",
+    "items": {
+    "$ref": "#/definitions/RelatedPartyRef"
+    }
+    }
+    }
+    
+    },    
+
+    "ServiceSpecificationRef": {
+    "description": "Service specification reference: ServiceSpecification of this service (catalog information)",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of the service specification. valued to model-version-id",
+    "type": "string"
+    },
+    "href": {
+    "description": "Reference of the service specification.\nnot managed in Beijing release.",
+    "type": "string"
+    },
+    "name": {
+    "description": "Name of the required service specification",
+    "type": "string"
+    },
+    "version": {
+    "description": "Service specification version.\nNot managed in Beijing release",
+    "type": "string"
+    },
+    "@referredType": {
+    "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We used this features to add following attribute: invariantUUID",
+    "type": "string"
+    },
+    "@schemaLocation": {
+    "description": "Not managed in Beijing release",
+    "type": "string"
+    },
+    "invariantUUID": {
+    "description": "Additional attribute (not in the TMF API) - extended through @referredType - model-invariant-id",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "ServiceCharacteristic": {
+    "description": "A list of name value pairs that define the service characteristics\nNot managed in Beijing release.",
+
+    
+    "required": [
+    
+      "name"
+    ],
+    "type": "object",
+    "properties": {
+    "name": {
+    "description": "Name of the characteristic\nNot managed in Beijing release.",
+    "type": "string"
+    },
+    "valueType": {
+    "description": "Type of value for this characteristic.\nNot managed in Beijing release.",
+    "type": "string"
+    },
+    "value": {
+    
+    "$ref": "#/definitions/Value"
+    }
+    }
+    
+    },    
+
+    "SupportingResource": {
+    "description": "Supporting resource - A supportingResource will be retrieved for each relationship of the relationship-list where related-link describe a vnf",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of the supporting resource - Valued to vnf-id",
+    "type": "string"
+    },
+    "href": {
+    "description": "Reference of the supporting resource",
+    "type": "string"
+    },
+    "role": {
+    "description": "Not managed in Beijing release.",
+    "type": "string"
+    },
+    "name": {
+    "description": "Name of the supporting resource - Valued with vnf_-name",
+    "type": "string"
+    },
+    "@referredType": {
+    "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAP resource'. We used this features to add following attributes:\n    status\t\n    modelInvariantId\n   modelVersionId\n   modelCustomisationId",
+    "type": "string"
+    },
+    "@schemaLocation": {
+    "description": "Not managed in Beijing release.",
+    "type": "string"
+    },
+    "status": {
+    "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with prov-status",
+    "type": "string"
+    },
+    "modelInvariantId": {
+    "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with model-invariant-id",
+    "type": "string"
+    },
+    "modelVersionId": {
+    "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with model-verson-id",
+    "type": "string"
+    },
+    "modelCustomisationId": {
+    "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with model-customisation-id",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "RelatedPartyRef": {
+    "description": "RelatedParty reference. A related party defines party or party role linked to a specific entity.",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of a related party",
+    "type": "string"
+    },
+    "href": {
+    "description": "Reference of a related party.\nNot filled in Beijing release.",
+    "type": "string"
+    },
+    "role": {
+    "description": "Role played by the related party.\nFilled with 'ONAPcustomer'",
+    "type": "string"
+    },
+    "@referredType": {
+    "description": "Not managed in the Beijing release.",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "Value": {
+    "description": "Structure used to describe characteristic value.\nNot managed in Beijing release.",
+
+    
+    "type": "object",
+    "properties": {
+    "@type": {
+    "description": "Not managed in Beijing release.",
+    "type": "string"
+    },
+    "@schemaLocation": {
+    "description": "Not managed in Beijing release.",
+    "type": "string"
+    },
+    "serviceCharacteristicValue": {
+    "description": "Not managed in Beijing release.",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "ListRelatedPartyRef": {
+    "description": "This class is used to structure list of service(s) retrieved",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of a related party",
+    "type": "string"
+    },
+    "role": {
+    "description": "Role played by the related party - only role “ONAPcustomer” is managed in Beijing release.",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "ListServiceSpecificationRef": {
+    "description": "This class is used to structure list of service(s) retrieved",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of the service specification",
+    "type": "string"
+    },
+    "name": {
+    "description": "Name of the required service specification",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "ListService": {
+    "description": "This class is used to structure list of service(s) retrieved",
+
+    
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "Unique identifier of the service",
+    "type": "string"
+    },
+    "name": {
+    "description": "Name of the service",
+    "type": "string"
+    },
+    "serviceSpecification": {
+    
+    "$ref": "#/definitions/ListServiceSpecificationRef"
+    },
+    "relatedParty": {
+    
+    "$ref": "#/definitions/ListRelatedPartyRef"
+    }
+    }
+    
+    },    
+
+    "ServiceInventoryEvent": {
+    "description": "Structure for a service inventory event notification",
+
+    
+    "required": [
+    
+      "id",
+      "href",
+      "name",
+      "type",
+      "state",
+      "relatedParty"
+    ],
+    "type": "object",
+    "properties": {
+    "id": {
+    "description": "The Service Instance Id",
+    "type": "string"
+    },
+    "href": {
+    "description": "A reference to the service inventory",
+    "type": "string"
+    },
+    "name": {
+    "description": "The name of the Service Instance",
+    "type": "string"
+    },
+    "type": {
+    "description": "The type of event, service-instance",
+    "type": "string"
+    },
+    "state": {
+    "description": "The state of the service instance",
+    "type": "string"
+    },
+    "relatedParty": {
+    
+    "$ref": "#/definitions/RelatedPartyRef"
+    }
+    }
+    
+    },    
+
+    "Notification": {
+    "description": "Notification structure for a service notification",
+
+    
+    "required": [
+    
+      "eventId",
+      "eventDate",
+      "eventType",
+      "event"
+    ],
+    "type": "object",
+    "properties": {
+    "eventId": {
+    "description": "",
+    "type": "string"
+    },
+    "eventDate": {
+    "description": "",
+    "type": "string",
+    "format": "date-time"
+    },
+    "eventType": {
+    
+    "$ref": "#/definitions/eventType"
+    },
+    "event": {
+    
+    "$ref": "#/definitions/ServiceInventoryEvent"
+    }
+    }
+    
+    }
+    }
+    }
+  
diff --git a/docs/offeredapis/swagger/service_order.json b/docs/offeredapis/swagger/service_order.json
new file mode 100644 (file)
index 0000000..9c689db
--- /dev/null
@@ -0,0 +1,995 @@
+{
+  "swagger": "2.0",
+  "info": {
+    "description": "# About the ONAP Service Order API\n The Service Catalog API is based on the TM Forum 641 Service Ordering API.\n ## API Overview\n### General Description \n The Service Order API is used to request the instantiation, deletion or modification of a service\n\nA Service Order is a type of order which can be used to describe a group of operations on service – one service order item per service. An action at the level of the service order item describes the operation to be completed on a service (add, delete for example). The service order is triggered from external system such as the BSS system in charge of the product order management to ONAP that will manage the service fulfillment.\n\nList of available subscription for serviceOrdering notifications, see /hub resources swagger for more detailed information:\n\n- ServiceOrderCreationNotification\n- ServiceOrderStateChangeNotification\n- ServiceOrderItemStateChangeNotification\n\n### Relationship and Dependencies\n This Service Ordering API is related to the TM Forum 641 Service Ordering API and also to MEF LSO LEGATO Service Ordering API.\n\nThis API takes a subset of the Service Ordering API formal specification and maps it to the internals of ONAP APIS. By doing this we allow a well known, standardized JSON REST representation of the Service Templates available in ONAP to be ordered via well known Service Order formet. The main interaction for a Service Order are with ONAP Service Orchestrator (SO) for Service Instanctiation, ONAP Service and Design Center (SDC) for validating the order is for a known ONAP Service and AAI to make sure that for a service deltion or modification order, that the service instance is a valid Service instance in the ONAP Inventory\n\n### API Structure and Approach\nThe Service Ordering API can be used to order a Service from ONAP for any specific ONAP Service Template offering in the ONAP Service Catalog, or it can be used to modify or delete a Service Instance that has been already created in ONAP inventory. \n## Getting Started with the API (Hello World)\nThe Service Ordering API is available via two schemes, http and https. For interacting with the API the simplest method is via http. To interact with this API via https, your Client would be required to load the neccessary https certificate. \n\nThe default installation of ONAP via OOM, will configure the use of two Node ports for External APIs. NodePorts are used to allow client applications, that run outside of Kubernetes, access to ONAP components deployed by OOM. For this Service Ordering API, the External API Framework has a http Node port of 30274. For https, the Node port is 30292.\n\n From outside ONAP, a client can interact with External API by first getting the IP that the NBI docker container is running on, and then using the appropriate nodeport according to the access scheme. For example to retrieve a list of all Service orders  in ONAP SOM you can use http method GET to http://{nbi_ip}:30274/nbi/api/v4/serviceOrder/ \n### SDK quick intro\nThere are many tools that can be used to view and edit this swagger file like swagger editor, Atom and senya. For example this swagger file can be loaded into https://editor.swagger.io/. This UI acts both as an online editor and viewer. \n### How to start the client side implementation\n* Code generation, is available via the Generate Client option in the swagger editor. Client stubs can be generated in multiple languages, for example java, go, python etc. These Client stub code can be incorporated in the Application you wish to access the Service Ordering API from.\n\n### How to start the server side implementation\n* Not applicable, the service side for this API will be the NBI container running the External API Framework Springboot application.\n\n## API Description\nIncludes summary of information drawn from API definitions in OpenAPI / Swagger files\n### Resource Endpoint / Resource Quick Reference\nGET /serviceOrder/ : This operation returns a list service orders from External API Framework DB\n\nGET /serviceOrder/{id} : This operation returns the service order associated with this id.\n\n POST /serviceOrder : This operation is used to create a service order, with one of the following three action types, add, delete or modify. Note add is used to Instantiate a new service Instance of the specified Service Template ( SDC uuid) when NBI makes calls to SO to execute the instantiation workflows. The delete action is used to delete a specified service instance id ( AAI instance id ), while action modify is to modify the service instance.\n\n### Data Schema\n#### Main API Entities\nDescribe the major entities used in the API\n\nThe main entity of the API is the ServiceOrder resource. This entity is the top level entity of the API, and is returned as either a single instance when queried with id, or as JSON arroy of ServiceOrder entities when queried as a list.\n\nThe major child enties are relatedParty which points to the customer who is ordering the Service. This customer is related to the customer in the AAI where this servie instance for the order is placed. The orderItem is an array, meaning more that one service can be orders within the one Serice Order. i.e. each orderItem corresponds to one service instance. The serviceSpecCharacteristics entities are used to describe the attributes that can be supplied to instantiate a Service Instance of this Service Template.\n#### Payload data structures\nIf any, describe the appropriate data structures that are included within payload of the API.\n\nNot applicable\n### Security on the API\nAuthentication; Authorization; Credentials/access token; etc.\n\n https certificate required if using https. No authentication on http requests.In production this API should be behind an API Gateway with the necessary authentication\n### Response Codes\nThe meaning of Status Codes & Errors\n\nSee response codes for each API resource in the API section below\n### Rate Limits and Thresholds\nRequests per unit time allowed; Pagination\n\n No rate limits or thresholds, in production this API should be behind an API Gateway with the necessary limits.\n### Validation constraints\nDescribe any behavioral and structural validation constraints\n\nNot applicable\n### Assumptions\nFor example, any Pre/Post conditions\n\n For this API to function, SDC is required to be running and Service models designed in the SDC catalog. SO, AAI and DMaaP also need to be running as a minimum. \n## API Interactions and Flows\n### Interaction Examples\nIllustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc\n\nThe Service Order API flow of use can generally follow the sequence below\n\n\n#### Call ONAP to discover what available services it can offer\n```\ncurl -X GET \"http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceSpecification/\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n[\n  {\r\n        \"id\": \"0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n        \"name\": \"EPLServiceTemplate\",\r\n        \"invariantUUID\": \"ddf31f35-8e71-4f5a-a383-4241b87ca7a7\",\r\n        \"category\": \"Network L4+\",\r\n        \"distributionStatus\": \"DISTRIBUTED\",\r\n        \"version\": \"1.0\",\r\n        \"lifecycleStatus\": \"CERTIFIED\",\r\n        \"relatedParty\": {\r\n            \"id\": \"jm0007\",\r\n            \"role\": \"lastUpdater\"\r\n        }\r\n    }\n]\n```\n\nUsing the id returned from the list of Service Specifications, pick one you would like to order an instance of.\n Using the instantation serviceCharacteristics from the Catalog construct the Service Order POST body associated with this template.\n Then POST the Service Order with an action of add to ask ONAP to instanctiate a Service Instance.\n\n#### Example POST Service Order Body\n\n```\n{\r\n        \"externalId\": \"BBS_BSS_TrackindId8888\",\r\n        \"priority\": \"1\",\r\n        \"description\": \"Service Order for a new HSIA CFS\",\r\n        \"category\": \"Network Service\",\r\n        \"relatedParty\": [\r\n            {\r\n                \"id\": \"BBSCustomer\",\r\n                \"href\": null,\r\n                \"role\": \"ONAPcustomer\",\r\n                \"name\": \"EnterpriseA\",\r\n                \"@referredType\": \"Consumer\"\r\n            }\r\n        ],\r\n        \"orderItem\": [\r\n            {\r\n                \"id\": \"1\",\r\n                \"action\": \"add\",\r\n                \"service\": {\r\n                    \"name\": \"BBS_E2E_Service\",\r\n                    \"serviceState\": \"active\",\r\n                    \"serviceCharacteristic\": [\r\n                        {\r\n                            \"name\": \"ont_ont_serial_num\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_serial_num\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_rg_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"rg_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_downstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_access_id\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"profile_ip_access_id\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_swVersion\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_swVersion\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_manufacturer\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_manufacturer\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_service_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"service_type\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_pnf_name\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_pnf_name\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_upstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_nf_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_nf_type\"\r\n                            }\r\n                        }\r\n                    ],\r\n                    \"serviceSpecification\": {\r\n                        \"id\": \"90b476bc-0988-4417-bae9-41b376f0e1b6\"\r\n                    }\r\n                }\r\n            }\r\n        ]\r\n}\n```\n\n\n#### You can then track the Service Order progress using the returned order id from the POST response. Use GET with the returned order id GET /nbi/api/v4/serviceOrder/5c988c98e3caf4000173cb4d\n\n#### Example GET Service Order by specific order id Response\n```\n\n{\r\n        \"id\": \"5c988c98e3caf4000173cb4d\",\r\n        \"href\": \"serviceOrder\/5c988c98e3caf4000173cb4d\",\r\n        \"externalId\": \"BBS_BSS_TrackindId6979\",\r\n        \"priority\": \"1\",\r\n        \"description\": \"Service Order for a new HSIA CFS\",\r\n        \"category\": \"Network Service\",\r\n        \"state\": \"inProgress\",\r\n        \"orderDate\": \"2019-03-25T08:08:56.297Z\",\r\n        \"completionDateTime\": null,\r\n        \"expectedCompletionDate\": null,\r\n        \"requestedStartDate\": null,\r\n        \"requestedCompletionDate\": null,\r\n        \"startDate\": null,\r\n        \"@baseType\": null,\r\n        \"@type\": null,\r\n        \"@schemaLocation\": null,\r\n        \"relatedParty\": [\r\n            {\r\n                \"id\": \"testcustomer5\",\r\n                \"href\": null,\r\n                \"role\": \"ONAPcustomer\",\r\n                \"name\": \"EnterpriseA\",\r\n                \"@referredType\": \"Consumer\"\r\n            }\r\n        ],\r\n        \"orderRelationship\": null,\r\n        \"orderItem\": [\r\n            {\r\n                \"orderMessage\": [],\r\n                \"id\": \"1\",\r\n                \"action\": \"add\",\r\n                \"state\": \"inProgress\",\r\n                \"percentProgress\": \"0\",\r\n                \"@type\": null,\r\n                \"@schemaLocation\": null,\r\n                \"@baseType\": null,\r\n                \"orderItemRelationship\": [],\r\n                \"service\": {\r\n                    \"id\": \"ee8ddf86-b653-4377-809a-05811fea8501\",\r\n                    \"href\": null,\r\n                    \"name\": \"BBS_E2E_Service\",\r\n                    \"serviceState\": \"active\",\r\n                    \"@type\": null,\r\n                    \"@schemaLocation\": null,\r\n                    \"serviceCharacteristic\": [\r\n                        {\r\n                            \"name\": \"ont_ont_serial_num\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_serial_num\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_rg_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"rg_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_downstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_access_id\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"profile_ip_access_id\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_swVersion\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_swVersion\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_manufacturer\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_manufacturer\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_service_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"service_type\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_pnf_name\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_pnf_name\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_upstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_nf_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_nf_type\"\r\n                            }\r\n                        }\r\n                    ],\r\n                    \"serviceRelationship\": null,\r\n                    \"relatedParty\": null,\r\n                    \"serviceSpecification\": {\r\n                        \"id\": \"90b476bc-0988-4417-bae9-41b376f0e1b6\",\r\n                        \"href\": null,\r\n                        \"name\": null,\r\n                        \"version\": null,\r\n                        \"targetServiceSchema\": null,\r\n                        \"@type\": null,\r\n                        \"@schemaLocation\": null,\r\n                        \"@baseType\": null\r\n                    }\r\n                },\r\n                \"orderItemMessage\": []\r\n            }\r\n        ],\r\n        \"orderMessage\": null\r\n}\n```\n\n",
+    "version": "4.1.0",
+    "title": "ServiceOrder API",
+    "contact": {
+      "name": "ONAP",
+      "url": "https://onap.readthedocs.io",
+      "email": "onap-discuss@lists.onap.org"
+    },
+    "license": {
+      "name": "Apache 2.0",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0"
+    },
+    "x-planned-retirement-date": "205001",
+    "x-component": "NBI",
+    "x-logo": {
+      "url": "/redoc/logo.png",
+      "backgroundColor": "#FFFFFF"
+    }
+  },
+  "host": "nbi.api.simpledemo.onap.org:30274",
+  "basePath": "/nbi/api/v4",
+  "schemes": [
+    "https"
+  ],
+  "produces": [
+    "application/json;charset=utf-8"
+  ],
+  "tags": [
+    {
+      "name": "ServiceOrder",
+      "description": "provided by NBI"
+    },
+    {
+      "name": "Notification",
+      "description": "provided by subscribers, which MUST registered by creating a hub resource"
+    }
+  ],
+  "paths": {
+    "x-interface": {
+    "api-version": "4.1.0",
+    "last-mod-release": "Frankfurt"
+    },
+    "/serviceOrder": {
+      "post": {
+        "tags": [
+          "ServiceOrder"
+        ],
+        "consumes": [
+          "application/json;charset=utf-8"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "serviceOrder_Create",
+        "summary": "Create a service order",
+        "description": "This operation creates a service order entity.\nThe TMF Open API specification document provides the list of mandatory and non mandatory attributes when creating a ServiceOrder, including any possible rule conditions and applicable default values.\nPOST should be used without specifying the id and the href, the Service Order Management system is in charge of generating the id + href for the ServiceOrder.\n\nIn Beijing Release, NBI will use only POST {{url}}/ecomp/mso/infra/serviceInstances/v4 SO API. This mean that only the 'service-instance' level will be created in AAI. Additional resource like VNF and/OR VF are not created.\n\nIn Casablanca release, NBI has been improved to also be able to use POST {{url}}/e2eServiceInstances/v3 SO API. This API is able to instantiate in ONAP E2E service; This is useful for CCVPN and VoLTE UC.\nDepending on the service category defined in SDC, NBI will use one or the other SO API. If category starts with e2e, NBI will use  {url}}/e2eServiceInstances/v3 SO API - else it will use {{url}}/ecomp/mso/infra/serviceInstances/v4 SO API.",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "serviceOrder",
+            "required": true,
+            "in": "body",
+            "description": "",
+            "schema": {
+              "$ref": "#/definitions/CreateServiceOrder"
+            }
+          },
+          {
+            "name": "Target",
+            "required": false,
+            "in": "header",
+            "description": "",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "Created",
+            "schema": {
+              "$ref": "#/definitions/ServiceOrder"
+            }
+          }
+        }
+      },
+      "get": {
+        "tags": [
+          "ServiceOrder"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "serviceOrder_Find",
+        "summary": "List service orders",
+        "description": "Retrieve and list service order entities according to given criteria.\nOnly a predefined set of attribute is proposed.\nAttribute selection could be described in the fields attribute.",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "externalId",
+            "required": false,
+            "in": "query",
+            "description": "",
+            "type": "string"
+          },
+          {
+            "name": "state",
+            "required": false,
+            "in": "query",
+            "description": "state of the order(s) to be retrieved",
+            "type": "string"
+          },
+          {
+            "name": "description",
+            "required": false,
+            "in": "query",
+            "description": "",
+            "type": "string"
+          },
+          {
+            "name": "orderDate.gt",
+            "required": false,
+            "in": "query",
+            "description": "order date greather than",
+            "type": "string"
+          },
+          {
+            "name": "orderDate.lt",
+            "required": false,
+            "in": "query",
+            "description": "order date lower than",
+            "type": "string"
+          },
+          {
+            "name": "fields",
+            "required": false,
+            "in": "query",
+            "description": "this attribute could be used to filter retrieved attribute(s) and/or sort SO.",
+            "type": "string"
+          },
+          {
+            "name": "offset",
+            "required": false,
+            "in": "query",
+            "description": "The index of the first element to retrieve. Zero is the first element of the collection.",
+            "type": "integer",
+            "format": "int32"
+          },
+          {
+            "name": "limit",
+            "required": false,
+            "in": "query",
+            "description": "The maximum number of elements to retrieve (it can be greater than the actual available number of items).",
+            "type": "integer",
+            "format": "int32"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Ok",
+            "schema": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ServiceOrder"
+              }
+            },
+            "headers": {
+              "X-Total-Count": {
+                "description": "",
+                "type": "integer",
+                "format": "int32"
+              },
+              "X-Result-Count": {
+                "description": "",
+                "type": "integer",
+                "format": "int32"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/serviceOrder/{id}": {
+      "get": {
+        "tags": [
+          "ServiceOrder"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "serviceOrder_Get",
+        "summary": "Retrieve a service order",
+        "description": "This operation retrieves a service order entity. \nAttribute selection is enabled for all first level attributes.",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "required": true,
+            "in": "path",
+            "description": "",
+            "type": "string"
+          },
+          {
+            "name": "fields",
+            "required": false,
+            "in": "query",
+            "description": "Attribute selection",
+            "type": "string"
+          },
+          {
+            "name": "Target",
+            "required": false,
+            "in": "header",
+            "description": "",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Ok",
+            "schema": {
+              "$ref": "#/definitions/ServiceOrder"
+            }
+          }
+        }
+      }
+    },
+    "/notification": {
+      "post": {
+        "tags": [
+          "Notification"
+        ],
+        "consumes": [
+          "application/json;charset=utf-8"
+        ],
+        "produces": [
+          "application/json;charset=utf-8"
+        ],
+        "operationId": "notification_Create",
+        "summary": "NBI will send notification to this operation provided by subscribers",
+        "description": "Notification structure depends of the eventType:\n\n- ServiceOrderCreationNotification\n- ServiceOrderStateChangeNotification\n\n```\n{\n  \"eventId\": \"string\",\n  \"eventDate\": \"2019-03-12T16:21:27.530Z\",\n  \"eventType\": \"string\",\n  \"event\": {\n    \"id\": \"string\",\n    \"href\": \"string\",\n    \"externalId\": \"string\",\n    \"state\": \"acknowledged\",\n    \"orderDate\": \"2019-03-12T16:21:27.530Z\",\n    \"completionDateTime\": \"2019-03-12T16:21:27.530Z\"\n  }\n}\n```\n\n- ServiceOrderItemStateChangeNotification\n\n```\n{\n  \"eventId\": \"string\",\n  \"eventDate\": \"2019-03-12T16:21:44.066Z\",\n  \"eventType\": \"string\",\n  \"event\": {\n    \"id\": \"string\",\n    \"href\": \"string\",\n    \"externalId\": \"string\",\n    \"state\": \"acknowledged\",\n    \"orderDate\": \"2019-03-12T16:21:44.066Z\",\n    \"completionDateTime\": \"2019-03-12T16:21:44.066Z\",\n    \"orderItem\": [\n      {\n        \"id\": \"string\",\n        \"action\": \"add\",\n        \"state\": \"acknowledged\",\n        \"service\": {\n          \"id\": \"string\",\n          \"href\": \"string\",\n          \"name\": \"string\",\n          \"serviceState\": \"string\",\n          \"serviceCharacteristic\": [\n            {\n              \"name\": \"string\",\n              \"valueType\": \"string\",\n              \"value\": {\n                \"serviceCharacteristicValue\": \"string\"\n              }\n            }\n          ],\n          \"serviceRelationship\": [\n            {\n              \"type\": \"reliesOn\"\n            }\n          ],\n          \"relatedParty\": [\n            {\n              \"id\": \"string\",\n              \"href\": \"string\",\n              \"role\": \"string\",\n              \"name\": \"string\",\n              \"@referredType\": \"string\"\n            }\n          ],\n          \"serviceSpecification\": {\n            \"id\": \"string\",\n            \"href\": \"string\",\n            \"name\": \"string\",\n            \"version\": \"string\",\n          }\n        }\n      }\n    ]\n  }\n}\n```",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "Notification",
+            "required": true,
+            "in": "body",
+            "description": "",
+            "schema": {
+              "$ref": "#/definitions/Notification"
+            }
+          },
+          {
+            "name": "Target",
+            "required": false,
+            "in": "header",
+            "description": "",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "Created",
+            "schema": {
+              "$ref": "#/definitions/Notification"
+            }
+          }
+        }
+      }
+    }
+  },
+  "definitions": {
+    "ActionType": {
+      "description": "Action type to be describer on the order item.\nmodify is not managed in Beijing release",
+      "type": "string",
+      "enum": [
+        "add",
+        "modify",
+        "delete",
+        "noChange"
+      ]
+    },
+    "StateType": {
+      "description": "List of possible state for the order and the orderItem.",
+      "type": "string",
+      "enum": [
+        "acknowledged",
+        "rejected",
+        "pending",
+        "held",
+        "inProgress",
+        "cancelled",
+        "completed",
+        "failed",
+        "partial"
+      ]
+    },
+    "RelationshipType": {
+      "description": "Relationship type;\nOnly reliesOn is managed in Beijing release.",
+      "type": "string",
+      "enum": [
+        "reliesOn"
+      ]
+    },
+    "EventType": {
+      "description": "The Event Type",
+      "type": "string",
+      "enum": [
+        "ServiceOrderCreationNotification",
+        "ServiceOrderStateChangeNotification",
+        "ServiceOrderItemStateChangeNotification"
+      ]
+    },
+    "ServiceState": {
+      "description": "The lifecycle state of the service requested - Required for E2E service activation and deactivation with ServiceOrderItem.action as 'modify'.For any other service modification request,service state value should not be passed.Lifecycle is not fully managed in Guilin release",
+      "type": "string",
+      "enum": [
+        "active",
+        "inactive"
+      ]
+    },
+    "SeverityMessage": {
+      "description": "Message Severity, either information or error",
+      "type": "string",
+      "enum": [
+        "information",
+        "error"
+      ]
+    },
+    "Error": {
+      "description": "Error code and reason",
+      "required": [
+        "code",
+        "reason"
+      ],
+      "type": "object",
+      "properties": {
+        "code": {
+          "description": "Application related code (as defined in the API or from a common list)",
+          "type": "integer",
+          "format": "int32"
+        },
+        "reason": {
+          "description": "Text that explains the reason for error. This can be shown to a client user.",
+          "type": "string"
+        },
+        "message": {
+          "description": "Text that provide more details and corrective actions related to the error. This can be shown to a client user",
+          "type": "string"
+        },
+        "status": {
+          "description": "http error code extension like 400-2",
+          "type": "string"
+        },
+        "referenceError": {
+          "description": "url pointing to documentation describing the error",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceRelationship": {
+      "description": "Linked Services to the one instantiate\nnbi component used this relationship to sort request to ONAP.",
+      "required": [
+        "type",
+        "service"
+      ],
+      "type": "object",
+      "properties": {
+        "type": {
+          "$ref": "#/definitions/RelationshipType"
+        },
+        "service": {
+          "$ref": "#/definitions/Service"
+        }
+      }
+    },
+    "ServiceRef": {
+      "description": "Service references",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of the service",
+          "type": "string"
+        },
+        "href": {
+          "description": "Reference of the service",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceCharacteristic": {
+      "description": "ServiceCharacteristic",
+      "required": [
+        "name"
+      ],
+      "type": "object",
+      "properties": {
+        "name": {
+          "description": "Name of characteristic",
+          "type": "string"
+        },
+        "valueType": {
+          "description": "",
+          "type": "string"
+        },
+        "value": {
+          "$ref": "#/definitions/Value"
+        }
+      }
+    },
+    "RelatedParty": {
+      "description": "A related party defines party which are involved in this order and the role they are playing.\nfor Beijing release:\nWith the current version of APIs used from SO and AAI we need to manage a ‘customer’. This customer concept is confusing with Customer BSS concept. We took the following rules to manage the ‘customer’ information:\no\tIt could be provided through a serviceOrder in the service Order a relatedParty with role ‘ONAPcustomer’ should be provided in the serviceOrder header (we will not consider in this release the party at item level); External API component will check if this customer exists and create it in AAI if not.\no\tIf no relatedParty are provided the service will be affected to ‘generic’ customer (dummy customer) – we assume this ‘generic’ customer always exists.",
+      "required": [
+        "id",
+        "role"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of a related party",
+          "type": "string"
+        },
+        "href": {
+          "description": "An hyperlink to the party - not used in Beijnig release",
+          "type": "string"
+        },
+        "role": {
+          "description": "The role of the related party (e.g. Owner, requester, fullfiller etc).\nONLY 'ONAPcustomer' is considered",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the related party",
+          "type": "string"
+        },
+        "@referredType": {
+          "description": "",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceSpecificationRef": {
+      "description": "The service specification (these attributes are fetched from the catalogue).",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Unique identifier of the service specification\nThis information will be used to retrieve SDC information + mapped to SO ModelNameVersionIdin the request.",
+          "type": "string"
+        },
+        "href": {
+          "description": "Reference of the service specification\nNot used in Beijing release.",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the service specification\nNot used in Beijing release",
+          "type": "string"
+        },
+        "version": {
+          "description": "Version of the service Specification\nNot used in Beijing release",
+          "type": "string"
+        },
+        "targetServiceSchema": {
+          "$ref": "#/definitions/TargetServiceSchema"
+        },
+        "@type": {
+          "description": "Not used in Beijing release",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "Not used in Beijing release",
+          "type": "string"
+        },
+        "@baseType": {
+          "description": "Not used in Beijing release",
+          "type": "string"
+        }
+      }
+    },
+    "Service": {
+      "description": "Service (to be added, modified, deleted) description",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Identifier of a service instance.\nIt must be valued if orderItem action is 'delete' and corresponds to a AAI service.id",
+          "type": "string"
+        },
+  "serviceType":{
+    "description": "Business type of the service.\nFor example : 5G",
+    "type": "string"
+  },
+        "href": {
+          "description": "Reference to the Service (useful for delete or modify command).\nNot managed in Beijing release.",
+          "type": "string"
+        },
+        "name": {
+          "description": "Name of the service - When orderItem action is 'add' this name will be used in ONAP/SO request as InstaceName.",
+          "type": "string"
+        },
+        "serviceState": {
+          "$ref": "#/definitions/ServiceState"
+        },
+        "@type": {
+          "description": "To define the service type\nNot managed in Beijing Release",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "The URL to get the resource schema.\nNot managed in Beijing Release",
+          "type": "string"
+        },
+        "serviceCharacteristic": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceCharacteristic"
+          }
+        },
+        "serviceRelationship": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceRelationship"
+          }
+        },
+        "relatedParty": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/RelatedParty"
+          }
+        },
+        "serviceSpecification": {
+          "$ref": "#/definitions/ServiceSpecificationRef"
+        }
+      }
+    },
+    "OrderItemRelationship": {
+      "description": "Linked order item to the one containing this attribute.\nnbi component used this relationship to sort request to ONAP.",
+      "required": [
+        "type",
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "type": {
+          "$ref": "#/definitions/RelationshipType"
+        },
+        "id": {
+          "description": "Unique identifier of an order item",
+          "type": "string"
+        }
+      }
+    },
+    "ServiceOrderItem": {
+      "description": "An identified part of the order. A service order is decomposed into one or more order items.",
+      "required": [
+        "id",
+        "service"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Identifier of the line item (generally it is a sequence number 01, 02, 03, …)",
+          "type": "string"
+        },
+        "action": {
+          "$ref": "#/definitions/ActionType"
+        },
+        "state": {
+          "$ref": "#/definitions/StateType"
+        },
+        "percentProgress": {
+          "description": "Progress of the delivery in percentage.",
+          "type": "string"
+        },
+        "@type": {
+          "description": "Used to extend the order item.\nnot used in Beijing relase",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "not used in Beijing relase",
+          "type": "string"
+        },
+        "@baseType": {
+          "description": "not used in Beijing relase",
+          "type": "string"
+        },
+        "orderItemRelationship": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/OrderItemRelationship"
+          }
+        },
+        "service": {
+          "$ref": "#/definitions/Service"
+        },
+        "orderItemMessage": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/OrderMessage"
+          }
+        }
+      }
+    },
+    "ServiceOrder": {
+      "description": "A Service Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "ID created on repository side",
+          "type": "string"
+        },
+        "href": {
+          "description": "Hyperlink to access the order",
+          "type": "string"
+        },
+        "externalId": {
+          "description": "ID given by the consumer and only understandable by him (to facilitate his searches)",
+          "type": "string"
+        },
+        "priority": {
+          "description": "A way that can be used by consumers to prioritize orders in Service Order Management system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)",
+          "type": "string"
+        },
+        "description": {
+          "description": "A free-text description of the service order",
+          "type": "string"
+        },
+        "category": {
+          "description": "Used to categorize the order that can be useful for the OM system (e.g. “broadband”, “TVOption”, ...)",
+          "type": "string"
+        },
+        "state": {
+          "$ref": "#/definitions/StateType"
+        },
+        "orderDate": {
+          "description": "",
+          "type": "string",
+          "format": "date-time"
+        },
+        "completionDateTime": {
+          "description": "Date when the order was completed",
+          "type": "string",
+          "format": "date-time"
+        },
+        "requestedStartDate": {
+          "description": "Order start date wished by the requestor",
+          "type": "string",
+          "format": "date-time"
+        },
+        "requestedCompletionDate": {
+          "description": "Requested delivery date from the requestor perspective",
+          "type": "string",
+          "format": "date-time"
+        },
+        "expectedCompletionDate": {
+          "description": "",
+          "type": "string",
+          "format": "date-time"
+        },
+        "startDate": {
+          "description": "Date when the order was started for processing",
+          "type": "string",
+          "format": "date-time"
+        },
+        "@baseType": {
+          "description": "",
+          "type": "string"
+        },
+        "@type": {
+          "description": "",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "",
+          "type": "string"
+        },
+        "relatedParty": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/RelatedParty"
+          }
+        },
+        "orderRelationship": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/OrderRelationship"
+          }
+        },
+        "orderItem": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceOrderItem"
+          }
+        },
+        "orderMessage": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/OrderMessage"
+          }
+        }
+      }
+    },
+    "OrderRelationship": {
+      "description": "Linked order to the one containing this attribute.\nThis relationship is not used to sort ONAP request.",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "type": {
+          "description": "The type of related order, can be : “dependency” if the order needs to be “not started” until another order item is complete (a service order in this case) or “cross-ref” to keep track of the source order (a productOrder)",
+          "type": "string"
+        },
+        "id": {
+          "description": "The id of the related order",
+          "type": "string"
+        },
+        "href": {
+          "description": "A hyperlink to the related order",
+          "type": "string"
+        },
+        "@referredType": {
+          "description": "Type of the referred order.",
+          "type": "string"
+        }
+      }
+    },
+    "TargetServiceSchema": {
+      "description": "Target to the schema describing the service spec resource",
+      "required": [
+        "@type",
+        "@schemaLocation"
+      ],
+      "type": "object",
+      "properties": {
+        "@type": {
+          "description": "Indicates the (class) type of resource.",
+          "type": "string"
+        },
+        "@schemaLocation": {
+          "description": "This field provided a link to the schema describing this REST resource.",
+          "type": "string"
+        }
+      }
+    },
+    "Value": {
+      "description": "Value is a descriptive structure for service characteristic",
+      "type": "object",
+      "properties": {
+        "serviceCharacteristicValue": {
+          "description": "Value of the characteristic.",
+          "type": "string"
+        }
+      }
+    },
+    "CreateServiceOrderItem": {
+      "description": "This structure is used in the operation POST for a serviceOrder request to describe an item.\nAttribute description is not accurate and should be find in the serviceOrderItem class.",
+      "required": [
+        "id",
+        "service"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Identifier of the line item (generally it is a sequence number 01, 02, 03, …)",
+          "type": "string"
+        },
+        "action": {
+          "$ref": "#/definitions/ActionType"
+        },
+        "orderItemRelationship": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/OrderItemRelationship"
+          }
+        },
+        "service": {
+          "$ref": "#/definitions/Service"
+        }
+      }
+    },
+    "CreateServiceOrder": {
+      "description": "This structure is used in the operation POST for a serviceOrder request.\nAttribute description is not accurate and should be find in the serviceOrder class.",
+      "type": "object",
+      "properties": {
+        "externalId": {
+          "description": "ID given by the consumer and only understandable by him (to facilitate his searches)",
+          "type": "string"
+        },
+        "priority": {
+          "description": "A way that can be used by consumers to prioritize orders in Service Order Management system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)",
+          "type": "string"
+        },
+        "description": {
+          "description": "A free-text description of the service order",
+          "type": "string"
+        },
+        "category": {
+          "description": "Used to categorize the order that can be useful for the OM system (e.g. “broadband”, “TVOption”, ...)",
+          "type": "string"
+        },
+        "requestedStartDate": {
+          "description": "Order start date wished by the requestor",
+          "type": "string",
+          "format": "date-time"
+        },
+        "requestedCompletionDate": {
+          "description": "Requested delivery date from the requestor perspective",
+          "type": "string",
+          "format": "date-time"
+        },
+        "relatedParty": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/RelatedParty"
+          }
+        },
+        "orderRelationship": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/OrderRelationship"
+          }
+        },
+        "orderItem": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/CreateServiceOrderItem"
+          }
+        }
+      }
+    },
+    "ServiceOrderSummary": {
+      "description": "This structure is used to provide a subset of serviceOrder attributes to be provided in particular for notification messages",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "ID created on repository side",
+          "type": "string"
+        },
+        "href": {
+          "description": "Hyperlink to access the order",
+          "type": "string"
+        },
+        "externalId": {
+          "description": "ID given by the consumer and only understandable by him (to facilitate his searches)",
+          "type": "string"
+        },
+        "state": {
+          "$ref": "#/definitions/StateType"
+        },
+        "orderDate": {
+          "description": "",
+          "type": "string",
+          "format": "date-time"
+        },
+        "completionDateTime": {
+          "description": "Date when the order was completed",
+          "type": "string",
+          "format": "date-time"
+        }
+      }
+    },
+    "Notification": {
+      "description": "Notification structure for a serviceOrdering notification",
+      "required": [
+        "eventId",
+        "eventDate",
+        "eventType",
+        "event"
+      ],
+      "type": "object",
+      "properties": {
+        "eventId": {
+          "description": "",
+          "type": "string"
+        },
+        "eventDate": {
+          "description": "",
+          "type": "string",
+          "format": "date-time"
+        },
+        "eventType": {
+          "$ref": "#/definitions/EventType"
+        },
+        "event": {
+          "$ref": "#/definitions/ServiceOrderSummaryWithItem"
+        }
+      }
+    },
+    "ServiceOrderItemSummary": {
+      "description": "Service Order item summary to be used for notification",
+      "required": [
+        "id",
+        "service"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "Identifier of the line item (generally it is a sequence number 01, 02, 03, …)",
+          "type": "string"
+        },
+        "action": {
+          "$ref": "#/definitions/ActionType"
+        },
+        "state": {
+          "$ref": "#/definitions/StateType"
+        },
+        "service": {
+          "$ref": "#/definitions/Service"
+        }
+      }
+    },
+    "ServiceOrderSummaryWithItem": {
+      "description": "Service order item summary with item description",
+      "required": [
+        "id"
+      ],
+      "type": "object",
+      "properties": {
+        "id": {
+          "description": "ID created on repository side",
+          "type": "string"
+        },
+        "href": {
+          "description": "Hyperlink to access the order",
+          "type": "string"
+        },
+        "externalId": {
+          "description": "ID given by the consumer and only understandable by him (to facilitate his searches)",
+          "type": "string"
+        },
+        "state": {
+          "$ref": "#/definitions/StateType"
+        },
+        "orderDate": {
+          "description": "",
+          "type": "string",
+          "format": "date-time"
+        },
+        "completionDateTime": {
+          "description": "Date when the order was completed",
+          "type": "string",
+          "format": "date-time"
+        },
+        "orderItem": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/ServiceOrderItemSummary"
+          }
+        }
+      }
+    },
+    "OrderMessage": {
+      "description": "An optional array of messages associated with the Order",
+      "required": [
+        "severity",
+        "correctionRequired"
+      ],
+      "type": "object",
+      "properties": {
+        "code": {
+          "description": "A code associated to this message",
+          "type": "string"
+        },
+        "field": {
+          "description": "Service Order attribute related to this error message",
+          "type": "string"
+        },
+        "messageInformation": {
+          "description": "Message related to this order",
+          "type": "string"
+        },
+        "severity": {
+          "$ref": "#/definitions/SeverityMessage"
+        },
+        "correctionRequired": {
+          "description": "Indicator that an action is required to allow service order fullfilment to follow up",
+          "type": "boolean"
+        }
+      }
+    }
+  }
+}
diff --git a/docs/offeredapis/swagger/status.json b/docs/offeredapis/swagger/status.json
new file mode 100644 (file)
index 0000000..9e8885c
--- /dev/null
@@ -0,0 +1,245 @@
+
+    {
+    "swagger": "2.0",
+    "info": {
+    "description": "Provides a healthcheck to verify that the NBI component is running as expected as a standalone application or that the NBI can communicate with other onap modules that it needs.\n\n",
+    "version": "4.1.0",
+    "title": "Status API",
+    "contact": {
+      "name": "ONAP",
+      "url": "https://onap.readthedocs.io",
+      "email": "onap-discuss@lists.onap.org"
+    },
+    "license": {
+      "name": "Apache 2.0",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0"
+    },
+    "x-planned-retirement-date": "205001",
+    "x-component": "NBI",
+    "x-logo": {
+    "url": "/redoc/logo.png",
+    "backgroundColor": "#FFFFFF"
+    }
+    },
+    
+      "host": "nbi.api.simpledemo.onap.org:30274",
+      "basePath":"/nbi/api/v4",
+      "schemes": [
+      "https"
+      ],
+    "produces": [
+    "application/json;charset=utf-8"
+    ],
+    "tags": [
+    
+      {
+      "name": "Status",
+      "description": ""
+      }
+    ],
+    "paths": {
+    "x-interface": {
+    "api-version": "4.1.0",
+    "last-mod-release": "Frankfurt"
+    },
+      "/status": {
+    "get": {
+    "tags": [
+    "Status"
+    ],
+        "produces": [
+           "application/json;charset=utf-8"
+      ],
+    "operationId": "status_Find",
+    "summary": "This API retieves the status of the NBI application as a healthcheck",
+    "description": "* Default\n\n```\n{\n    \"name\": \"nbi\",\n    \"status\": \"ok\",\n    \"version\": \"v3\"\n}\n```\n\n* Optional\n\n```\n?fullStatus=true\n```\n\n```\n{\n    \"name\": \"nbi\",\n    \"status\": \"ok\",\n    \"version\": \"v3\",\n    \"components\": [\n        {\n            \"name\": \"sdc connectivity\",\n            \"status\": \"ko\"\n        },\n        {\n            \"name\": \"so connectivity\",\n            \"status\": \"ok\"\n        },\n        {\n            \"name\": \"aai connectivity\",\n            \"status\": \"ok\"\n        },\n        {\n            \"name\": \"dmaap connectivity\",\n            \"status\": \"ok\"\n        }\n    ]\n}\n```",
+    "deprecated": false,
+    
+      "parameters": [
+      
+    {
+    "name": "fullStatus",
+    "required": false,
+    "in": "query",
+    "description": "",
+    
+    "type": "boolean",
+    
+        "default": false
+    }
+      ],
+    "responses": {
+    "200": {
+    "description": "Ok",
+    "schema": {
+    "$ref": "#/definitions/Status"
+    }
+    
+    }
+    }
+    }
+      }
+    },
+    "definitions": {
+    
+    "StatusValue": {
+    "description": "Status Value",
+    
+      "type": "string",
+      "enum": [
+        "ok",
+        "ko"]
+    
+    },
+    "ComponentsName": {
+    "description": "Components Name",
+    
+      "type": "string",
+      "enum": [
+        "sdc connectivity",
+        "so connectivity",
+        "aai connectivity",
+        "dmaap connectivity"]
+    
+    },
+    "ApplicationName": {
+    "description": "Application Name",
+    
+      "type": "string",
+      "enum": [
+        "nbi"]
+    
+    },    
+
+    "ErrorDetail": {
+    "description": "Error code, infoURL, description and message",
+
+    
+    "required": [
+    
+      "code",
+      "message"
+    ],
+    "type": "object",
+    "properties": {
+    "code": {
+    "description": "",
+    "type": "integer",
+    "format": "int32"
+    },
+    "message": {
+    "description": "",
+    "type": "string"
+    },
+    "description": {
+    "description": "",
+    "type": "string"
+    },
+    "infoURL": {
+    "description": "",
+    "type": "string"
+    }
+    }
+    
+    },    
+
+    "Error": {
+    "description": "Error code and message",
+
+    
+    "required": [
+    
+      "code",
+      "message"
+    ],
+    "type": "object",
+    "properties": {
+    "code": {
+    "description": "",
+    "type": "integer",
+    "format": "int32"
+    },
+    "message": {
+    "description": "",
+    "type": "string"
+    },
+    "description": {
+    "description": "",
+    "type": "string"
+    },
+    "infoURL": {
+    "description": "",
+    "type": "string"
+    },
+    "details": {
+    
+    "type": "array",
+    "items": {
+    "$ref": "#/definitions/ErrorDetail"
+    }
+    }
+    }
+    
+    },    
+
+    "Component": {
+    "description": "Component",
+
+    
+    "required": [
+    
+      "name",
+      "status"
+    ],
+    "type": "object",
+    "properties": {
+    "name": {
+    
+    "$ref": "#/definitions/ComponentsName"
+    },
+    "status": {
+    
+    "$ref": "#/definitions/StatusValue"
+    }
+    }
+    
+    },    
+
+    "Status": {
+    "description": "Status",
+
+    
+    "required": [
+    
+      "name",
+      "status",
+      "version",
+      "components"
+    ],
+    "type": "object",
+    "properties": {
+    "name": {
+    
+    "$ref": "#/definitions/ApplicationName"
+    },
+    "status": {
+    
+    "$ref": "#/definitions/StatusValue"
+    },
+    "version": {
+    "description": "",
+    "type": "string"
+    },
+    "components": {
+    
+    "type": "array",
+    "items": {
+    "$ref": "#/definitions/Component"
+    }
+    }
+    }
+    
+    }
+    }
+    }
+  
index 74a3b7a..96c8de2 100644 (file)
@@ -1 +1,2 @@
 lfdocs-conf
+sphinxcontrib-redoc