ServiceOrder API (4.1.0)

Download OpenAPI specification:Download

About the ONAP Service Order API

The Service Catalog API is based on the TM Forum 641 Service Ordering API.

API Overview

General Description

The Service Order API is used to request the instantiation, deletion or modification of a service

A 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.

List of available subscription for serviceOrdering notifications, see /hub resources swagger for more detailed information:

  • ServiceOrderCreationNotification
  • ServiceOrderStateChangeNotification
  • ServiceOrderItemStateChangeNotification

Relationship and Dependencies

This Service Ordering API is related to the TM Forum 641 Service Ordering API and also to MEF LSO LEGATO Service Ordering API.

This 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

API Structure and Approach

The 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.

Getting Started with the API (Hello World)

The 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.

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 Ordering 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 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/

SDK quick intro

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.

How to start the client side implementation

  • 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.

How to start the server side implementation

  • Not applicable, the service side for this API will be the NBI container running the External API Framework Springboot application.

API Description

Includes summary of information drawn from API definitions in OpenAPI / Swagger files

Resource Endpoint / Resource Quick Reference

GET /serviceOrder/ : This operation returns a list service orders from External API Framework DB

GET /serviceOrder/{id} : This operation returns the service order associated with this id.

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.

Data Schema

Main API Entities

Describe the major entities used in the API

The 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.

The 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.

Payload data structures

If any, describe the appropriate data structures that are included within payload of the API.

Not applicable

Security on the API

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

Response Codes

The meaning of Status Codes & Errors

See response codes for each API resource in the API section below

Rate Limits and Thresholds

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.

Validation constraints

Describe any behavioral and structural validation constraints

Not applicable

Assumptions

For example, any Pre/Post conditions

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.

API Interactions and Flows

Interaction Examples

Illustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc

The Service Order API flow of use can generally follow the sequence below

Call ONAP to discover what available services it can offer

curl -X GET "http://serverRoot:30274/nbi/api/v4/serviceSpecification/" -H "accept: application/json;charset=utf-8"

Example Response Values

[
  {
        "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"
        }
    }
]

Using the id returned from the list of Service Specifications, pick one you would like to order an instance of. Using the instantation serviceCharacteristics from the Catalog construct the Service Order POST body associated with this template. Then POST the Service Order with an action of add to ask ONAP to instanctiate a Service Instance.

Example POST Service Order Body

{
        "externalId": "BBS_BSS_TrackindId8888",
        "priority": "1",
        "description": "Service Order for a new HSIA CFS",
        "category": "Network Service",
        "relatedParty": [
            {
                "id": "BBSCustomer",
                "href": null,
                "role": "ONAPcustomer",
                "name": "EnterpriseA",
                "@referredType": "Consumer"
            }
        ],
        "orderItem": [
            {
                "id": "1",
                "action": "add",
                "service": {
                    "name": "BBS_E2E_Service",
                    "serviceState": "active",
                    "serviceCharacteristic": [
                        {
                            "name": "ont_ont_serial_num",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_serial_num"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_rg_mac_addr",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "rg_mac_addr"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_downstream_speed",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "10"
                            }
                        },
                        {
                            "name": "ont_ont_mac_addr",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_mac_addr"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_access_id",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "profile_ip_access_id"
                            }
                        },
                        {
                            "name": "ont_ont_swVersion",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_swVersion"
                            }
                        },
                        {
                            "name": "ont_ont_manufacturer",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_manufacturer"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_service_type",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "service_type"
                            }
                        },
                        {
                            "name": "ont_ont_pnf_name",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_pnf_name"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_upstream_speed",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "10"
                            }
                        },
                        {
                            "name": "ont_ont_nf_type",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_nf_type"
                            }
                        }
                    ],
                    "serviceSpecification": {
                        "id": "90b476bc-0988-4417-bae9-41b376f0e1b6"
                    }
                }
            }
        ]
}

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

Example GET Service Order by specific order id Response


