...
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. |
Filtering and attribute selection rules are described in the TMF REST Design Guidelines.
Notifications are also described in a subsequent section.
Anchor | ||||
---|---|---|---|---|
|
This Uniform Contract operation is used to retrieve the representation of a managed entity or a task.
Note that collections can be retrieved via GET api/SLA with no {ID}
Description :
...
- 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.
Specify what level of attribute filtering can be used. In fact we mandate L0 (equality) filtering in every specification as per REST Guidelines. Add this to Template.
REQUEST
GET /api/sla
Accept: application/jsonRESPONSE
200
Content-Type: application/json
{"sla": [
JSON Resource Representation with every attributes }]
}
Retrieving all SLAs – returns an array/ a list of SLAs:- GET /api/sla
Retrieving all SLAs where 'http://..//acme.com' is involved with "SLAProvider" role:
...
Retrieve sla with specified ID – only one SLA is returned:
- GET /api/sla/1
Anchor | ||||
---|---|---|---|---|
|
This Uniform Contract operation is used to completely update the representation of a managed entity or a task.
Description :
...
REQUEST |
PUT API/SLA/1 |
RESPONSE |
201 |
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Description:
- This Uniform Contract operation is used to partially update the representation of a SLA.
- Resource represents a managed entity.
...
REQUEST |
PATCH API/sla/{ID} |
RESPONSE |
201 |
Anchor | ||||
---|---|---|---|---|
|
Description:
- This Uniform Contract operation is used to create a SLA.
- Resource represents a managed entity.
- Mandatory attributes that must be provided when you create the SLA :
...
Attribute name | Mandatory | Default | Rule |
id | N |
|
|
name | Y |
|
|
description | N |
|
|
version | N |
|
|
validityPeriod | N |
|
|
template | N |
|
|
href | N |
|
|
name | N |
|
|
description | N |
|
|
relatedParty | N |
|
|
state | N |
|
|
approved | N |
|
|
rules | N |
|
|
id | N |
|
|
metric | N |
|
|
unit | N |
|
|
referenceValue | N |
|
|
operator | N |
|
|
tolerance | N |
|
|
Consequence | N |
|
|
Further specify any rules on the creation of the entity
Rule name
Rule
REQUEST
POST API/sla
Content-type: application/json
{"sla": { JSON Resource Representation with every attributes ", }}RESPONSE
201
Content-Type: application/json
{"sla": {
JSON Resource Representation with every attributes }}
DELETE API/SLA/{ID}This Uniform Contract operation is used to delete a managed entity or a task.Anchor _Toc404167103 _Toc404167103
Description :- Provide an overall description of the Operation
- Describe if the resource represents a managed entity or a task.
- Describe the structure of the identifier.
...
- 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/SLA/{ID}
RESPONSE
200
Example
see TMF REST Design Guidelines.Anchor _Toc368488808 _Toc368488808
© TM Forum 2015. All Rights Reserved