REST.Backend.EMSApi.TEMSClientAPI.UpdateModule
Delphi
procedure UpdateModule(const AModuleID, AModuleName, AProtocol, AProtocolProps: string; const AJSONObject: TJSONObject; const AResources: TJSONArray; out AUpdatedAt: TUpdatedAt); overload;
procedure UpdateModule(const AModuleID: string; const AJSONObject: TJSONObject; const AResources: TJSONArray; out AUpdatedAt: TUpdatedAt); overload;
C++
void __fastcall UpdateModule(const System::UnicodeString AModuleID, const System::UnicodeString AModuleName, const System::UnicodeString AProtocol, const System::UnicodeString AProtocolProps, System::Json::TJSONObject* const AJSONObject, System::Json::TJSONArray* const AResources, /* out */ TUpdatedAt &AUpdatedAt)/* overload */;
void __fastcall UpdateModule(const System::UnicodeString AModuleID, System::Json::TJSONObject* const AJSONObject, System::Json::TJSONArray* const AResources, /* out */ TUpdatedAt &AUpdatedAt)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | REST.Backend.EMSApi.pas REST.Backend.EMSApi.hpp |
REST.Backend.EMSApi | TEMSClientAPI |
Description
Replaces the existing information about the specified module with the specified information.
UpdateModule receives the following parameters:
AModuleIDis a string with the ID of the target module.AJSONObjectis a JSON object that contains the new data for the target module.AResourcesis a JSON array of resources that UpdateModule must include intoAJSONObjectbefore it sends the new information to the EMS server.AUpdatedAtis an instance of TUpdatedAt that UpdateModule fills with the date and time when the EMS Server applied the requested change.
Alternatively, you may specify the following additional parameters after the AModuleID parameter to specify data that UpdateModule must include into AJSONObject before it sends the new information to the EMS server:
AModuleNameis the name of the module.AProtocolis the protocol of the module.AProtocolPropsare the protocol properties of the module.
Exceptions
| Exception | Message | Description |
|---|---|---|
|
MasterSecret required |
Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string. | |
|
Module ID required |
The specified module ID is an empty string. | |
|
Session token required |
Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string. |
See Also
- REST.Backend.EMSApi.TEMSClientAPI.RegisterModule
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveModule
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveModulesFields
- REST.Backend.EMSApi.TEMSClientAPI.QueryModuleName
- REST.Backend.EMSApi.TEMSClientAPI.QueryModules
- REST.Backend.EMSApi.TEMSClientAPI.UnregisterModule