Application Programming Interface Guide > REST API > TDV Server REST APIs > Security
 
Security
The following Security operations can be performed:
GET /backup_encryption_settings
GET /domains
GET /domains/{domain}/groups
GET /domains/{domain}/domain_users
GET /generateUUID
POST /import_encryption_settings
GET /systemEncryption
PUT /systemEncryption
GET /backup_encryption_settings
This API is used to backup the encryption settings to a password protected file for server recovery in case of emergency.
Parameters:
Name
Description
Parameter Type
Data Type
encryptionPassword
Encryption Password
query
string
Example to backup the encryption settings
curl -X GET -u admin:admin "http://localhost:9400/rest/security/v1/backup_encryption_settings?encryptionPassword=testPassword" -o backup_encryption_settings.txt
GET /domains
This API is used to get all domains.
Parameters:
None
Example to get all domains
curl -X GET -u admin:admin "http://localhost:9400/rest/security/v1/domains"
GET /domains/{domain}/groups
This API is used to get all domain groups.
Parameters:
Name
Description
Parameter Type
Data Type
domain
The name of the domain
path
string
Example to get all “composite” domain groups
curl -X GET -u admin:admin "http://localhost:9400/rest/security/v1/domains/composite/groups"
GET /domains/{domain}/domain_users
This API is used to get all domain users.
Parameters:
Name
Description
Parameter Type
Data Type
domain
The name of the domain
path
string
Example to get all “composite” domain users
curl -X GET -u admin:admin "http://localhost:9400/rest/security/v1/domains/composite/users"
GET /generateUUID
This API is used to get the randomly generated system UUID.
Parameters:
None
Example to get the system randomly generated UUID.
curl -X GET -u admin:admin "http://localhost:9400/rest/security/v1/generateUUID"
POST /import_encryption_settings
This API is used to restore the encryption settings from the backup file. You must know the password that was used to protect the backup file.
Parameters:
Name
Description
Parameter Type
Data Type
file
Name of the file to be imported
query
object
encryptionPassword
Encryption Password
query
string
Example to restore the encryption settings
curl -u "admin:admin" -i -F "encryptionPassword=testPassword" -F "file=@backup_encryption_settings.txt" -X POST "http://localhost:9400/rest/security/v1/import_encryption_settings"
GET /systemEncryption
This API is used to get the system encryption settings.
Parameters:
None
Example to get the system encryption settings.
curl -X GET -u admin:admin "http://localhost:9400/rest/security/v1/systemEncryption"
PUT /systemEncryption
This API is used to update the system encryption settings. Can take a long time in large database to re-encrypt data.
Parameters:
Name
Description
Parameter Type
Data Type
body
Encryption settings (algorithm, password, uuid, key size
body
Model schema
Request Body
Example Value - Schema
{
“algorithm”: "string",
“password”: “string”,
“uuid”: “string”,
“keySize”: “string”
]
Example to update the system encryption settings
curl -X PUT -u admin:admin "http://localhost:9400/rest/security/v1/systemEncryption" -H "Content-Type:application/json" -d "{\"password\":\"MyTestEncryptionPassword\",\"uuid\":\"0b352e1e-ab56-4271-a813-31183df63788\"}"