# limitations under the License.
#
-NBI_VERSION=v3
+NBI_VERSION=v4
# APPLICATION
-SERVER_CONTEXTPATH=/nbi/api/v3
+SERVER_CONTEXTPATH=/nbi/api/v4
SERVER_PORT=8080
# ONAP
NEXUS_DOCKER_REPO=nexus3.onap.org:10001
# NBI
-NBI_URL=http://localhost:8080/nbi/api/v3
+NBI_URL=http://localhost:8080/nbi/api/v4
NBI_CALLFORVNF=false
# SDC
FROM openjdk:8-jre-alpine
ARG SERVER_PORT
-ARG PKG_FILENAME=nbi-rest-services-3.0.1.jar
+ARG PKG_FILENAME=nbi-rest-services-4.0.0.jar
ADD target/$PKG_FILENAME app.jar
RUN addgroup -S appgroup
**Testing**
When the application is running, you can access the API at
-:samp:`http://yourhostname:8080/nbi/api/v3` and fill the URL with the name
+:samp:`http://yourhostname:8080/nbi/api/v4` and fill the URL with the name
of the resources you asking for (/serviceSpecification, /service,
/serviceOrder or /status)
You can run a test by using `VisualStudio RestClient plugin <https://github.com/Huachao/vscode-restclient>`_
**Healthcheck**
-http://localhost:8080/nbi/api/v3/status
+http://localhost:8080/nbi/api/v4/status
You should get::
{
"name": "nbi",
"status": "ok",
- "version": "v3"
+ "version": "v4"
}
**Play with RESTclient**
***********
APIs are described with a state version with āvā following the API Name,
-e.g.: ``nbi/api/v3/productOrder``.
+e.g.: ``nbi/api/v4/productOrder``.
The schema associated with a REST API must have its version number aligned
with that of the REST API.
**GET serviceSpecification(list)**
-Example: ``GET /nbi/api/v3/serviceSpecification/
+Example: ``GET /nbi/api/v4/serviceSpecification/
?category=NetworkService&distributionStatus=DISTRIBUTED``
It is possible to retrieve a list of ``serviceSpecification`` (get by list).
**GET service Specification (id)**
-Example: ``GET /nbi/api/v3/serviceSpecification/{uuid}``
+Example: ``GET /nbi/api/v4/serviceSpecification/{uuid}``
It is use to retrieve one ``serviceSpecification`` - all available information
are retieved (see Swagger for description)
**GET service Specification Schema (id)**
-Example: ``GET /nbi/api/v3/serviceSpecification/{uuid}/specificationInputSchema``
+Example: ``GET /nbi/api/v4/serviceSpecification/{uuid}/specificationInputSchema``
It is use to retrieve one input schema from the tosca file stored in **NBI** - all available
information are retieved (see Swagger for description)
**GET Service Inventory (list)**
-Example: ``GET /nbi/api/v3/service/?relatedParty.id=Pontus``
+Example: ``GET /nbi/api/v4/service/?relatedParty.id=Pontus``
GET (by list) allows to request with following criteria (all optional) :
**GET Service Inventory (id)**
-Example: ``GET /nbi/api/v3/service/{id}`` When querying for a specific service
+Example: ``GET /nbi/api/v4/service/{id}`` When querying for a specific service
instance id, no additional filters are required.
The Service Inventory API will retrieve the service instance data from A&AI using
Release Notes
=============
-Version: 3.0.1
+Version: 4.0.0
--------------
:Release Date: 2018-11-30
<groupId>org.onap.externalapi-nbi</groupId>
<artifactId>nbi-rest-services</artifactId>
- <version>3.0.1</version>
+ <version>4.0.0</version>
<packaging>jar</packaging>
<name>externalapi-nbi</name>
# limitations under the License.
#
-nbi.version = v3
+nbi.version = v4
# SERVER
server.servlet.context-path = /nbi/api/${nbi.version}
spring.profiles.active = default
# VERSION
-nbi.version = v3
+nbi.version = v4
# SERVER
server.servlet.context-path = /nbi/api/${nbi.version}
function() {
var config = {
- nbiBaseUrl: 'http://localhost:8080/nbi/api/v3'
+ nbiBaseUrl: 'http://localhost:8080/nbi/api/v4'
};
karate.configure('connectTimeout', 5000);
karate.configure('readTimeout', 5000);
"query": "eventType=ServiceOrderItemStateChangeNotification"
},
{
- "callback": "http://localhost:8080/nbi/api/v3/test/listener",
+ "callback": "http://localhost:8080/nbi/api/v4/test/listener",
"query": "eventType=ServiceOrderStateChangeNotification"
}
]
\ No newline at end of file
Scenario: testServiceResourceGetInventoryWithStatus
-Given url 'http://localhost:8080/nbi/api/v3/service/405c8c00-44b9-4303-9f27-6797d22ca096'
+Given path 'service','405c8c00-44b9-4303-9f27-6797d22ca096'
When method get
Then status 200
And match $.state == 'Active'