{
        "id": "5c988c98e3caf4000173cb4d",
        "href": "serviceOrder/5c988c98e3caf4000173cb4d",
        "externalId": "BBS_BSS_TrackindId6979",
        "priority": "1",
        "description": "Service Order for a new HSIA CFS",
        "category": "Network Service",
        "state": "inProgress",
        "orderDate": "2019-03-25T08:08:56.297Z",
        "completionDateTime": null,
        "expectedCompletionDate": null,
        "requestedStartDate": null,
        "requestedCompletionDate": null,
        "startDate": null,
        "@baseType": null,
        "@type": null,
        "@schemaLocation": null,
        "relatedParty": [
            {
                "id": "testcustomer5",
                "href": null,
                "role": "ONAPcustomer",
                "name": "EnterpriseA",
                "@referredType": "Consumer"
            }
        ],
        "orderRelationship": null,
        "orderItem": [
            {
                "orderMessage": [],
                "id": "1",
                "action": "add",
                "state": "inProgress",
                "percentProgress": "0",
                "@type": null,
                "@schemaLocation": null,
                "@baseType": null,
                "orderItemRelationship": [],
                "service": {
                    "id": "ee8ddf86-b653-4377-809a-05811fea8501",
                    "href": null,
                    "name": "BBS_E2E_Service",
                    "serviceState": "active",
                    "@type": null,
                    "@schemaLocation": null,
                    "serviceCharacteristic": [
                        {
                            "name": "ont_ont_serial_num",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_serial_num"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_rg_mac_addr",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "rg_mac_addr"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_downstream_speed",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "10"
                            }
                        },
                        {
                            "name": "ont_ont_mac_addr",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_mac_addr"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_access_id",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "profile_ip_access_id"
                            }
                        },
                        {
                            "name": "ont_ont_swVersion",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_swVersion"
                            }
                        },
                        {
                            "name": "ont_ont_manufacturer",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_manufacturer"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_service_type",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "service_type"
                            }
                        },
                        {
                            "name": "ont_ont_pnf_name",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_pnf_name"
                            }
                        },
                        {
                            "name": "edgeinternetprofile_ip_upstream_speed",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "10"
                            }
                        },
                        {
                            "name": "ont_ont_nf_type",
                            "valueType": null,
                            "value": {
                                "@type": null,
                                "@schemaLocation": null,
                                "serviceCharacteristicValue": "ont_ont_nf_type"
                            }
                        }
                    ],
                    "serviceRelationship": null,
                    "relatedParty": null,
                    "serviceSpecification": {
                        "id": "90b476bc-0988-4417-bae9-41b376f0e1b6",
                        "href": null,
                        "name": null,
                        "version": null,
                        "targetServiceSchema": null,
                        "@type": null,
                        "@schemaLocation": null,
                        "@baseType": null
                    }
                },
                "orderItemMessage": []
            }
        ],
        "orderMessage": null
}

ServiceOrder

provided by NBI

Create a service order

This operation creates a service order entity. The 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. POST 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.

In 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.

In 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. Depending 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.

header Parameters
Target
string
Request Body schema: application/json;charset=utf-8
externalId
string

ID given by the consumer and only understandable by him (to facilitate his searches)

priority
string

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)

description
string

A free-text description of the service order

category
string

Used to categorize the order that can be useful for the OM system (e.g. “broadband”, “TVOption”, ...)

requestedStartDate
string <date-time>

Order start date wished by the requestor

requestedCompletionDate
string <date-time>

Requested delivery date from the requestor perspective

relatedParty
Array of objects (RelatedParty)
orderRelationship
Array of objects (OrderRelationship)
orderItem
Array of objects (CreateServiceOrderItem)

Responses

201

Created

post /serviceOrder
http://serverRoot:30274/nbi/api/v4/serviceOrder
https://serverRoot:30274/nbi/api/v4/serviceOrder

Request samples

Content type
application/json;charset=utf-8
Copy
Expand all Collapse all
{
  • "externalId": "string",
  • "priority": "string",
  • "description": "string",
  • "category": "string",
  • "requestedStartDate": "2020-02-19T17:42:23Z",
  • "requestedCompletionDate": "2020-02-19T17:42:23Z",
  • "relatedParty":
    [
    ],
  • "orderRelationship":
    [
    ],
  • "orderItem":
    [
    ]
}

Response samples

Content type
application/json;charset=utf-8
Copy
Expand all Collapse all
{
  • "id": "string",
  • "href": "string",
  • "externalId": "string",
  • "priority": "string",
  • "description": "string",
  • "category": "string",
  • "state": "acknowledged",
  • "orderDate": "2020-02-19T17:42:23Z",
  • "completionDateTime": "2020-02-19T17:42:23Z",
  • "requestedStartDate": "2020-02-19T17:42:23Z",
  • "requestedCompletionDate": "2020-02-19T17:42:23Z",
  • "expectedCompletionDate": "2020-02-19T17:42:23Z",
  • "startDate": "2020-02-19T17:42:23Z",
  • "@baseType": "string",
  • "@type": "string",
  • "@schemaLocation": "string",
  • "relatedParty":
    [
    ],
  • "orderRelationship":
    [
    ],
  • "orderItem":
    [
    ],
  • "orderMessage":
    [
    ]
}

List service orders

Retrieve and list service order entities according to given criteria. Only a predefined set of attribute is proposed. Attribute selection could be described in the fields attribute.

query Parameters
externalId
string
state
string

state of the order(s) to be retrieved

description
string
orderDate.gt
string

order date greather than

orderDate.lt
string

order date lower than

fields
string

