Method: List objects in a Vault
Description
Returns a list of all objects in a vault associated with the logged in user.
URL Syntax
/api/{version}/vault/:vaultid
HTTP Method
GET
Successful HTTP Response
200
Parameters
Parameter name |
Description |
Parameter type |
Type |
Mandatory |
Comment |
---|---|---|---|---|---|
X-Http-Token |
StoredSafe token |
HTTP Header |
String |
1) |
Preferred method |
token |
StoredSafe token |
URL-parameter |
String |
1) |
Legacy method |
vault-id |
Vault-id of the Vault |
URL-paramater |
Integer |
Yes |
Note
1) One of the methods is required.
Response Attributes
Attribute |
Description |
Type |
---|---|---|
VAULT |
Vault |
Array |
VAULT.id |
Vault-ID |
String |
VAULT.groupname |
Name of Vault |
String |
VAULT.policy |
Passphrase policy of Vault |
String |
VAULT.description |
Description of Vault |
String |
VAULT.status |
Users permission in Vault (bitmap) |
String |
VAULT.statustext |
Users permission in Vault (Descriptive: Read, Write or Admin) |
String |
OBJECTS |
OBJECT entry |
Array |
OBJECTS.id |
Object-ID |
String |
OBJECTS.parentid |
Parent-ID |
String |
OBJECTS.templateid |
Template-ID |
String |
OBJECTS.groupid |
Vault-ID |
String |
OBJECTS.status |
Status (Active, Follows policy) |
String |
OBJECTS.objectname |
Name of object |
String |
OBJECTS.filename |
Filename (if a file) |
String |
OBJECTS.children |
Any children |
String |
OBJECTS.notes |
Encrypted notes |
String |
OBJECTS.tags |
Tags associated with the object |
String |
OBJECTS.alarmed |
Should an alarm sound if object is decrypted? |
String |
OBJECTS.public |
Public data (Depends on Template used, see supplied TEMPLATES) |
Object |
TEMPLATES |
TEMPLATES (Glue) Used templates in the vault |
Array |
TEMPLATES.id |
Template-ID |
String |
TEMPLATES.info.id |
Template-ID |
String |
TEMPLATES.info.name |
Name of template |
String |
TEMPLATES.info.ico |
Icon used for template |
String |
TEMPLATES.info.active |
Active (True/False) |
Boolean |
TEMPLATES.info.wb |
Use workbench for edit? (Always use “ed” if false. |
Boolean |
TEMPLATES.info.ed |
Edit directly? (no subitems) |
Boolean |
TEMPLATES.info.jp |
Jump to parent on save? |
Boolean |
TEMPLATES.structure |
Template Structure |
Array |
TEMPLATES.structure.translation |
Descriptive text (english) |
String |
TEMPLATES.structure.type |
Type of element (text, textarea, text-passwdgen, file) |
String |
TEMPLATES.structure.encrypted |
Is field encrypted? |
Boolean |
TEMPLATES.structure.fieldname |
Identifier of field |
String |
TEMPLATES.structure.show |
Show field normally or only in workbench? |
Boolean |
TEMPLATES.structure.policy |
Should field honor Vaults password policy? |
Boolean |
TEMPLATES.structure.alarm |
Should alarm sound if object is decrypted? |
Boolean |
TEMPLATES.structure.opt |
Is this an optional field or is it required to be filled? |
Boolean |
TEMPLATES.structure.cc |
Needs to be changed to be considered unseen? |
Boolean |
TEMPLATES.structure.nc |
Encrypted fields needs to be clicked to be revealed? |
Boolean |
CALLINFO.errorcodes |
Number of errors |
Integer |
CALLINFO.errors |
Number of errors |
Integer |
CALLINFO.general |
Information |
Array |
CALLINFO.handler |
Handler used |
String |
CALLINFO.status |
SUCCESS or FAIL |
String |
CALLINFO.message |
Message from handler (if successful) |
String |
CALLINFO.token |
StoredSafe token to be used in subsequent calls |
String |
HEADERS |
HTTP Headers |
Object |
DATA |
Supplied data in API-call |
Object |
PARAMS |
PARAMS (empty) |
Array |
ERRORCODES |
Error code and text (Only present if errors) |
Object |
ERRORS |
Error code and text (Only present if errors) |
Array |
Examples
Obtain a list of all objects in a vault available to the logged in user.
Request
GET /api/1.0/vault/4
x-http-token: your_storedsafe_token
Response
HTTP/2 200
Content-type: application/json; charset=UTF-8
{
"CALLINFO": {
"errorcodes": 0,
"errors": 0,
"general": [],
"handler": "GroupHandler",
"status": "SUCCESS",
"token": "rotated_storedsafe_token"
},
"DATA": {
"token": "your_storedsafe_token"
},
"VAULT": [
{
"id": "4",
"groupname": "Vault number uno",
"policy": "7",
"description": "Descriptive text about the vault",
"status": "1",
"statustext": "Read"
}
],
"HEADERS": {
"Accept": "*/*",
"Host": "safe.domain.cc",
"User-Agent": "curl/7.64.1",
"X-Http-Token": "your_storedsafe_token"
},
"OBJECTS": [
{
"id": "6",
"parentid": "0",
"templateid": "1",
"groupid": "4",
"status": "128",
"objectname": "test-server2.example.com",
"filename": "",
"children": "0",
"notes": false,
"tags": "www",
"alarmed": false,
"public": {
"host": "test-server2.example.com",
"username": "Administrator",
"info": "Last changed from IP 1.2.3.4"
}
},
{
"id": "683",
"parentid": "0",
"templateid": "1001",
"groupid": "4",
"status": "1152",
"objectname": "Non alios suo modulo metire.",
"filename": "",
"children": "0",
"notes": false,
"tags": "",
"alarmed": false,
"public": {
"host": "Non alios suo modulo metire.",
"ip": "Non alios suo modulo metire.",
"username": "Non alios suo modulo metire.",
"info": "Non alios suo modulo metire."
}
},
.
.
],
"PARAMS": [],
"TEMPLATES": [
{
"id": "1",
"info": {
"active": true,
"ico": "ico_server",
"id": "1",
"name": "Server",
"wb": true
},
"structure": [
{
"alarm": false,
"cc": false,
"encrypted": false,
"fieldname": "host",
"nc": false,
"opt": false,
"policy": false,
"show": true,
"translation": "Host",
"type": "text"
},
{
"alarm": false,
"cc": false,
"encrypted": false,
"fieldname": "username",
"log": true,
"nc": false,
"opt": false,
"policy": false,
"show": true,
"translation": "Username",
"type": "text"
},
.
.
]
},
{
"id": "1001",
"info": {
"active": true,
"ico": "ico_server",
"id": "1001",
"name": "Server/IP",
"wb": true
},
"structure": [
{
"alarm": false,
"cc": false,
"encrypted": false,
"fieldname": "host",
"nc": false,
"opt": false,
"policy": false,
"show": true,
"translation": "Host",
"type": "text"
},
{
"alarm": false,
"cc": false,
"encrypted": false,
"fieldname": "ip",
"nc": false,
"opt": false,
"policy": false,
"show": true,
"translation": "IP",
"type": "text"
},
.
.
]
}
]
}