Resource Ordering Management API REST Specification
Resource Ordering Management API REST Specification
Resource Ordering
Management
API REST Specification
TMF652
Release 16.5.1
April 2017
NOTICE
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.
TM FORUM invites any TM FORUM Member or any other party that believes it has patent claims that
would necessarily be infringed by implementations of this TM Forum Standards Final Deliverable, to notify
the TM FORUM Team Administrator and provide an indication of its willingness to grant patent licenses to
such patent claims in a manner consistent with the IPR Mode of the TM FORUM Collaboration Project
Team that produced this deliverable.
The TM FORUM invites any party to contact the TM FORUM Team Administrator if it is aware of a claim
of ownership of any patent claims that would necessarily be infringed by implementations of this TM
FORUM Standards Final Deliverable by a patent holder that is not willing to provide a license to such
patent claims in a manner consistent with the IPR Mode of the TM FORUM Collaboration Project Team
that produced this TM FORUM Standards Final Deliverable. TM FORUM may include such claims on its
website, but disclaims any obligation to do so.
TM FORUM takes no position regarding the validity or scope of any intellectual property or other rights
that might be claimed to pertain to the implementation or use of the technology described in this TM
FORUM Standards Final Deliverable or the extent to which any license under such rights might or might
not be available; neither does it represent that it has made any effort to identify any such rights.
Information on TM FORUM's procedures with respect to rights in any document or deliverable produced
by a TM FORUM Collaboration Project Team can be found on the TM FORUM website. Copies of claims
of rights made available for publication and any assurances of licenses to be made available, or the result
of an attempt made to obtain a general license or permission for the use of such proprietary rights by
implementers or users of this TM FORUM Standards Final Deliverable, can be obtained from the TM
FORUM Team Administrator. TM FORUM makes no representation that any information or list of
intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential
Claims.
TABLE OF CONTENTS
NOTICE ........................................................................................................................................ 2
Table of Contents.......................................................................................................................... 4
Introduction ................................................................................................................................... 6
API OPERATIONS...................................................................................................................... 20
API NOTIFICATIONS.................................................................................................................. 31
Acknowledgements ..................................................................................................................... 34
LIST OF TABLES
N/A
INTRODUCTION
The following document is the specification of the REST API for Resource Order Management. It includes
the model definition as well as all available operations. Possible actions are creating, updating and
retrieving Resource Orders (including filtering).
A Resource Order API provides a standard mechanism for placing a Resource Order with all necessary
order parameters. A Resource Order is created based on a resource candidate that is defined in the
resource catalog. The Resource candidate is an entity that makes a Resource Specification available to a
resource catalog.
Resources are physical or non-physical components (or some combination of these) within an enterprise's
infrastructure or inventory. They are typically consumed or used by Services (for example a physical port
assigned to a service) or contribute to the realization of a Product (for example, a SIM card). They can be
drawn from the Application, Computing and Network domains, and include, for example, Network
Elements, software, IT systems, content and information, and technology components.
A Resource Specification is an abstract base class for representing a generic means for implementing a
particular type of Resource. In essence, a Resource Specification defines the common attributes and
relationships of a set of related Resources, while Resource defines a specific instance that is based on a
particular Resource Specification.
- A Resource Order is a type of order which can be used to place an order between a service
provider and a partner and vice versa
- Main order items attributes are the orders resource candidates and resource characteristics with
the related action to be performed (e.g: add or delete resources), state.
Resource Order API performs the following operations on the Resource Order:
Reader will find examples of use cases in “Open Digital Business Scenarios and Use Cases” document.
RESOURCE MODEL
Resource model
AppointmentRef
ResourceSpecificationRef
id: String
id: String href: String
resourceSpecification
href: String
name: String 1
appointment 0..1
Note
note ResourceOrder 0..1 0..1
date: DateTime
author: String
0..* 0..1 id: String ResourceOrderItem
text: String
href: String
externalId: String orderItem id: String
state: String action: String
0..1 0..*
name: String state: String
description: String quantity: int 0..1
priority: int
OrderRelationship type: String 0..1
orderRelationship category: String
type: String orderDate: DateTime orderItemRelationship 0..*
id: String 0..* 0..1 requestedCompletionDate: Date
href: String requestedStartDate: Date ResourceOrderItemRelationship
resource
completionDate: DateTime 1 relationshipType: String
startDate: Date id: String
A
expectedCompletionDate: Date Resource
ResourceCharacteristic
href: String ResourceRelationship
role: String name: String
type: String
value: String
0..1
resource 1
ResourceRef
id: String
href: String
Lifecycle
The order item states are the same as the order ones. Note that the order and order item states are tightly
linked and need to be consistent, for example :
Initial
Rej ected
Acknow ledged
yes no
Final
accept
resource
order Pending
start order treatment
Cancelled
issue is resolved
Held Final
Failed Partial
Completed
Final
Acknowledged The Acknowledged state is where an order has been received and has passed
message and basic business validations.
Cancelled The Cancelled state is where an In-Flight Order has been successfully cancelled.
Completed The Completed state is where an order has complete provision and the resource is
now active.
Pending The Pending state is used when an order is currently in a waiting stage for an
action/activity to be completed before the order can progress further, pending order
amend or cancel assessment. In situations where Access Seeker action is required,
an “information required” notification will be issued on transition into this state.
A pending stage can lead into auto cancellation of an order, if no action is taken within
the defined timeframes to be described under the Agreement.
Held The Held state is used when an order cannot be progressed due to an issue. SP has
temporarily delayed completing an order to resolve an infrastructure shortfall to
facilitate supply of order. Upon resolution of the issue, the order will continue to
progress.
Failed All Order items have failed which results in the entire Order has Failed.
Partial Some Order items have failed and some have succeeded so the entire Order is in a
Partial state. This provides support for partial Failure of an Order
Consistency between Resource Order state and Resource Order Item state table:
If resource order state has state… the resource order items state should be…
Rejected All ‘Rejected’
Acknowledged All ‘Acknowledged’
note: once delivery begins for at least an item the RO
state shifts to ‘In Progress’
in Progress At least one RO item has ‘In Progress’ state
All items should be ‘Acknowledged’
Pending All ‘Pending state
Held All ‘Held’ state
Cancelled All ‘Cancelled’
Partial All Order item are either ‘Failed’ or ‘Completed’
At least one item has ‘Failed’ state
At least one item has ‘Completed’ state
Failed All ‘Failed’
Completed All ‘Completed’
Field descriptions
ResourceOrder fields
category A string. Used to categorize the order from a business perspective that can
be useful for the Resource Order Management system.
completionDate A date time (DateTime). Date when the order was completed.
externalId A string. ID given by the consumer and only understandable by him (to
facilitate his searches afterwards).
orderDate A date time (DateTime). Date when the order was created.
priority An int (int). A way that can be used by consumers to prioritize orders in
Resource Order Management system (from 0 to 4 : 0 is the highest priority,
and 4 the lowest).
requestedCompletionDate A date (Date). Requested delivery date from the requestor perspective.
note A list of notes (Note [*]). Extra information about the Resource Order
Note sub-resource
OrderRelationship sub-resource
ResourceOrderItem
An identified part of the order. A resource order is decomposed into one or more order items.
action A string. The action to be carried out on the Resource. Can be:
add
modify
delete
noChange
state A string. State of the order item : described in the state machine
diagram.
Appointment
Used to precise that an appointment was set-up with a related party for this order item.
Place
Used to define a place useful for the resource (for example a delivery geographical place).
role A string. The role of the place (e.g. delivery address, install site etc).
Resource
Resource attributes description (these are as per the Resource ODE model as used in the
Resource Inventory specification).
href A string. Reference to the owned resource (useful for delete or modify
command).
place A list of places (Place [*]). Used to define places useful for the resource (for
example a delivery geographical place).
RelatedPartyRef relationship
RelatedParty reference. A related party defines party or party role linked to a specific entity.
href A string. Reference of the related party, could be a party reference or a party
role reference.
{
"id": "42",
"href": "http://serverlocation:port/resourceOrderingManagement/resourceOrder/42",
"externalId": "MyResourceOrder_42",
"priority": "1",
"description": "A wonderful 42 order for brand new Resources",
"category": "Uncategorized",
"state": "InProgress",
"orderDate": "2013-04-12T16:42:23-04:00",
"requestedStartDate": "2013-04-12T16:42:23-04:00",
"requestedCompletionDate": "2013-04-19T16:42:23-04:00",
"completionDate": "2013-04-19T16:42:23-04:00",
"orderRelationship": [{
"type": "dependency",
"href": "https://host:port/ resourceOrderingManagement /resourceOrder/3304",
"id": "3304"
}, {
"type": "cross-ref",
"href": "https://host:port/ serviceOrderingManagement /serviceOrder/3304",
"id": "3304"
}
],
"note": [{
"text": "A free text detailing the note",
"date": "2013-04-12T16:42:23-04:00",
"author": "name"
}],
"relatedParty": [{
"role": "owner",
"id": "345221",
"name": "John Doe"
}],
"resourceOrderItem": [{
"id": "1",
"action": "add",
"state": "Acknowledged",
"appointment": {
"href": "http://serverlocation:port/appointment/100"
},
"resourceSpecification": {
"id": "42",
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/42"
},
"resource": {
"place": {
"href": "http://map.google.com/.../1234112GDE",
"role": "DeliveryPlace"
},
"resourceCharacteristic": [{
"name": "Colour",
"value": "White"
}, {
"name": "Memory",
"value": "16"
}]
}
}, {
"id": "2",
"action": "modify",
"state": "InProgress",
"resourceSpecification": {
"id": "43",
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/43"
},
"resource": {
"id": "456",
"href": "http: //serverlocation: port/resourceInventoryManagement/logicalResource/456",
"resourceCharacteristic": [{
"name": "anotherCharacteristic",
"value": "itsValue"
}],
"relatedParty": [{
"role": "owner",
"id": "5667443",
"name": "Jimmy Doe"
}]
}
}, {
"id": "3",
"action": "add",
"state": "InProgress",
"resourceSpecification": {
"id": "43",
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/51"
},
"resource": {
"resourceRelationship": {
"type": "reliesOn",
"resource": {
"href": "411",
"id": "http: //serverlocation:
port/resourceInventoryManagement/resource/411"
}
}
}
}]
}
- ResourceOrderAttributeValueChangeNotification
- ResourceOrderStateChangeNotification
- ResourceOrderRemoveNotification
- ResourceInformationRequiredNotification
The notification structure for all notifications in this API follow the pattern depicted by the figure below.
A notification resource (depicted by "SpecificNotification" placeholder) is a sub class of a generic
Notification structure containing an id of the event occurence (eventId), an event timestamp (eventTime),
and the name of the notification resource (eventType).
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":"ResourceOrderCreationNotification",
"event": {
"resourceOrder" :
{-- SEE ResourceOrder RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ResourceOrderAttributeValueChangeNotification",
"event": {
"resourceOrder" :
{-- SEE ResourceOrder RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ResourceOrderStateChangeNotification",
"event": {
"resourceOrder" :
{-- SEE ResourceOrder RESOURCE SAMPLE --}
}
}
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ResourceOrderRemoveNotification",
"event": {
"resourceOrder" :
{-- SEE ResourceOrder RESOURCE SAMPLE --}
}
}
- “resourcePath” allows to precise if it is a data at order level or at orderItem level (and which one of
them) that is missing
- “fieldPath” details which field is missing. Its structure is quite similar to GET filter criteria :
o “missing=” points at the missing field
o “&<criteria>” can be used to identify a specific element in lists
{
"eventId":"00005",
"eventTime":"2013-04-19T16:42:25-30:00",
"eventType":"orderInformationRequiredNotification",
"resourcePath":"/order/42 ",
"fieldPath":"missing=requestedStartDate",
"resourceOrder":{
"id":" 42",
"href":"http://serverlocation:port/resourceOrderingManagement/resourceOrder/42",
}
}
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.
Usage Samples
Searching resource orders started on January 1st 2015. The result items are shrunk to show only the ids
(fields=id)
Request
GET /resourceOrderingManagement/resourceOrder?fields=id&orderDate="2015-01-01"
Accept: application/json
Response
200
[
{
"id": "986781"
},
{
"id": "986782"
},
{
"id": "986783"
}
]
Usage Samples
Request
GET /resourceOrderingManagement/resourceOrder/42
Accept: application/json
Response
200
{
"id": "42",
"href": "http://serverlocation:port/resourceOrderingManagement/resourceOrder/42",
"externalId": "MyResourceOrder_42",
"priority": "1",
"description": "A wonderful 42 order for brand new Resources",
"category": "Uncategorized",
"state": "InProgress",
"orderDate": "2013-04-12T16:42:23-04:00",
"requestedStartDate": "2013-04-12T16:42:23-04:00",
"requestedCompletionDate": "2013-04-19T16:42:23-04:00",
"completionDate": "2013-04-19T16:42:23-04:00",
"orderRelationship": [{
"type": "dependency",
"href": "https://host:port/ resourceOrderingManagement /resourceOrder/3304",
"id": "3304"
}, {
"type": "cross-ref",
"href": "https://host:port/ serviceOrderingManagement /serviceOrder/3304",
"id": "3304"
}
],
"note": [{
"text": "A free text detailing the note",
"date": "2013-04-12T16:42:23-04:00",
"author": "name"
}],
"relatedParty": [{
"role": "owner",
"id": "345221",
"name": "John Doe"
}],
"resourceOrderItem": [{
"id": "1",
"action": "add",
"state": "Acknowledged",
"appointment": {
"href": "http://serverlocation:port/appointment/100"
},
"resourceSpecification": {
"id": "42",
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/42"
},
"resource": {
"place": {
"href": "http://map.google.com/.../1234112GDE",
"role": "DeliveryPlace"
},
"resourceCharacteristic": [{
"name": "Colour",
"value": "White"
}, {
"name": "Memory",
"value": "16"
}]
}
}, {
"id": "2",
"action": "modify",
"state": "InProgress",
"resourceSpecification": {
"id": "43",
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/43"
},
"resource": {
"id": "456",
"href": "http: //serverlocation: port/resourceInventoryManagement/logicalResource/456",
"resourceCharacteristic": [{
"name": "anotherCharacteristic",
"value": "itsValue"
}],
"relatedParty": [{
"role": "owner",
"id": "5667443",
"name": "Jimmy Doe"
}]
}
}, {
"id": "3",
"action": "add",
"state": "InProgress",
"resourceSpecification": {
"id": "43",
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/51"
},
"resource": {
"resourceRelationship": {
"type": "reliesOn",
"resource": {
"href": "411",
"id": "http: //serverlocation:
port/resourceInventoryManagement/logicalResource/411"
}
}
}
}]
}
The following tables provides the list of mandatory and non mandatory attributes when creating a
ResourceOrder, including any possible rule conditions and applicable default values.
orderItem.appointment
Additional Rules
The following table provides additional rules indicating mandatory fields in sub-resources or relationships
when creating a ResourceOrder resource.
Pre-conditions
PATCH allowed if order not completed
When creating the resource, the following table summarizes the default values applicable to optional
attributes of the resource (or sub-resources).
Usage Samples
Here's an example of a request for creating a ResourceOrder resource composed of 2 order items:
- Line 1: for ordering a new resource that needs a physical place and an appointment to be
delivered;
- Line 2: change of a characteristic value of an already owned Resource and change the user
associated with this Resource
Request
POST /resourceOrderingManagement/resourceOrder
Content-Type: application/json
"note": [{
"text": "A free text detailing a note for the resource order"
}],
"relatedParty": [{
"role": "owner",
"id": "345221",
"name": "John Doe"
}],
"resourceOderItem": [{
"id": "1",
"action": "add",
"appointment":{
"href":"http://serverlocation:port/appointment/100",
},
"resourceSpecification": {
"href": "http: //serverlocation: port/resourceCatalog/resourceSpecification/42"
},
"resource": {
"place":{
"href":"http://map.google.com/.../1234112GDE",
"role":"DeliveryPlace"
},
"resourceCharacteristic": [{
"name": "Colour",
"value": "White"
}, {
"name": "Memory",
"value": "16"
}]
}
}, {
"id": "2",
"action": "modify",
"resource": {
"href": "http: //serverlocation: port/resourceInventoryManagement/logicalResource/456",
"relatedParty": [{
"role": "owner",
"id": "5667443",
"name": "Jimmy Doe"
}]
}
}, ]
}
Response
201
{
"id": "42",
"href": "http://serverlocation:port/ resourceOrderingManagement /resourceOrder/42",
"priority": "1",
"state": "Acknowledged",
"orderDate": "2013-04-12T16:42:23-04:00",
"note": [{
"text": "A free text detailing a note for the resource order"
}],
"relatedParty": [{
"role": "owner",
"id": "345221",
"name": "John Doe"
}],
"resourceOderItem": [{
"id": "1",
"action": "add",
"state": "Aknowledged",
"appointment": {
"href": "http://serverlocation:port/appointment/100"
},
"resourceSpecification": {
"href": "http: //serverlocation: port/resourceCatalogManagement/resourceSpecification/42"
},
"resource": {
"place": {
"href": "http://map.google.com/.../1234112GDE",
"role": "DeliveryPlace"
},
"resourceCharacteristic": [{
"name": "Colour",
"value": "White"
}, {
"name": "Memory",
"value": "16"
}]
}
}, {
"id": "2",
"action": "modify",
"state": "Aknowledged",
"resource": {
"href": "http: //serverlocation: port/resourceInventoryManagement/logicalResource/456",
"relatedParty": [{
"role": "owner",
"id": "5667443",
"name": "Jimmy Doe"
}]
}
}]
}
Description
This operation allows partial updates of a resource order entity. Support of json/merge
(https://tools.ietf.org/html/rfc7386) is mandatory, support of json/patch (http://tools.ietf.org/html/rfc5789) is
optional.
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.
Additional Rules
Pre-conditions
PATCH allowed if order not completed
Usage Samples
Request
PATCH /resourceOrderingManagement/resourceOrder/42
Content-Type: application/merge-patch+json
{
"priority": 1
}
Response
201
Description
Usage Samples
Request
DELETE /resourceOrderingManagement/resourceOrder/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/listener
Description
Clears the communication endpoint address that was set by creating the Hub.
Provides 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
Returns 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 /client/listener
Accept: application/json
{
"event": {
EVENT BODY
},
"eventType": "EVENT_TYPE"
}
Response
201
For detailed examples on the general TM Forum notification mechanism, see the TMF REST
Design Guidelines.
ACKNOWLEDGEMENTS
RELEASE HISTORY
Release Date Release led by: Description
Number
Nicoleta Stoica
Vodafone
Mariano Belaunde
Orange Labs