In Lifecycle Management there is a requirement to distinguish between entities existing with different life cycle version numbers and accessible via different ACL mechanisms.
For example the same Product Offerings may exist in a Catalog but with different version numbers.
It may be possible for an administrator to see all the existing versions or for a partner to see only a subset of all the existing versions.
The entity version number is not dependent on the version number of the API. For example in PLM the same API (running at a specific version number) may be used to retrieve entities with different PLM version numbers.
In order to distinguish resources representing entities running with different version numbers and accessible though the same API version the following directive can be used /id:(version=x) and the version attribute is added to each entity.
Note that the catlog resources in this case may have the same ID but may be distinguished by the inclusion of the version number in their ID i.e /42:(version=1.0), /42:(version=2.0).
In the following examples we will assume that two versions of the VirtualStorage Product Offer exist in the Product Catalog. The Inactive and Active versions respectively version 1.0 and version 2.0.
...
REQUEST |
GET api/admin/catalogManagement/productOffering/?id=VirtualStorage Accept: application/json |
RESPONSE |
200 Content-Type: application/json [{ "id": " VirtualStorage ", "href": "http://serverlocation:port/catalogManagement/productOffering/VirtualStorage", "version": "1.0", "lastUpdate": "2013-04-19T16:42:23-04:00", "name": "Virtual Storage Medium", "description": "Virtual Storage Medium", "isBundle": "true", "lifecycleStatus": "InActive", ….. }, { "id": " VirtualStorage ", "href": "http://serverlocation:port/catalogManagement/productOffering/ VirtualStorage ", "version": "2.0", "lastUpdate": "2013-04-19T16:42:23-04:00", "name": "Virtual Storage Medium", "description": "Virtual Storage Medium", "isBundle": "true", "lifecycleStatus": "Active", ….. } ] |
Anchor |
---|
| _Toc405197219 |
---|
| _Toc405197219 |
---|
|
Query a specific versioned CATALOG resource
...
REQUEST |
GET api/admin/catalogManagement/productOffering/?id=VirtualStorage&version=1.0 Accept: application/json |
RESPONSE |
200 Content-Type: application/json [{ "id": "42", "href": "http://serverlocation:port/catalogManagement/productOffering/42", "version": "1.0", "lastUpdate": "2013-04-19T16:42:23-04:00", "name": "Virtual Storage Medium", "description": "Virtual Storage Medium", "isBundle": "true", "lifecycleStatus": "Active", ….. ] |
Anchor |
---|
| _Toc405197220 |
---|
| _Toc405197220 |
---|
|
Query current version of a catalog resource
...
REQUEST |
GET api/admin/catalogManagement/productOffering/VirtualStorage Accept: application/json |
RESPONSE |
200 Content-Type: application/json { "id": "42", "href": "http://serverlocation:port/catalogManagement/productOffering/42", "version": "2.0", "lastUpdate": "2013-04-19T16:42:23-04:00", "name": "Virtual Storage Medium", "description": "Virtual Storage Medium", "isBundle": "true", "lifecycleStatus": "Active", ….. } |
Anchor |
---|
| _Toc405197221 |
---|
| _Toc405197221 |
---|
|
Create new version of a CATALOG resource
...
REQUEST |
POST catalogManagement/productOffering Content-type: application/json { "id": "VirtualStorage" “id”: “VirtualStorage”, "version": "3.0", "name": "Virtual Storage Medium", "description": "Virtual Storage Medium", "isBundle": "true", "lifecycleStatus": "Active", "validFor": { "startDateTime": "2013-04-19T16:42:23-04:00", "endDateTime": "2013-06-19T00:00:00-04:00" }, … } |
RESPONSE |
201 Content-Type: application/json { "id": "VirtualStorage", "href": "http://serverlocation:port/catalogManagement/productOffering/42", "version": "3.0", "lastUpdate": "2013-04-19T16:42:23-04:00", "name": "Virtual Storage Medium", "description": "Virtual Storage Medium", "isBundle": "true", "lifecycleStatus": "Active", "validFor": { "startDateTime": "2013-04-19T16:42:23-04:00", "endDateTime": "2013-06-19T00:00:00-04:00" }, … } |
Anchor |
---|
| _Toc405197222 |
---|
| _Toc405197222 |
---|
|
Modify an existing version of a CATalog resource
...
REQUEST |
PATCH /catalogManagement/productOffering/VirtualStorage(Version=1.0) Content-type: application/json-patch+json
{
"lifecycleStatus": "Active" } |
RESPONSE |
201 Content-Type: application/json
{ "id": "VirtualStorage", "href": "http://serverlocation:port/catalogManagement/productOffering/VirtualStorage", "version": "1.0", "lifecycleStatus": "Active", ….. } |
...