SA REST API : System Architect REST API : Update diagram/definition instance
  
Update diagram/definition instance
Update instance of a diagram/definition.
Syntax
http://<Machine Name|IP>:<Port>/SARest/SQL/<Server Name>/<Encyclopedia Name>/<Workspace ID>/UpdateDefinition
An update session can also be supplied with ..?updateSession=<SessionID>
This must be a POST request and the data in the body must contain XML of the following structure.
<any>
   <DefinitionId>id</DefinitionId><DefinitionXml>..</DefinitionXml>
   Where DefinitionXml embeds:
   <SAProperty SAPrpName="name" SAPrpValue="value"
   For reference-type properties, either of the following can be used while supplying an ID number in the SAPrpValue:
   SAPrpModification="AddDDID"
   Or
   SAPrpModification="RemoveDDID"
   >
   </SAProperty>
</any>
Example
http://localhost:8889/SARest/SQL/MySQLServer/Samples/1/UpdateDefinition
A session ID can be provided as follows:
http://localhost:8889/SARest/SQL/MySQLServer/Samples/1/UpdateDefinition?updateSession=text
With supplied data:
<any>
   <DefinitionId>28450</DefinitionId>
   <DefinitionXml>
      <SAProperty SAPrpName="To Capability" SAPrpValue=""></SAProperty>
      <SAProperty SAPrpName="To Capability" SAPrpValue="433"    SAPrpModification="AddDDID"></SAProperty>
   </DefinitionXml>
</any>
Results
The supplied XML is returned.
If there is any error when setting the properties, ExceptionMessage and ExceptionCode attributes are populated for the appropriate SAProperty node.
If an exception occurs before properties can be updated, the following XML structure is returned:
<Exception>
   <Message>text</Message>
   <ErrorCode>number</ErrorCode>
</Exception>
Comments
A SessionID string is obtained using the StartSession function. See that topic for an explanation.
More than one SAProperty node can be supplied, in which case they are processed in the sequence in which they occur.
For oneOf-type properties, the value needs to be set to "" first before adding a reference.
This requires SAXT to be installed and for SAREST to have been configured with the SAXT URL.
See also
Handle encyclopedia transactions
Parent topic
System Architect REST API