Method: Edit Object
Description
Edit an existing Object.
A user can update (create or delete) objects in a Vault, if the following conditions are met:
The user has been assigned Write permission in the Vault by the Data Custodian (a user with the Admin capability) of the Vault.
URL Syntax
/api/{version}/object/:object-id
HTTP Method
PUT
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 |
JSON-encoded |
String |
1) |
Legacy method |
object-id |
Object-ID |
URL-parameter |
Integer |
Yes |
|
templateid |
Template-ID |
JSON-encoded |
String |
||
groupid |
Vault-ID |
JSON-encoded |
String |
||
parentid |
Parent-ID |
JSON-encoded |
String |
||
objectname |
Name of Object |
JSON-encoded |
String |
||
host |
Name of host (from template) |
JSON-encoded |
String |
Depends on template being used |
|
username |
Username (from template) |
JSON-encoded |
String |
Depends on template being used |
|
info |
Additional unencrypted info (from template) |
JSON-encoded |
String |
Depends on template being used |
|
password |
Password (from template) |
JSON-encoded |
String |
Depends on template being used |
|
cryptedinfo |
Additional encrypted info (from template) |
JSON-encoded |
String |
Depends on template being used |
*) One of the methods (HTTP Header or JSON-encoded) is required.
Response Attributes
Attribute |
Description |
Type |
---|---|---|
CALLINFO.errorcodes |
Number of errors |
Integer |
CALLINFO.errors |
Number of errors |
Integer |
CALLINFO.general |
Information |
Array |
CALLINFO.handler |
Handler used |
String |
CALLINFO.objectid |
Assigned Object-ID |
Integer |
CALLINFO.status |
SUCCESS or FAIL |
String |
CALLINFO.message |
Any 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 |
Examples
Change the password and crypted information of Object-ID 492
Request
PUT /api/1.0/object/492
x-http-token: your_storedsafe_token
{
"password": "hugh-down-duel-cask-slam-rime-lack-trod-bub-teal-sofa-duel",
"cryptedinfo": "iLO password is 2DFY9oRJevz29THujCRd"
}
Response
HTTP/2 200
Content-type: application/json; charset=UTF-8
{
"CALLINFO": {
"errorcodes": 0,
"errors": 0,
"general": [
"BAD_POLICY"
],
"handler": "ObjectHandler",
"status": "SUCCESS",
"token": "rotated_storedsafe_token"
},
"DATA": {
"cryptedinfo": "iLO password is 2DFY9oRJevz29THujCRd",
"password": "hugh-down-duel-cask-slam-rime-lack-trod-bub-teal-sofa-duel",
"token": "your_storedsafe_token"
},
"HEADERS": {
"Accept": "*/*",
"Content-Length": "131",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "safe.domain.cc",
"User-Agent": "curl/7.64.1",
"X-Http-Token": "your_storedsafe_token"
},
"PARAMS": []
}