Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OperationQuery service from the Microservice Bus
URL/api/microservices/v1/services/{serviceName}/version/{version}
VerbGET
Request
ParameterMandatoryParameter typeData TypeDefaultexampleDescription
serviceNameNPathString

Service Name
versionNPathString

Service Version
Response
exampleDescription
{
  "serviceName": "catalog",
  "version": "v1",
  "url": "/api/catalog/v1",
  "protocol": "REST",
  "visualRange": "1",
  "nodes": [
    {
      "ip": "10.74.55.66",
      "port": "6666",
      "ttl": 0
    },
    {
      "ip": "10.74.56.37",
      "port": "8989",
      "ttl": 0
    },
    {
      "ip": "10.74.56.36",
      "port": "8988",
      "ttl": 0
    }
  ]
}

serviceName: service name
version: version
url: url of the created service instance
protocol: supported protocols: 'REST', 'UI', 'HTTP','TCP'
nodes: the service instance nodes list to register
ip: the ip of the service instance node, it could also be a hostname like catalog.onap.org
port: the port of the service instance node
ttl: time to live, this parameter is reserved for later use

Success Code200
Error Code

404 Can't find the service instance
422 Invalid Parameters
500 Internal Server Error

MSB Client SDK

MSBServiceClient :  JAVA SDK for MSB service discovery

RestServiceCreater: JAVA SDK for REST service invocation

MSB Client SDK Example

https://gerrit.onap.org/r/gitweb?p=msb/java-sdk.git;a=tree;f=example;h=1c331f86cbcbdb8cc2935d8ac41169da1a523ec5;hb=refs/heads/master

...