Objective
It allows to create a relation between two elements (documents or folders). The relations are created one by one so transitivity is not applied. I.e., if “A” is related with “B” and then “B” is related with “C” that does not mean that “A” is automatically related with “C”. DST must be provided.
Parameters
Parameter | Description | Type |
library | eDOCS library | String |
user | User name | String |
password | User password | String |
documentA | Doc number of document A. | String |
documentB | Doc number of document B. | String |
dbSchema | Database schema. By default is set to “DOCSADM” if an empty string is passed. | String |
client | Optional parameter for the client code | String |
project | Optional parameter for the project code | String |
Rest Invoke
- http://localhost:port/GSService/xml/ or http://localhost:port/GSService/json/
- UriTemplate:
- “/CreateRelation/?library={library}&user={user}&password={password}&docNumberA={docNumberA}& docNumberB={docNumberB}&dbSchema={dbSchema}&client={client}&project={project}”
- “/CreateRelationDST/?library={library}&user={user}&dst={dst}&docNumberA={docNumberA}& docNumberB={docNumberB}&dbSchema={dbSchema}&client={client}&project={project}”
Example
http://localhost:8732/GSService/xml/CreateRelation/?library=DMTESTLEGAL&user=admin&password=owc123&docNumberA=310& docNumberB=754&dbSchema=DOCSADM
The method returns 0 if the relation has been successfully created or -1, if the operation fails.
The method doesn’t check if documents exist in the library. This control will be included in future versions. The search methods can be used to check if the document exists.
DST Example
http://localhost:8732/GSService/xml/CreateRelationDST/?library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&docNumberA=310& docNumberB=754&dbSchema=DOCSADM
Error
As this method returns an integer, detailed errors can be found in the error log. See Appendix D for more information about the edocs.log file.