Difference between revisions of "Clone"

From AMTech WikiDocs
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Endpoint for cloning resources :  
+
Endpoint for cloning resources:  
 
* /amtech/clone/resourceandlinks<resourceToCloneUri>?newname=<nameForClone>  
 
* /amtech/clone/resourceandlinks<resourceToCloneUri>?newname=<nameForClone>  
GET on this endpoint to clone the specified resource, generating clones for all the links referenced in the resource. Ex. If called with a resource LLRPReader1, that has 2 anntenas, it will generate a clone for the each of the antennas and the LLRPReader.
+
GET on this endpoint to clone the specified resource without persisting it, generating clones for all the links referenced in the resource. Ex. If called with a resource LLRPReader1, that has 2 anntenas, it will generate a clone for the each of the antennas and the LLRPReader.
The are entities' properties such as the "proximity area" and the "activity for observation production" that are handled as links that are not to be cloned. Their reference is copied to the new resource, instead of cloning them
+
 
* /amtech/clone/resourceflat<resourceToCloneUri>?newname=<nameForClone>
 
* /amtech/clone/resourceflat<resourceToCloneUri>?newname=<nameForClone>
GET on this endpoint to clone the specified resource, without cloning the links referenced in the resource.
+
GET on this endpoint to clone the specified resource without persisting it and without cloning the links referenced in the resource.
 +
 
 +
POST on both endpoint will clone the resource and persist it
 +
 
 +
The are properties such as "proximity area" that are always copied to the new resource as a reference, instead of cloning it.
 +
 
 +
Cloning is supported for:
 +
*Thing types
 +
*Observation types
 +
*Supported properties
 +
*Thing instances
 +
*Observation instances

Latest revision as of 13:25, 19 June 2017

Endpoint for cloning resources:

  • /amtech/clone/resourceandlinks<resourceToCloneUri>?newname=<nameForClone>

GET on this endpoint to clone the specified resource without persisting it, generating clones for all the links referenced in the resource. Ex. If called with a resource LLRPReader1, that has 2 anntenas, it will generate a clone for the each of the antennas and the LLRPReader.

  • /amtech/clone/resourceflat<resourceToCloneUri>?newname=<nameForClone>

GET on this endpoint to clone the specified resource without persisting it and without cloning the links referenced in the resource.

POST on both endpoint will clone the resource and persist it

The are properties such as "proximity area" that are always copied to the new resource as a reference, instead of cloning it.

Cloning is supported for:

  • Thing types
  • Observation types
  • Supported properties
  • Thing instances
  • Observation instances