For every single of operation on the entities use the following templates and provide sample REST requests and responses.
Remember that the following Uniform Contract rules must be used :
Operation on Entities | Uniform API Operation | Description |
Query Entities | GET Resource | GET must be used to retrieve a representation of a resource. |
Create Entity | POST Resource | POST must be used to create a new resource |
Partial Update of an Entity | PATCH Resource | PATCH must be used to partially update a resource |
Complete Update of an Entity | PUT Resource | PUT must be used to completely update a resource identified by its resource URI |
Remove an Entity | DELETE Resource | DELETE must be used to remove a resource |
Execute an Action on an Entity | POST on TASK Resource | POST must be used to execute Task Resources |
Other Request Methods | POST on TASK Resource | GET and POST must not be used to tunnel other request methods. |
...
Specify which attributes are patchable using the following table (to capture RO attributes)
Attribute name | Patchable | Rule |
Id | No |
|
lastUpdate | No |
|
version | Y | Should be greater than the current one |
lifecycleStatus | Y | Status should be valid |
startDateTime | Y |
|
endDateTime | Y | Should be greater than startDateTime |
parentId | Y | The parent category should exist |
isRoot | Y | To be updated in compliance with the parentId |
name | Y |
|
description | Y |
|
...
Specify which attributes are patchable using the following table (to capture RO attributes)
Attribute name | Patchable | Rule |
Id | No |
|
lastUpdate | No |
|
version | Y | Should be greater than the current one |
lifecycleStatus | Y | Status should be valid |
startDateTime | Y |
|
endDateTime | Y | Should be greater than startDateTime |
isBundle | Y | To be updated in compliance with the bundledProductOffering |
name | Y |
|
description | Y |
|
category | Y |
|
bundledProductOffering | Y | To be updated in compliance with isBundle |
productSpecification | Y | It should exist |
serviceCandidate | Y | It should exist |
resourceCandidate | Y | It should exist |
channel | Y | It should exist |
place | Y | It should exist |
productOfferingTerm | Y |
|
productOfferingPrice | Y | It should exist |
Further document any rules that must be implemented when patching attributes.
Rule name | Rule/Pre Condition/Side Effects/Post Conditons |
isBundle | isBundle determines whether a productOffering represents a single productOffering (false), or a bundle of productOfferings (true). |
...
Specify which attributes are patchable using the following table (to capture RO attributes)
Attribute name | Patchable | Rule |
Id | No |
|
lastUpdate | No |
|
version | Y | Should be greater than the current one |
lifecycleStatus | Y | Status should be valid |
startDateTime | Y |
|
endDateTime | Y | Should be greater than startDateTime |
isBundle | Y | To be updated in compliance with the bundledProductSpecification |
name | Y |
|
description | Y |
|
brand | Y |
|
relatedParty | Y | It should exist |
attachment | Y | It should exist |
bundledProductSpecification | Y | To be updated in compliance with isBundle |
productSpecificationRelationship | Y | It should exist |
serviceSpecification | Y | It should exist |
resourceSpecification | Y | It should exist |
productSpecCharacteristic | Y | It should exist |
productSpecCharacteristicValue | Y |
|
Further document any rules that must be implemented when patching attributes.
Rule name | Rule/Pre Condition/Side Effects/Post Conditons |
isBundle | isBundle determines whether a productSpecification represents a single productSpecification (false), or a bundle of productSpecification (true). |
...
ID Management :
The response provide the category id.
Specify the attributes required when an entity is created (and their default values if not):
Attribute name | Mandatory | Default | Rule |
isRoot | N | true |
|
name | Y |
|
|
parentId | Y |
| If isRoot is set to "false", parentId is mandatory |
...
ID Management :
The response provides the productOffering id.
Specify the attributes required when an entity is created (and their default values if not):
Attribute name | Mandatory | Default | Rule |
name | Y |
|
|
isBundle | N | false |
|
bundledProductOffering | Y |
| If isBundle is set to "true", bundledProductOffering is mandatory |
productSpecification | Y |
|
|
productOfferingPrice | Y |
|
|
...
ID Management :
The response provides the productSpecification id.
Specify the attributes required when an entity is created (and their default values if not):
Attribute name | Mandatory | Default | Rule |
name | Y |
|
|
isBundle | N | false |
|
bundledProductSpecification | Y |
| If isBundle is set to "true", bundledProductSpecification is mandatory |
productSpecCharacteristic | Y |
|
|
productSpecCharacteristicValue | Y |
|
|
...
REQUEST |
GET ../catalogManagement/importJob/54 |
RESPONSE |
200 |
Anchor | ||||
---|---|---|---|---|
|
...
- What status and exception codes are returned.
- Returns HTTP/1.1 status code 200 if the request was successful.
Any other special return and/or exception codes.
REQUEST
DELETE API/{RESOURCE}/{ID}
RESPONSE
200
Example see TMF REST Design Guidelines.
© TM Forum 2015. All Rights Reserved.