Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
_Toc404167099
_Toc404167099
GET API/SLA/{ID}

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

    RESPONSE

    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
_Toc404167100
_Toc404167100
PUT API/SLA/{ID}

This Uniform Contract operation is used to completely update the representation of a managed entity or a task.
Description :

...

REQUEST

PUT API/SLA/1
Content-type: application/json

{"sla": { JSON Resource Representation with every attributes }}

RESPONSE

201
Content-Type: application/json

{"sla": { JSON Resource Representation with every attributes }

Anchor
_Toc404167101
_Toc404167101
Anchor
_Ref234978967
_Ref234978967
Anchor
_Toc235288517
_Toc235288517
Anchor
_Toc236554611
_Toc236554611
Anchor
_Toc236554912
_Toc236554912
Anchor
_Toc236555375
_Toc236555375
Anchor
_Toc225613455
_Toc225613455
Anchor
_Toc225603244
_Toc225603244
Anchor
_Ref226733430
_Ref226733430
Anchor
_Ref230885009
_Ref230885009
Anchor
_Ref231980155
_Ref231980155
Anchor
_Ref232940733
_Ref232940733
Anchor
_Ref232940829
_Ref232940829
PATCH API/SLA/{ID}

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}
Content-type: application/json

{"sla": {
JSON Resource Representation with every attributes }}

RESPONSE

201
Content-Type: application/json

{"sla": { JSON Resource Representation with every attributes }}

 

Anchor
_Toc404167102
_Toc404167102
POST API/SLA/{ID}

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 }}

     

    Anchor
    _Toc404167103
    _Toc404167103
    DELETE API/SLA/{ID}

    This Uniform Contract operation is used to delete a managed entity or a task.
    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

    Anchor
    _Toc368488808
    _Toc368488808
    see TMF REST Design Guidelines.
    © TM Forum 2015. All Rights Reserved