Method: Retrieve Object
Description
Retrieve all open (not encrypted) information regarding an object, optionally retrieve all children objects. Use the decrypt parameter to request decryption of encrypted fields in the object.
Note
Requesting decryption of encrypted fields is mutually exclusive with requesting information on all children objects.
URL Syntax
/api/{version}/object/:object-id
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 |
object-id |
Object ID |
URL-parameter |
Integer |
Yes |
|
decrypt |
Decrypt fields |
URL-parameter |
Boolean |
No |
Mutually exclusive with “children” |
children |
Also list childrens |
URL-parameter |
Boolean |
No |
Mutually exclusive with “decrypt” |
filedata |
Download content |
URL-parameter |
Boolean |
No |
Download any file content |
Note
1) One of the methods (HTTP Header or URL-parameter) is required.
Response Attributes
Attribute |
Description |
Type |
---|---|---|
BREADCRUMB |
Breadcrumb |
Array |
BREADCRUMB.icon |
Icon used |
String |
BREADCRUMB.objectid |
Object-ID |
String |
BREADCRUMB.objectname |
Object name |
String |
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 |
OBJECT |
OBJECT entry |
Array |
OBJECT.id |
Object-ID |
String |
OBJECT.parentid |
Parent-ID |
String |
OBJECT.templateid |
Template-ID |
String |
OBJECT.groupid |
Vault-ID |
String |
OBJECT.status |
Status (Active, Follows policy) |
String |
OBJECT.objectname |
Name of object |
String |
OBJECT.filename |
Filename (if a file) |
String |
OBJECT.children |
Any children |
String |
OBJECT.notes |
Encrypted notes |
String |
OBJECT.tags |
Tags associated with the object |
String |
OBJECT.alarmed |
Should an alarm sound if object is decrypted? |
String |
OBJECT.public |
Public data (Depends on Template used, see supplied TEMPLATES) |
Object |
OBJECT.crypted |
Decrypted data (If decrypt is True) Depends on Template |
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 |
PARAMS |
PARAMS (empty) |
Array |
Examples
Retrieve all open (non-encrypted) information about Object-ID 489
Request
GET /api/1.0/object/489
x-http-token: your_storedsafe_token
Response
HTTP/2 200
Content-type: application/json; charset=UTF-8
{
"BREADCRUMB": [
{
"icon": "ico_server",
"objectid": "787",
"objectname": "aa"
}
],
"CALLINFO": {
"errorcodes": 0,
"errors": 0,
"general": [],
"handler": "ObjectHandler",
"status": "SUCCESS",
"token": "rotated_storedsafe_token"
},
"DATA": {
"token": "your_storedsafe_token"
},
"HEADERS": {
"Accept": "*/*",
"Host": "safe.domain.cc",
"User-Agent": "curl/7.64.1",
"X-Http-Token": "your_storedsafe_token"
},
"OBJECT": [
{
"id": "489",
"parentid": "0",
"templateid": "8",
"groupid": "179",
"status": "128",
"objectname": "Disaster Recovery Instructions",
"filename": "",
"children": "0",
"notes": false,
"tags": "",
"alarmed": false,
"public": {
"name": "Disaster Recovery Instructions"
}
}
],
"PARAMS": [],
"TEMPLATES": [
{
"id": "8",
"info": {
"active": true,
"ed": true,
"ico": "ico_note",
"id": "8",
"jp": true,
"name": "Note",
"wb": false
},
"structure": [
{
"alarm": false,
"cc": false,
"encrypted": false,
"fieldname": "name",
"nc": false,
"opt": false,
"policy": false,
"show": true,
"translation": "Name",
"type": "text"
},
.
.
]
}
]
}
Retrieve all information about Object-ID 489 and request decryption of all encrypted fields.
Request
GET /api/1.0/object/489?decrypt=true
x-http-token: your_storedsafe_token
Response
{
"BREADCRUMB": [
{
"icon": "ico_server",
"objectid": "787",
"objectname": "aa"
}
],
"CALLINFO": {
"errorcodes": 0,
"errors": 0,
"general": [],
"handler": "ObjectHandler",
"status": "SUCCESS",
"token": "rotated_storedsafe_token"
},
"DATA": {
"decrypt": "true",
"token": "your_storedsafe_token"
},
"HEADERS": {
"Accept": "*/*",
"Host": "safe.domain.cc",
"User-Agent": "curl/7.64.1",
"X-Http-Token": "your_storedsafe_token"
},
"OBJECT": [
{
"id": "489",
"parentid": "0",
"templateid": "8",
"groupid": "179",
"status": "128",
"objectname": "Disaster Recovery Instructions",
"filename": "",
"children": "0",
"notes": false,
"tags": "",
"alarmed": false,
"public": {
"name": "Disaster Recovery Instructions"
},
"crypted": {
"note": "Are located in the right drawer, just inside the DC"
}
}
],
"PARAMS": [],
"TEMPLATES": [
{
"id": "8",
"info": {
"active": true,
"ed": true,
"ico": "ico_note",
"id": "8",
"jp": true,
"name": "Note",
"wb": false
},
"structure": [
{
"alarm": false,
"cc": false,
"encrypted": false,
"fieldname": "name",
"nc": false,
"opt": false,
"policy": false,
"show": true,
"translation": "Name",
"type": "text"
},
.
.
]
}
]
}