TMF638 Service Inventory API REST Specification R18.0
TMF638 Service Inventory API REST Specification R18.0
Service Inventory
API REST Specification
TMF638
Release 18.0.0
January 2018
NOTICE
Copyright © TM Forum 2018. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that
comment on or otherwise explain it or assist in its implementation may be prepared, copied, published,
and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice
and this section are included on all such copies and derivative works. However, this document itself may
not be modified in any way, including by removing the copyright notice or references to TM FORUM,
except as needed for the purpose of developing any document or deliverable produced by a TM FORUM
Collaboration Project Team (in which case the rules applicable to copyrights, as set forth in the TM
FORUM IPR Policy, must be followed) or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by TM FORUM or its
successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and TM FORUM
DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY
OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
TABLE OF CONTENTS
NOTICE ..................................................................................................................................................... 2
Table of Contents....................................................................................................................................... 3
Introduction ................................................................................................................................................ 6
Service resource.................................................................................................................................. 8
API OPERATIONS................................................................................................................................... 19
List services....................................................................................................................................... 20
API NOTIFICATIONS............................................................................................................................... 29
Acknowledgements .................................................................................................................................. 32
LIST OF TABLES
N/A
INTRODUCTION
The following document is intended to provide details of the REST API interface for Service Inventory. The
intent of this API is to provide a consistent/standardized mechanism to query and manipulate the Service
inventory.
The Service Inventory API can be used to query the service instances for a customer via Self Service
Portal or the Call Centre operator can query the service instances on behalf of the customer while a
customer may have a complaint or a query.
The Service Inventory API can be called by the Service Order Management to create a new service
instance/ update an existing service instance in the Service Inventory.
RESOURCE MODEL
SERVICE RESOURCE
Service is an abstract base class for defining the Service hierarchy. All Services are characterized as
either being possibly visible and usable by a Customer or not. This gives rise to the two subclasses of
Service: CustomerFacingService and ResourceFacingService.
Resource model
id :String
Note note
href :String
0..1
date :DateTime 0..* 0..1 name :String
author :String description :String
text :String type :String
state :String
category :String Serv iceCharacteristic
isServiceEnabled :boolean characteristic
name :String
hasStarted :boolean
startMode :String 1 0..* valueType :String
isStateful :boolean
serviceDate :DateTime
Serv iceSpecificationRef startDate :DateTime
serviceSpecification 0..1
endDate :DateTime
id :String
href :String 0..1 0..1 @type :String
@baseType :String 0..* value 0..1
name :String A
@schemaLocation :String
version :String Value
@type :String 0..*
@schemaLocation :String @type :String
@baseType :String @schemaLocation :String
0..1
0..1 targetServiceSchema
supportingResource 0..* supportingService 0..*
Lifecycle
Field descriptions
Service fields
Field Description
id A string. "id" is the ID created for the service.
href A string. Reference of the service.
name A string. "name" is the name of the service.
description A string. free-text description of the service.
type A string; Type of the service – could for example CFS, RFS, compositeCFS,
atomicCFS, compositeRFS, atomicRFS, etc…
state A string. The life cycle state of the service:
- feasibilityChecked
- designed
- reserved
- active
- inactive
- terminated
category A string. Is it a customer facing or resource facing service.
isServiceEnabled A boolean. For use. If the value of this attribute is FALSE, then this means that
this particular Service has NOT been enabled for use.
hasStarted A boolean. This is a Boolean attribute that, if TRUE, signifies that this Service
has already been started. If the value of this attribute is FALSE, then this
signifies that this Service has NOT been Started.
startMode A string. This attribute is an enumerated integer that indicates how the Service
is started. Values include:
0: Unknown
1: Automatically by the managed environment
2: Automatically by the owning device
3: Manually by the Provider of the Service
4: Manually by a Customer of the Provider
5: Any of the above.
isStateful A boolean. This is a Boolean attribute that, if TRUE, means that this Service
can be changed without affecting any other services.
serviceDate A date time (DateTime). Date when the service was created (whatever its
status).
startDate A date time (DateTime). startDate is the date when the service starts
meaning it shifts to ‘active’ status (the first time).
endDate A date time (DateTime). endDate is the date when the service ends
meaning it shifts to ‘terminated’ status
@baseType A string. Indicates the base type of the resource. Here it should be valued to
Service.
@type A string. Indicates the type of resource..
@schemaLocation A string. A link to the schema describing this REST resource.
serviceOrder A list of service order reference (ServiceOrderRef). A Service Order is a
request to perform an action on a specific Service and it contained service
order item.
serviceRelationship A list of service relationships (ServiceRelationship [*]). Describes links with
other service(s) in the inventory (useful for describing relies-on, relies-from
between CFS for example).
characteristic A list of service characteristics (ServiceCharacteristic [*]).
supportingService A list of supporting services (SupportingService [*]). A collection of services
that support this service (bundling, link CFS to RFS).
supportingResource A list of supporting resources (SupportingResource [*]).Note: only Service of
type RFS can be associated with Resources.
serviceSpecification A service specification reference (ServiceSpecificationRef).
ServiceSpecification(s) required realizing a ProductSpecification.
place A list of places (Place [*]). Used to define a place useful for the service (for
example a delivery geographical place).
note A list of notes (Note [*]). Extra information about the service.
relatedParty A list of related party references (RelatedPartyRef [1..*]). A related party
defines party or party role linked to a specific entity.
Note sub-resource
Field Description
author A string. Author of the note.
date A date time (DateTime). Date of the note.
text A string. Text of the note.
Place
Used to define a place of interest for the service (for example installation address).
Field Description
id A string. ID of an existing place
href A string. Reference of a place (for instance in google map).
role A string. The role of the place (e.g. install site, a-address, z-address for leased
line, geoFencing perimeter).
@referredType A string. The type of the referred appointment
ServiceCharacteristic
Field Description
name A string. Name of the characteristic.
valueType A string. Value type of the characteristic. Could a simple attribute or a complex
one as a table or an array.
value A string. A link to a value description structure.
Value
Field Description
@type A string. Indicates the (class) type of resource.
@schemaLocation A string. This field provided a link to the schema describing this REST
resource.
ServiceRelationship sub-resource
Describes links with services of the same category (useful for relies-on, relies-from relationships between
services).
Field Description
type A string. Describes links with services of the same category (useful for bundled
services, or to describe relies On relationship between services for example).
serviceRef A service reference (ServiceRef). Useful to link services of the same category.
ServiceRef relationship
Field Description
href A string. reference of the service.
id A string. Id of the service.
SupportingResource sub-resource
A collection of resource(s) supporting the service. – Note: only Service of type RFS can be associated
with Resources.
Field Description
href A string. Reference of the supporting resource.
id A string. Unique identifier of the supporting resource.
role A string. Role of the supporting resource
name A string. Name of the resource supporting the service.
@referredTypa A string; Type of the resource.
SupportingService sub-resource
A collection of services that support this service -This could be used to described
Field Description
href A string. Reference of the supporting service.
id A string. Unique identifier of the supporting service.
category A string. Category of the supporting service.
name A string. Name of the supporting service.
@referredType A string; Type of the resource.
RelatedPartyRef relationship
RelatedParty reference. A related party defines party or party role linked to a specific entity.
Field Description
href A string. Reference of the related party, could be a party reference or a party
role reference.
id A string. Unique identifier of a related party.
name A string. Name of the related party.
role A string. Role of the related party.
validFrom A timePeriod – Period of time when this party is relevant
@referredType A string; Type of the party.
ServiceOrderRef relationship
Field Description
href A string. The Hyperlink to access the related Service Order.
id A string. Unique identifier of the related Service Order.
serviceOrderItemId A string. Id of the service order creating/modifying this service
ServiceSpecification relationship
Field Description
id A string. Unique identifier of the service specification.
href A string. Reference of the service specification.
version A string. Version of the service specification.
name A string. Name of the service specification.
@type A string. Indicates the (class) type of resource (here service specification).
@schemaLocation A string. URL to get to the schema description file.
@baseType A string. Indicates the base type of the sub resource. Here it should be valued
to 'ServiceSpecification'.
TargetServiceSchema sub-resource
Target to the schema describing the service spec resource (and type)
Field Description
@type A string. Indicates the (class) type of resource.
@schemaLocation A string. This field provided a link to the schema describing this REST
resource.
{
"id":"11",
"href":"http://..../service/11",
"name":"NiceService",
"description":"Service inventory sample",
"@type":"vCPE",
"state":"Active",
"type":"CFS",
"category":"Cloud",
"isServiceEnabled":true,
"hasStarted":true,
"startMode":"1",
"isStateful":true,
"serviceDate":"2018-01-15T12:26:11.747Z",
"startDate":"2018-01-15T12:26:11.747Z",
"serviceSpecification":{
"id":"12",
"href":"http://...:serviceSpecification/12",
"name":"vCPE",
"version":"1",
"@type":"vCPE",
"@schemaLocation":"http..."
},
"serviceCharacteristic":[
{
"name":"vCPE_IP",
"valueType":"String",
"value":{
"@type":"IPAddress",
"@schemaLocation":"http....",
"vCPE_IP":"193.218.236.21"
}
}
],
"serviceRelationship":[
{
"type":"ReliesOn",
"service":{
"id":"19",
"href":"http://..../service/19"
}
}
],
"supportingService":[
{
"id":"17",
"href":"http://..../service/17",
"name":"supporting service vxwn",
"@referredType":"vxwn"
}
],
"supportingResource":[
{
"id":"99",
"href":"http://..../resource/99",
"name":"GenInfra",
"@referredType":"Infra"
},
{
"id":"94",
"href":"http://..../resource/94",
"name":"BNG_MUX",
"@referredType":"MUX"
}
],
"relatedParty":[
{
"id":"456",
"href":"http://serverlocation:port/partyManagement/party/456",
"role":"user"
}
],
"serviceOrder":[
{
"id":"42",
"href":"http://serverlocation:port/orderManagement/serviceOrder/42",
"serviceOrderItem":"1"
}
],
"note":[
{
"date":"2018-01-15T12:26:11.748Z",
"author":"Jean Pontus",
"text":"bla bla bla"
}
]
}
The notification structure for all notifications in this API follows the pattern depicted by the figure below.
This notification structure owns an event structure ("SpecificEvent" placeholder) linked to the resource
concerned by the notification using the resource name as access field ("resourceName" placeholder).
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceCreationNotification",
"event": {
"service" :
{-- SEE Service RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceAttributeValueChangeNotification",
"event": {
"service" :
{-- SEE Service RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceStateChangeNotification",
"event": {
"service" :
{-- SEE Service RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceBatchNotification",
"event": {
"service" :
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceRemoveNotification",
"event": {
"service" :
{-- SEE Service RESOURCE SAMPLE --}
}
}
API OPERATIONS
Other Request Methods POST on TASK Resource GET and POST must not
be used to tunnel other
request methods.
Filtering and attribute selection rules are described in the TMF REST Design Guidelines.
OPERATIONS ON SERVICE
LIST SERVICES
GET /service?fields=...&{filtering}
Description
Providing filtering criteria is mandatory to avoid too many answers retrieved. See example below:
• description
• relatedParty.id
• category + state
• type + date selection
• supportingResource.id
Usage Samples
Request
Response
200
[
{
"id":"11",
"name":"NiceService",
"@type":"vCPE",
"state":"Active",
"category":"Cloud"
},
{
"id":"196",
"name":"NiceServiceToo",
"@type":"vCPE",
"state":"Active",
"category":"Cloud"
},
{
"id":"88",
"name":"NiceServiceAsWell",
"@type":"Firewall",
"state":"Inactive",
"category":"Cloud"
}
]
RETRIEVE SERVICE
GET /service/{id}?fields=...&{filtering}
Description
Usage Samples
Request
GET /serviceInventoryManagement/service/11
Accept: application/json
Response
200
{
"id":"11",
"href":"http://..../service/11",
"name":"NiceService",
"description":"Service inventory sample",
"@type":"vCPE",
"state":"feasibilityChecked",
"category":"Cloud",
"isServiceEnabled":true,
"hasStarted":true,
"startMode":"1",
"isStateful":true,
"serviceDate":"2018-01-15T12:26:11.747Z",
"startDate":"2018-01-15T12:26:11.747Z",
"serviceSpecification":{
"id":"12",
"href":"http://...:serviceSpecification/12",
"name":"vCPE",
"version":"1",
"@type":"vCPE",
"@schemaLocation":"http..."
},
"serviceCharacteristic":[
{
"name":"vCPE_IP",
"valueType":"String",
"value":{
"@type":"IPAddress",
"@schemaLocation":"http....",
"vCPE_IP":"193.218.236.21"
}
}
],
"serviceRelationship":[
{
"type":"ReliesOn",
"service":{
"id":"19",
"href":"http://..../service/19"
}
}
],
"supportingService":[
{
"id":"17",
"href":"http://..../service/17",
"name":"supporting service vxwn",
"@referredType":"vxwn"
}
],
"supportingResource":[
{
"id":"99",
"href":"http://..../resource/99",
"name":"GenInfra",
"@referredType":"Infra"
},
{
"id":"94",
"href":"http://..../resource/94",
"name":"BNG_MUX",
"@referredType":"MUX"
}
],
"relatedParty":[
{
"id":"456",
"href":"http://serverlocation:port/partyManagement/party/456",
"role":"user"
}
],
"serviceOrder":[
{
"id":"42",
"href":"http://serverlocation:port/orderManagement/serviceOrder/42",
"serviceOrderItem":"1"
}
],
"note":[
{
"date":"2018-01-15T12:26:11.748Z",
"author":"Jean Pontus",
"text":"bla bla bla"
}
]
}
CREATE SERVICE
POST /service
Note: this operation is available only to ADMIN API users
Description
POST request should be used without specifying following attributes (these attributes will be defined by
server side):
• id
• href
The following tables provide the list of mandatory and non-mandatory attributes when creating a Service,
including any possible rule conditions and applicable default values.
Additional Rules
The following table provides additional rules indicating mandatory fields in sub-resources or relationships
when creating a Service resource.
Usage Samples
Request
{
"name":"NiceService",
"description":"Service inventory sample",
"@type":"vCPE",
"state":"Active",
"category":"Cloud",
"isServiceEnabled":true,
"hasStarted":true,
"startMode":"1",
"isStateful":true,
"serviceSpecification":{
"id":"12",
"href":"http://...:serviceSpecification/12",
"name":"vCPE",
"version":"1",
"@type":"vCPE",
"@schemaLocation":"http..."
},
"serviceCharacteristic":[
{
"name":"vCPE_IP",
"valueType":"String",
"value":{
"@type":"IPAddress",
"@schemaLocation":"http....",
"vCPE_IP":"193.218.236.21"
}
}
],
"serviceRelationship":[
{
"type":"ReliesOn",
"service":{
"id":"19",
"href":"http://..../service/19"
}
}
],
"relatedParty":[
{
"id":"456",
"href":"http://serverlocation:port/partyManagement/party/456",
"role":"user"
}
],
"note":[
{
"date":"2018-01-15T12:26:11.748Z",
"author":"Jean Pontus",
"text":"bla bla bla"
}
]
}
Response
201
"{ JSON Resource Representation with every provided and default attribute}"
PATCH SERVICE
PATCH /service/{id}
Note: this operation is available only to ADMIN API users
Description
Note: If the update operation yields to the creation of sub-resources or relationships, the same rules
concerning mandatory sub-resource attributes and default value settings in the POST operation applies to
the PATCH operation. Hence these tables are not repeated here.
The tables below provide the list of patchable and non-patchable attributes, including constraint rules on
their usage.
Notice that patching is possible only for 'admin' API users.
Usage Samples
Request
PATCH /serviceInventoryManagement/service/42
Content-Type: application/json-patch+json
{
"path": "/state",
"value": "reserved",
"op": "replace"
}
Response
201
DELETE SERVICE
DELETE /service/{id}
Note: this operation is available only to ADMIN API users
Description
Usage Samples
Request
DELETE /serviceInventoryManagement/service/42
Response
204
API NOTIFICATIONS
For every single of operation on the entities use the following templates and provide sample REST
notification POST calls.
It is assumed that the Pub/Sub uses the Register and Unregister mechanisms described in the REST
Guidelines reproduced below.
REGISTER LISTENER
POST /hub
Description
Sets the communication endpoint address the service instance must use to deliver information about its
health state, execution state, failures and metrics. Subsequent POST calls will be rejected by the service if
it does not support multiple listeners. In this case DELETE /api/hub/{id} must be called before an endpoint
can be created again.
Behavior
Usage Samples
Request
POST /api/hub
Accept: application/json
{"callback": "http://in.listener.com"}
Response
201
Content-Type: application/json
Location: /api/hub/42
{"id":"42","callback":"http://in.listener.com","query":null}
UNREGISTER LISTENER
DELETE /hub/{id}
Description
Clears the communication endpoint address that was set by creating the Hub.
Behavior
Usage Samples
Request
DELETE /api/hub/42
Accept: application/json
Response
204
POST /client/event
Description
Provide to a registered listener the description of the event that was raised. The /client/listener URL
is the callback URL passed when registering the listener.
Behavior
Return HTTP/1.1 status code 201 if the service is able to set the configuration.
Usage Samples
Here's an example of a notification received by the listener. In this example “EVENT TYPE” should be
replaced by one of the notification types supported by this API (see Notification Resources Models
section) and EVENT BODY refers to the data structure of the given notification type.
Request
POST /event
Accept: application/json
{
"eventId": "12368",
"eventTime": "2018-01-12T13:23:43.704Z",
"eventType": " ServiceStateChangeNotification ",
"event": {
"resource": "48"
}
}
Response
201
For detailed examples on the general TM Forum notification mechanism, see the TMF REST Design
Guidelines.
ACKNOWLEDGEMENTS
RELEASE HISTORY
Nicoleta Stoica
Vodafone
[email protected]
Mariano Belaunde
Orange Labs