API v2: UAG - Secret Management¶
Note
Secrets are encrypted data items stored in collections within the Password Vault.
Secret types supported:
login - Username/password credentials
sshkey - SSH private/public key pairs
note - Secure text notes
apikey - API tokens and keys
certificate - X.509 certificates with private keys
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Unique secret identifier. |
|
|
string |
yes |
Secret name. Unique within collection (case-insensitive). |
|
string |
yes |
Parent collection identifier. |
|
string |
Read-only. Expensive to use. User ID of the personal vault owner. |
|
|
string |
Read-only. Hidden. Expensive to use. Collection name. |
|
|
string |
yes |
Immutable. Secret type. One of: |
|
string |
Not encrypted secret description. |
|
|
string |
If |
Username for authentication. |
|
string |
If |
Domain for the credential. |
|
string |
If |
X.509 certificate. |
|
string |
Read-only. Expensive to use. Public key SHA256 fingerprint from certificate. |
|
|
string |
Protected. Encrypted secret value (password, private key, etc). |
|
|
string |
If |
Protected. Passphrase to decrypt private key. |
|
boolean |
Read-only. Expensive to use. Whether secret value is set. |
|
|
string |
Read-only. Expensive to use. SSH public key from private key. |
|
|
string |
Read-only. Expensive to use. SSH key SHA256 fingerprint. |
|
|
string |
Read-only. Expensive to use. Access policy level. |
|
|
string |
Read-only. Expensive to use. Checkout mode (simple, exclusive). |
|
|
string |
Read-only. Expensive to use. Current user’s checkout ID if checked out. |
|
|
datetime |
Read-only. Creation timestamp. |
|
|
datetime |
Read-only. Modification timestamp. |
|
|
boolean |
Read-only. Soft deletion flag. |
Retrieve Available Attributes of the SecretModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/secret
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/objspec/secret'
List Secrets¶
Retrieve a list of secrets accessible to the user.
Request
Method |
|
Path |
|
GET /api/v2/secret
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
https://10.0.0.1/api/v2/secret
Response
{
"result": "success",
"secret": [
{
"id": "3260606130216239105",
"name": "secret for: root-fudo-PV",
"collection_id": "3260606130216239105",
"type": "login",
"login": "root",
"has_secret": true,
"access_policy": "view_on_request",
"checkout_mode": "simple",
"created_at": "2026-04-17 06:34:37.912715-07",
"modified_at": "2026-04-17 06:34:37.91632-07"
},
{
"id": "3260606130216239106",
"name": "secret for: user01-macOS-PV",
"collection_id": "3260606130216239105",
"type": "login",
"login": "user01",
"has_secret": true,
"access_policy": "view_on_request",
"checkout_mode": "simple",
"created_at": "2026-04-17 06:34:41.255687-07",
"modified_at": "2026-04-17 06:34:41.257013-07"
}
]
}
Get Secret by ID¶
Retrieve details of a specific secret.
Request
Method |
|
Path |
|
GET /api/v2/secret/<id>
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
https://10.0.0.1/api/v2/secret/3260606130216239105
Response
{
"result": "success",
"secret": {
"id": "3260606130216239105",
"name": "secret for: root-fudo-PV",
"collection_id": "3260606130216239105",
"type": "login",
"login": "root",
"has_secret": true,
"access_policy": "view_on_request",
"checkout_mode": "simple",
"created_at": "2026-04-17 06:34:37.912715-07",
"modified_at": "2026-04-17 06:34:37.91632-07"
}
}
Create Secret¶
Create a new secret in a collection.
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/secret
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
-d '{
"name": "Staging Database",
"collection_id": "3260606130216239119",
"type": "login",
"description": "Staging environment database",
"login": "staging_user",
"domain": "staging.example.com",
"secret": "StrongPassword123!"
}' \
'https://10.0.214.98/api/v2/secret'
Response
{
"result": "success",
"secret": {
"id": "3260606130216239109"
}
}
Update Secret¶
Update properties of an existing secret.
Request
Method |
|
Path |
|
Headers |
|
Body |
|
PATCH /api/v2/secret/<id>
Example Request
curl -s -k -X PATCH \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
-d '{
"description": "Updated description"
}' \
'https://10.0.214.98/api/v2/secret/3260606130216239109'
Response
{
"result": "success"
}
Delete Secret¶
Permanently delete a secret from the collection.
Request
Method |
|
Path |
|
DELETE /api/v2/secret/<id>
Example Request
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/secret/3260606130216239109'
Response
{
"result": "success"
}
Secret History¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
yes |
Read-only. Secret history identifier. |
|
string |
yes |
Secret identifier. |
|
boolean |
yes |
Read-only. Whether it’s the current version of secret. |
|
string |
yes |
Read-only. Secret password changer state. One of: |
|
datetime |
Read-only. Creation timestamp. |
|
|
datetime |
Read-only. Modification timestamp. |
|
|
boolean |
Read-only. |
Retrieve Available Attributes of the SecretHistoryModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/secret_history
Get Secret History¶
Retrieve history of all secrets accessible to the user.
Request
Method |
|
Path |
|
GET /api/v2/secret/history
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
https://10.0.0.1/api/v2/secret/history
Response
{
"result": "success",
"secret_history": [
{
"id": "3260606130216239105",
"secret_id": "3260606130216239105",
"current": true,
"state": "confirmed",
"created_at": "2026-04-17 06:34:37.915698-07",
"modified_at": "2026-04-17 06:34:37.915698-07"
},
{
"id": "3260606130216239106",
"secret_id": "3260606130216239106",
"current": true,
"state": "confirmed",
"created_at": "2026-04-17 06:34:41.256853-07",
"modified_at": "2026-04-17 06:34:41.256853-07"
}
]
}
Secret URI Management¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Unique secret URI identifier. |
|
|
string |
yes |
Immutable. Secret identifier. |
|
string |
Read-only. Hidden. Expensive to use. Secret name. |
|
|
string |
yes |
URL/connection string assigned to the secret. |
|
string |
Read-only. Hidden. Expensive to use. Collection identifier. |
|
|
string |
Read-only. Hidden. Host extracted from the provided uri. |
|
|
number |
Read-only. Hidden. Port extracted from the provided uri. |
|
|
string |
Read-only. Hidden. Expensive to use. |
|
|
string |
Read-only. Hidden. Expensive to use. |
|
|
string |
Read-only. Hidden. Expensive to use. Vault type (organization, personal). |
|
|
datetime |
Read-only. |
|
|
datetime |
Read-only. |
|
|
boolean |
Read-only. |
Retrieve Available Attributes of the SecretUriModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/secret_uri
List All Secret URIs¶
Retrieve all URIs associated with secrets.
Request
Method |
|
Path |
|
GET /api/v2/secret/uri
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
https://10.0.0.1/api/v2/secret/uri
Response
{
"result": "success",
"secret_uri": []
}
Get Secret URIs¶
Retrieve URIs associated with a specific secret.
Request
Method |
|
Path |
|
GET /api/v2/secret/<secret_id>/uri
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.0.1/api/v2/secret/3260606130216239110/uri'
Response
{
"result": "success",
"secret_uri": [
{
"id": "3260606130216239105",
"secret_id": "3260606130216239110",
"uri": "https://example.com/api",
"created_at": "2026-04-22 08:53:41.4058-07",
"modified_at": "2026-04-22 08:53:41.4058-07"
}
]
}
Add URI to Secret¶
Associate a URI with a secret.
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/secret/<secret_id>/uri
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
-d '{"uri": "https://example.com/api"}' \
'https://10.0.214.98/api/v2/secret/3260606130216239110/uri'
Response
{
"result": "success",
"secret_uri": {
"id": "3260606130216239105"
}
}
Update Secret URI¶
Update an existing URI associated with a secret.
Request
Method |
|
Path |
|
Headers |
|
Body |
|
PATCH /api/v2/secret/<secret_id>/uri/<id>
Example Request
curl -s -k -X PATCH \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
-d '{"uri": "https://new-api.example.com/v2"}' \
'https://10.0.214.98/api/v2/secret/3260606130216239110/uri/3260606130216239105'
Response
{
"result": "success"
}
Delete Secret URI¶
Remove a URI association from a secret.
Request
Method |
|
Path |
|
DELETE /api/v2/secret/<secret_id>/uri/<id>
Example Request
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/secret/3260606130216239110/uri/3260606130216239105'
Response
{
"result": "success"
}