REST.Backend.EMSApi.TEMSClientAPI.PutResource
Delphi
procedure PutResource(const AResource, AID: string;
const AJSON: TJSONObject; const AAddParameters: TProc = nil);
C++
void __fastcall PutResource(const System::UnicodeString AResource, const System::UnicodeString AID, System::Json::TJSONObject* const AJSON, const System::Sysutils::_di_TProc AAddParameters = System::Sysutils::_di_TProc());
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | REST.Backend.EMSApi.pas REST.Backend.EMSApi.hpp |
REST.Backend.EMSApi | TEMSClientAPI |
Description
Sends the specified data to replace the specified resource on the EMS server.
PutResource receives the following parameters:
AResource
is the path of the endpoint of the type of the target resource. For example, "users".AID
is the ID of the target resource. For example, ifAResource
is "users" andAID
is "me", the target endpoint is "users/me".AJSON
is a JSON object with the data that must replace the existing data of the target resource in the EMS Server.AAddParameters
(optional) is a procedure without parameters that you can use to update the request. For example, you can add parameters to the request.
Exceptions
Exception | Message | Description |
---|---|---|
MasterSecret required |
Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret 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. |