Table of Contents
/Storage/SearchInVault
Allows the client to search for items in the vault. It is only possible to retrieve items that have been stored using the same account.
JSON
- Request
{ "type": Optional(Str(PType)), "clientId": Optional(Str(PClientId)), "masked": Optional(Bool(PMasked)), "Tags": { "name": Required(Str(PTagName)), "value": Required(Str(PTagValue)) }?[], "offset": Optional(Integer(POffset >= 0)), "maxCount": Optional(Integer(0 < PMaxCount <= 100)) }- Response (if successful)
{ "ResultSet": Optional( { "vaultId": Required(Str(PVaultId)), "type": Optional(Str(PType)), "clientId": Optional(Str(PClientId)), "created": Required(DateTime(PCreated)), "updated": Required(DateTime(PUpdated)), "Tags": { "name": Required(Str(PName)), "value": Required(Str(PValue)) }[] } []) }
XML
- Request
<SearchInVault xmlns="https://waher.se/Schema/BrokerAgent.xsd" type=(Optional(Str(PType))) clientId=(Optional(Str(PClientId))) masked=(Optional(Bool(PMasked))) offset=(Optional(Integer(POffset >= 0))) maxCount=(Optional(Integer(0 < PMaxCount <= 100)))> <Tags> <[ <Tag name=(Required(Str(PTagName))) value=(Required(Str(PTagValue))) />?[] ]> </Tags> </SearchInVault>- Response (if successful)
<VaultItems xmlns="https://waher.se/Schema/BrokerAgent.xsd"> <ResultSet> <[ <VaultItem xmlns="https://waher.se/Schema/BrokerAgent.xsd" vaultId=(Required(Str(PVaultId))) type=(Optional(Str(PType))) clientId=(Optional(Str(PClientId))) created=(Required(DateTime(PCreated))) updated=(Required(DateTime(PUpdated)))> <Tags> <[ <Tag name=(Required(Str(PName))) value=(Required(Str(PValue))) />[] ]> </Tags> </VaultItem>[] ]> </ResultSet> </VaultItems>
Input Parameters
| Parameter | Description |
|---|---|
PType |
An optional type string. Can be null. Returns items matching this type, if provided. |
PClientId |
An optional Client Identifier. Can be null. Returns items matching this identifier, if provided. |
PMasked |
If the masked information should be returned (true) or the full information (false). |
PTagName |
The name of the information tag. Only items containing this tag will be returned. |
PTagValue |
The value of the information tag. Only items containing the named tag, with either the value or the masked value matching this value will be returned. |
POffset |
Ignore the first POffset number of items found. |
PMaxCount |
Maximum number of items to return. |
Response Parameters
| Parameter | Description |
|---|---|
PCreated |
When the vault item was first created. |
PUpdated |
When the vault item was last updated. |
PType |
An optional type string. Client can define type strings to separate different types of information into different items. |
PClientId |
An optional Client Identifier used by the agent to separate sensitive information between clients it serves. |
PVaultId |
The identifier of the vault item. |
PName |
The name of the information tag. |
PValue |
The value or masked value of the information tag, depending on PMasked. |
Note: If requesting masked information, but no masked value has been stored, the full value will be returned instead for the corresponding tags.
Javascript Library
Use the following asynchronous method in the Javascript Library, to call this resource.
var Response = await AgentAPI.Storage.SearchInVault(Type,ClientId,Masked,Tags,Offset,MaxCount);
Note The Tags argument is a normal JSON dictionary, not an array. Tags in this dictionary are instead enumerated and converted to the format expected by the web service.