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. |
...
Table of patchable attributes
Attribute name | Patchable | Rule |
id | N |
|
name | Y |
|
description | Y |
|
version | Y |
|
validityPeriod | Y |
|
template | Y |
|
href | Y |
|
name | Y |
|
description | Y |
|
relatedParty | Y |
|
state | Y |
|
approved | Y |
|
rules | Y |
|
id | Y |
|
metric | Y |
|
unit | Y |
|
referenceValue | Y |
|
operator | Y |
|
tolerance | Y |
|
Consequence | Y |
|
...
The requester cannot generate the id – the id to identify the REST resource is generated automatically in the back-end. The correlationId can be set from external but is not mandatory.
Specify the attributes required when an entity is created (and their default values if not):
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 |
|
|
...