The Service Catalog API is based on a subset of the TM Forum 633 Service Catalog Management API.
This Service Catalog API is used to retrieve 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 these Services
The Service Design Center (SDC) of ONAP allows for the creation 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.
This Service Catalog API is related to the TM Forum 633 Service Catalog Management API and also to MEF LSO LEGATO Service Catalog API.
This 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.
The 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.
The 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.
The 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.
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/
There 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.
Includes summary of information drawn from API definitions in OpenAPI / Swagger files
GET /serviceSpecification/ : This operation returns a list service specifications from a catalog
GET /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
GET /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.
Describe the major entities used in the API
The 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.
The 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.
If any, describe the appropriate data structures that are included within payload of the API.
Not applicable
Authentication; Authorization; Credentials/access token; etc.
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
The meaning of Status Codes & Errors
See response codes for each API resource in the API section below
Requests per unit time allowed; Pagination
No rate limits or thresholds, in production this API should be behind an API Gateway with the necessary limits.
Describe any behavioral and structural validation constraints
Not applicable
For example, any Pre/Post conditions
For this API to function and return Service Specifications, SDC is required to be running and Service models designed in the SDC catalog
Illustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc
The Service Catalog API flow of use can generally follow the sequence below
curl -X GET "http://serverRoot:30274/nbi/api/v4/serviceSpecification/" -H "accept: application/json;charset=utf-8"
[
{
"id": "0ec83a1f-51e7-44e7-b773-3f37ddb937cd",
"name": "EPLServiceTemplate",
"invariantUUID": "ddf31f35-8e71-4f5a-a383-4241b87ca7a7",
"category": "Network L4+",
"distributionStatus": "DISTRIBUTED",
"version": "1.0",
"lifecycleStatus": "CERTIFIED",
"relatedParty": {
"id": "jm0007",
"role": "lastUpdater"
}
}
]
curl -X GET "http://serverRoot:30274/nbi/api/v4/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd" -H "accept: application/json;charset=utf-8"
{
"id": "0ec83a1f-51e7-44e7-b773-3f37ddb937cd",
"name": "EPLServiceTemplate",
"invariantUUID": "ddf31f35-8e71-4f5a-a383-4241b87ca7a7",
"toscaModelURL": "/sdc/v1/catalog/services/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/toscaModel",
"category": "Network L4+",
"distributionStatus": "DISTRIBUTED",
"version": "1.0",
"lifecycleStatus": "CERTIFIED",
"relatedParty": {
"id": "jm0007",
"name": "Joni Mitchell",
"role": "lastUpdater"
},
"resourceSpecification": [
{
"id": "ec910118-ba94-4517-98b5-5bc10f277f4a",
"version": "1.0",
"name": "TestVF_1579291137027",
"resourceInstanceName": "TestVF_1579291137027 0",
"modelCustomizationName": "TestVF_1579291137027 0",
"resourceInvariantUUID": "df329320-fe21-49c2-96a8-7217ac7143de",
"resourceType": "VF",
"@type": "ONAPresource",
"modelCustomizationId": "ad5fb501-e472-4d79-a303-1a4a56c0fa75"
}
],
"href": "serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd",
"attachment": [],
"@type": "ONAPservice",
"instantiationType": "A-la-carte",
"serviceSpecCharacteristic": {
"name": "TestService_1579291137027_ServiceCharacteristics",
"description": "This object describes all the inputs needed from the client to interact with the TestService_1579291137027 Service Topology",
"valueType": "object",
"@type": "ONAPServiceCharacteristic",
"@schemaLocation": "null",
"serviceSpecCharacteristicValue": {
"valueType": "object",
"@schemaLocation": "/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/specificationInputSchema",
"@type": "TestService_1579291137027_ServiceCharacteristic"
}
}
}
curl -X GET "http://serverRoot:30274/nbi/api/v4/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/specificationInputSchema" -H "accept: application/json;charset=utf-8"
{
"ServiceCharacteristics" : {
"required" : [ "mscmevcendpointa_evcendpoint_endPointId", "mscmevcendpointz_evcendpoint_endPointId", "mscmsubscriberunia_subscriberuni_uniIdentifier", "mscmsubscriberuniz_subscriberuni_uniIdentifier" ],
"properties" : {
"mscmevcendpointa_evcendpoint_map" : {
"type" : "string",
"description" : ""
},
"mscmsubscriberunia_subscriberuni_uniIdentifier" : {
"type" : "string",
"description" : "String that is used to allow the Sub-scriber and Service Provider to uniquely identify the UNI for oper-ations purposes."
},
"mscmevc0_evc_evcType" : {
"type" : "string",
"description" : "Point-to-Point, Multipoint-to-Mul-tipoint, or Rooted-Multipoint."
},
"mscmevcendpointz_evcendpoint_map" : {
"type" : "string",
"description" : ""
},
"mscmevcendpointz_evcendpoint_endPointUni" : {
"type" : "string",
"description" : "Specify the UNI where the EvcEndPoint is located. The EvcEndPoint is said to be at this Uni."
},
"mscmevcendpointz_evcendpoint_ingressBwp" : {
"type" : "string",
"description" : ""
},
"mscmsubscriberuniz_subscriberuni_uniIdentifier" : {
"type" : "string",
"description" : "String that is used to allow the Sub-scriber and Service Provider to uniquely identify the UNI for oper-ations purposes."
},
"mscmevcendpointz_evcendpoint_endPointId" : {
"type" : "string",
"description" : "A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes."
},
"mscmevcendpointa_evcendpoint_endPointId" : {
"type" : "string",
"description" : "A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes."
},
"mscmevcendpointa_evcendpoint_ingressBwp" : {
"type" : "string",
"description" : ""
},
"mscmevc0_evc_listOfEvcEps" : {
"type" : "array",
"description" : "A list of EVC EP ID Service Attribute values."
},
"mscmevc0_evc_evcId" : {
"type" : "string",
"description" : ""
},
"mscmevcendpointa_evcendpoint_endPointUni" : {
"type" : "string",
"description" : "Specify the UNI where the EvcEndPoint is located. The EvcEndPoint is said to be at this Uni."
}
}
}
Reference any tutorials or use cases. May use links.
To learn how the BBS use case used these APIs, please find the Low Level Designs at: https://wiki.onap.org/pages/viewpage.action?pageId=48532377
Includes:
The 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.
The 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:
For major modifications of the API, not backward compatible and forcing client implementations to be changed, the major version number must be updated.
This operation returns service specifications from a catalog. Only a predefined set of attribute is proposed : Based on SDC limitations, only attributes category and distributionStatus are available for serviceSpecification filtering Fields attribute could be used to filter attributes retrieved
fields | string Field selection - used to filtering the attributes to be retreived |
category | string Service Category (filter) |
distributionStatus | string Service distribution status (filter) |
Ok
Bad Request
List of supported error codes:
Unauthorized
List of supported error codes:
Forbidden
List of supported error codes:
Not Found
List of supported error codes:
Unprocessable entity
Functional error
Internal Server Error
List of supported error codes:
Service Unavailable
List of supported error codes:
[- {
- "id": "string",
- "href": "string",
- "name": "string",
- "description": "string",
- "@type": "ONAPservice",
- "@schemaLocation": "string",
- "@baseType": "string",
- "invariantUUID": "string",
- "toscaModelURL": "string",
- "toscaResourceName": "string",
- "category": "string",
- "subcategory": "string",
- "distributionStatus": "DISTRIBUTION_NOT_APPROVED",
- "version": "string",
- "lifecycleStatus": "NOT_CERTIFIED_CHECKOUT",
- "targetServiceSchema": {
- "@type": "string",
- "@schemaLocation": "string"
}, - "attachment": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "@type": "ONAPartifact",
- "artifactLabel": "string",
- "artifactGroupType": "string",
- "artifactTimeout": "string",
- "artifactChecksum": "string",
- "artifactVersion": "string",
- "generatedFromUUID": "string",
- "url": "string",
- "mimeType": "string"
}
], - "relatedParty": [
- {
- "id": "string",
- "role": "string",
- "name": "string"
}
], - "resourceSpecification": [
- {
- "id": "string",
- "version": "string",
- "name": "string",
- "@type": "ONAPresource",
- "resourceInstanceName": "string",
- "resourceInvariantUUID": "string",
- "resourceType": "string",
- "modelCustomizationName": "string",
- "modelCustomizationId": "string"
}
], - "serviceSpecCharacteristic": [
- {
- "name": "string",
- "description": "string",
- "valueType": "string",
- "@type": "string",
- "@schemaLocation": "string",
- "required": true,
- "status": "string",
- "serviceSpecCharacteristicValue": [
- {
- "@type": "string",
- "@schemaLocation": "string",
- "valueType": "string"
}
]
}
]
}
]
This operation returns a service specification by its id from a catalog. Attribute selection is enabled using the fields attribute.
id required | string The Id of the ServiceSpecification |
fields | string Attribute selection |
Ok
Bad Request
List of supported error codes:
Unauthorized
List of supported error codes:
Forbidden
List of supported error codes:
Not Found
List of supported error codes:
Unprocessable entity
Functional error
Internal Server Error
List of supported error codes:
Service Unavailable
List of supported error codes:
{- "id": "string",
- "href": "string",
- "name": "string",
- "description": "string",
- "@type": "ONAPservice",
- "@schemaLocation": "string",
- "@baseType": "string",
- "invariantUUID": "string",
- "toscaModelURL": "string",
- "toscaResourceName": "string",
- "category": "string",
- "subcategory": "string",
- "distributionStatus": "DISTRIBUTION_NOT_APPROVED",
- "version": "string",
- "lifecycleStatus": "NOT_CERTIFIED_CHECKOUT",
- "targetServiceSchema": {
- "@type": "string",
- "@schemaLocation": "string"
}, - "attachment": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "@type": "ONAPartifact",
- "artifactLabel": "string",
- "artifactGroupType": "string",
- "artifactTimeout": "string",
- "artifactChecksum": "string",
- "artifactVersion": "string",
- "generatedFromUUID": "string",
- "url": "string",
- "mimeType": "string"
}
], - "relatedParty": [
- {
- "id": "string",
- "role": "string",
- "name": "string"
}
], - "resourceSpecification": [
- {
- "id": "string",
- "version": "string",
- "name": "string",
- "@type": "ONAPresource",
- "resourceInstanceName": "string",
- "resourceInvariantUUID": "string",
- "resourceType": "string",
- "modelCustomizationName": "string",
- "modelCustomizationId": "string"
}
], - "serviceSpecCharacteristic": [
- {
- "name": "string",
- "description": "string",
- "valueType": "string",
- "@type": "string",
- "@schemaLocation": "string",
- "required": true,
- "status": "string",
- "serviceSpecCharacteristicValue": [
- {
- "@type": "string",
- "@schemaLocation": "string",
- "valueType": "string"
}
]
}
]
}
This operation returns a service specification Input schema by its id from a catalog. Attribute selection is enabled using the fields attribute.
id required | string The Id of the ServiceSpecification |
fields | string Attribute selection |
Ok
Bad Request
List of supported error codes:
Unauthorized
List of supported error codes:
Forbidden
List of supported error codes:
Not Found
List of supported error codes:
Unprocessable entity
Functional error
Internal Server Error
List of supported error codes:
Service Unavailable
List of supported error codes:
{- "ServiceCharacteristics": {
- "required": [
- "string"
], - "properties": { }
}
}