this attribute could be used to filter retrieved attribute(s) and/or sort SO.

offset
integer <int32>

The index of the first element to retrieve. Zero is the first element of the collection.

limit
integer <int32>

The maximum number of elements to retrieve (it can be greater than the actual available number of items).

Responses

200

Ok

get /serviceOrder
http://serverRoot:30274/nbi/api/v4/serviceOrder
https://serverRoot:30274/nbi/api/v4/serviceOrder

Response samples

Content type
application/json;charset=utf-8
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve a service order

This operation retrieves a service order entity. Attribute selection is enabled for all first level attributes.

path Parameters
id
required
string
query Parameters
fields
string

Attribute selection

header Parameters
Target
string

Responses

200

Ok

get /serviceOrder/{id}
http://serverRoot:30274/nbi/api/v4/serviceOrder/{id}
https://serverRoot:30274/nbi/api/v4/serviceOrder/{id}

Response samples

Content type
application/json;charset=utf-8
Copy
Expand all Collapse all
{
  • "id": "string",
  • "href": "string",
  • "externalId": "string",
  • "priority": "string",
  • "description": "string",
  • "category": "string",
  • "state": "acknowledged",
  • "orderDate": "2020-02-19T17:42:23Z",
  • "completionDateTime": "2020-02-19T17:42:23Z",
  • "requestedStartDate": "2020-02-19T17:42:23Z",
  • "requestedCompletionDate": "2020-02-19T17:42:23Z",
  • "expectedCompletionDate": "2020-02-19T17:42:23Z",
  • "startDate": "2020-02-19T17:42:23Z",
  • "@baseType": "string",
  • "@type": "string",
  • "@schemaLocation": "string",
  • "relatedParty":
    [
    ],
  • "orderRelationship":
    [
    ],
  • "orderItem":
    [
    ],
  • "orderMessage":
    [
    ]
}

Notification

provided by subscribers, which MUST registered by creating a hub resource

NBI will send notification to this operation provided by subscribers

Notification structure depends of the eventType:

  • ServiceOrderCreationNotification
  • ServiceOrderStateChangeNotification
{
  "eventId": "string",
  "eventDate": "2019-03-12T16:21:27.530Z",
  "eventType": "string",
  "event": {
    "id": "string",
    "href": "string",
    "externalId": "string",
    "state": "acknowledged",
    "orderDate": "2019-03-12T16:21:27.530Z",
    "completionDateTime": "2019-03-12T16:21:27.530Z"
  }
}
  • ServiceOrderItemStateChangeNotification
{
  "eventId": "string",
  "eventDate": "2019-03-12T16:21:44.066Z",
  "eventType": "string",
  "event": {
    "id": "string",
    "href": "string",
    "externalId": "string",
    "state": "acknowledged",
    "orderDate": "2019-03-12T16:21:44.066Z",
    "completionDateTime": "2019-03-12T16:21:44.066Z",
    "orderItem": [
      {
        "id": "string",
        "action": "add",
        "state": "acknowledged",
        "service": {
          "id": "string",
          "href": "string",
          "name": "string",
          "serviceState": "string",
          "serviceCharacteristic": [
            {
              "name": "string",
              "valueType": "string",
              "value": {
                "serviceCharacteristicValue": "string"
              }
            }
          ],
          "serviceRelationship": [
            {
              "type": "reliesOn"
            }
          ],
          "relatedParty": [
            {
              "id": "string",
              "href": "string",
              "role": "string",
              "name": "string",
              "@referredType": "string"
            }
          ],
          "serviceSpecification": {
            "id": "string",
            "href": "string",
            "name": "string",
            "version": "string",
          }
        }
      }
    ]
  }
}
header Parameters
Target
string
Request Body schema: application/json;charset=utf-8
eventId
required
string
eventDate
required
string <date-time>
eventType
required
string (EventType)
Enum: "ServiceOrderCreationNotification" "ServiceOrderStateChangeNotification" "ServiceOrderItemStateChangeNotification"

The Event Type

event
required
object (ServiceOrderSummaryWithItem)

Service order item summary with item description

Responses

201

Created

post /notification
http://serverRoot:30274/nbi/api/v4/notification
https://serverRoot:30274/nbi/api/v4/notification

Request samples

Content type
application/json;charset=utf-8
Copy
Expand all Collapse all
{
  • "eventId": "string",
  • "eventDate": "2020-02-19T17:42:23Z",
  • "eventType": "ServiceOrderCreationNotification",
  • "event":
    {
    }
}

Response samples

Content type
application/json;charset=utf-8
Copy
Expand all Collapse all
{
  • "eventId": "string",
  • "eventDate": "2020-02-19T17:42:23Z",
  • "eventType": "ServiceOrderCreationNotification",
  • "event":
    {
    }
}