Table of Contents
/Legal/AuthorizeAccessToId
Allows the client to (pre-)authorize access to (or remove authorization to access) one of its Smart Contracts (or one of the Smart Contracts for which the client is part) to a remote party. When (if) the remote party requests access to the the Smart Contract, the broker will return it automatically, if already authorized. If not authorized, a petition to access the Smart Contract will be sent to the clients of the part of the contract for manual approval.
JSON
- Request
{ "contractId": Required(Str(PContractId)), "remoteId": Required(Str(PRemoteId)), "authorized": Required(Boolean(PAuthorized)) }
- Response (if successful)
{ }
XML
- Request
<AuthorizeAccessToContract xmlns="https://waher.se/Schema/BrokerAgent.xsd" contractId=(Required(Str(PContractId))) remoteId=(Required(Str(PRemoteId))) authorized=(Required(Boolean(PAuthorized)))/>
- Response (if successful)
<AckResponse xmlns="https://waher.se/Schema/BrokerAgent.xsd" />
Input Parameters
Parameter | Description |
---|---|
PContractIdId |
Identifier of the corresponding Smart Contract of the client, or for which the client is part. |
PRemoteId |
Identifier of the Legal Identity of the corresponding remote entity, or its Bare JID. |
PAuthorized |
If the remote entity is authorized access to the corresponding contract or not. |
Javascript Library
Use the following asynchronous method in the Javascript Library, to call this resource.
var Response = await AgentAPI.Legal.AuthorizeAccessToContract(ContractId, RemoteId, Authorized);