/Storage/LoadPrivateXml

Allows the client to load previously saved private XML information from the server.

JSON

Request
{
	"localName":Required(Str(PLocalName)),
	"namespace":Required(Str(PNamespace))
}
Response (if successful)
{
	"created": Required(DateTime(PCreated)),
	"updated": Required(DateTime(PUpdated)),
	"Xml": Required(PXml)
}

XML

Request
<LoadPrivateXml xmlns="https://waher.se/Schema/BrokerAgent.xsd"
								localName=(Required(Str(PLocalName)))
								namespace=(Required(Str(PNamespace))) />
Response (if successful)
<PrivateXml xmlns="https://waher.se/Schema/BrokerAgent.xsd"
			created=(Required(DateTime(PCreated)))
			updated=(Required(DateTime(PUpdated)))>
	<[Required(Xml(PXml))]>
</PrivateXml>

Input Parameters

Parameter Description
PLocalName Local Name of XML to load.
PNamespace Namespace of XML to load.

Note: Only one record per namespace and local name (i.e. fully qualified name) is permitted, for each account. Saving private XML overwrites any previous contents for that fully qualified name.

Response Parameters

Parameter Description
PCreated When the information record was first created.
PUpdated When the information record was last updated.
PXml XML of information stored on the server, for the account.

Note Underlying communication protocol is XMPP, which encodes information using XML. When requesting information encoded as JSON, this XML is automatically transformed into JSON. When XML is transformed into JSON objects, the special names __name and __ns can be used to get information about what XML names and namespaces have been used. XML attributes are encoded as properties. Child elements are also encoded as properties (if only one child element occurs with the same name), or as vectors of objects (if more than one child element occurs with the same name).

Note also: If information has not been stored previously, an HTTP Not Found error is returned.

Javascript Library

Use the following asynchronous method in the Javascript Library, to call this resource.

var Response = await AgentAPI.Storage.LoadPrivateXml(LocalName,Namespace);
Test



Request Payload:

   

Response Payload: