- Print
- PDF
Manage Static Secret Templates
- Print
- PDF
1. Create Static Secret Template
This POST method creates a static secret template.
Note: To execute this API, the user should have permission assigned (through policy) with action as sm.secrettemplate.create.
POST | {{url}}/api/v1/secretmanager/secret-templates/static |
Request Example
curl -X POST '{{url}}/api/v1/secretmanager/secret-templates/static'
-H 'Authorization: Bearer <token>' -H 'content-type: application/json'
-d
'{
"secretType": "AWSServiceSecretTes",
"description": "description",
"rotationInterval": 30,
"parameters": [
{
"name": "url",
"description": "DB Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "username",
"description": "DB Username",
"mask": true,
"required": false,
"type": "multiLine"
},
{
"name": "password",
"description": "DB Password",
"mask": "true",
"required": "true",
"type": "password"
},
{
"name": "test file",
"description": "test file upload",
"mask": "false",
"required": "true",
"type": "fileUpload"
}
],
"passwordPolicyId": "81910feb-92d3-4583-b9a9-dd3476381a6b"
}'
Response Example
Status: 201 Created |
{
"id": "57c29443-7677-48e5-aedf-19731d176070",
"secretType": "AWSServiceSecretTes",
"description": "description",
"rotationInterval": 30,
"parameters": [
{
"name": "url",
"description": "DB Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "username",
"description": "DB Username",
"mask": true,
"required": false,
"type": "multiLine"
},
{
"name": "password",
"description": "DB Password",
"mask": true,
"required": true,
"type": "password"
},
{
"name": "test file",
"description": "test file upload",
"mask": "false",
"required": "true",
"type": "fileUpload"
}
],
"passwordPolicyId": "81910feb-92d3-4583-b9a9-dd3476381a6b"
}
2. Update a Static Secret Template
This PATCH method updates the static secret template details for the specified <static_template_id>.
Note: To execute this API, the user should have permission assigned (through policy) with action as sm.secrettemplate.update.
PATCH | {{url}}/api/v1/secretmanager/secret-templates/static/<static_template_id > |
Request Example
curl -X PATCH '{{url}}/api/v1/secretmanager/secret-templates/static/<template_id>'
-H 'Authorization: Bearer <token>' -H 'content-type: application/json'
-d
'{
"secretType": "AWSServiceSecretTes",
"description": "description",
"rotationInterval": 30,
"parameters": [
{
"name": "url",
"description": "DB Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "username",
"description": "DB Username",
"mask": true,
"required": false,
"type": "multiLine"
},
{
"name": "password",
"description": "DB Password",
"mask": "true",
"required": "true",
"type": "password"
},
{
"name": "test file",
"description": "test file upload",
"mask": "false",
"required": "true",
"type": "fileUpload"
}
{
"name": "OTP Seed",
"description": "OTP seed to generate OTP for authentication",
"mask": "true",
"required": "true",
"type": "otpSeed"
}
],
"passwordPolicyId": "81910feb-92d3-4583-b9a9-dd3476381a6b"
}'
Response Example
Status: 204 No content |
3. Delete a Static Secret Template
This DELETE method deletes a static secret template for a given template ID.
Note: To execute this API, the user should have permission assigned (through policy) with action as sm.secrettemplate.delete.
DELETE | {{url}}/api/v1/secretmanager/secret-templates/static/<id> |
curl -X DELETE '{{url}}/api/v1/secretmanager/secret-templates/static/<id>' -H 'Authorization: Bearer <token>'
Response Example
Status: 204 No content |
4. Get Static Secret Templates
This GET method returns the details of all static secret templates.
Note: To execute this API, the user should have permission assigned (through policy) with action as sm.secrettemplate.list.
GET | {{url}}/api/v1/secretmanager/secret-templates/static |
Request Parameters
The request parameters used in this method are shown in the following table:
Parameter | Description | Data Type | Required |
filter | Filter the list of static templates based on the name of a template. The supported operators are 'eq', 'sw' and 'co'. An example format is given here: name eq TestSecretTemplate | String | Optional |
pageToken | Autogenerated token for next page of records in case the results are more than one page. Append this token in requested API URL to access the next set of pages. | String | Optional |
Request Example
curl -X GET '{{url}}/api/v1/secretmanager/secret-templates/static' -H 'Authorization: Bearer <token>'
Response Example
Status: 200 Ok |
{
"result": [
{
"id": "67a0ab76-7e50-4578-a1f2-fa0181a712f9",
"secretType": "GenericWebApp",
"description": "Generic Web Application",
"rotationInterval": 30,
"parameters": [
{
"name": "URL",
"description": "URL for the Web Application",
"mask": false,
"required": false,
"type": "singleLine"
},
{
"name": "Username",
"description": "Username for Web Application",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Password",
"description": "Password for Web Application",
"mask": true,
"required": true,
"type": "password"
}
],
"passwordPolicyId": "70c543eb-9b17-4831-87d6-d962cd9fe623"
},
{
"id": "6e1ce6ab-922a-4411-a416-5f465aa68d40",
"secretType": "MSSQLDB",
"description": "Microsoft SQLServer Database Connection Credentials",
"rotationInterval": 30,
"parameters": [
{
"name": "Server",
"description": "DB ServerName/Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Database",
"description": "Database name",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Username",
"description": "DB username",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Password",
"description": "DB Password",
"mask": true,
"required": true,
"type": "password"
}
],
"passwordPolicyId": "b9fb1601-1836-4a84-a831-2e1e8d4eb3e7"
},
{
"id": "813e7141-fcc9-4a40-99f7-5a866033b5dd",
"secretType": "Generic Note",
"description": "Generic freetext Note",
"rotationInterval": 0,
"parameters": [
{
"name": "Note",
"description": "Generic freetext Note",
"mask": false,
"required": false,
"type": "multiLine"
}
],
"passwordPolicyId": null
},
{
"id": "bc3f1617-9f8d-49e2-bdaf-1d73731504ea",
"secretType": "OracleDB",
"description": "Oracle Database Connection Credentials",
"rotationInterval": 30,
"parameters": [
{
"name": "Host",
"description": "DB Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Port",
"description": "DB Post number",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Servicename",
"description": "DB Service Name",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Username",
"description": "DB username",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Password",
"description": "DB Password",
"mask": true,
"required": true,
"type": "password"
}
],
"passwordPolicyId": "b9fb1601-1836-4a84-a831-2e1e8d4eb3e7"
},
{
"id": "ca95b8da-57e2-402c-9f4b-3ee99f7d1501",
"secretType": "AWS Console",
"description": "AWS Console Connection Credentials",
"rotationInterval": 30,
"parameters": [
{
"name": "Account_Alias",
"description": "AWS Account Alias or Account ID",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "URL",
"description": "URL of AWS Console",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Username",
"description": "AWS account Username",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Password",
"description": "AWS account Password",
"mask": true,
"required": true,
"type": "password"
}
],
"passwordPolicyId": "70c543eb-9b17-4831-87d6-d962cd9fe623"
},
{
"id": "fb418c89-23c1-46fa-8b87-ff241f38260e",
"secretType": "MySQLDB",
"description": "MySQL Database Connection Credentials",
"rotationInterval": 30,
"parameters": [
{
"name": "Server",
"description": "DB ServerName/Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Database",
"description": "Database name",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Username",
"description": "DB username",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "Password",
"description": "DB Password",
"mask": true,
"required": true,
"type": "password"
}
],
"passwordPolicyId": "b9fb1601-1836-4a84-a831-2e1e8d4eb3e7"
}
],
"pagination": {
"next": "",
"prev": ""
}
}
5. Get a Static Secret Template
This GET method returns secret static template details of a specified <secret_template_id >.
Note: To execute this API, the user should have permission assigned (through policy) with action as sm.secrettemplate.list.
GET | {{url}}/api/v1/secretmanager/secret-templates/static/<secret_template_id> |
curl -X GET '{{url}}/api/v1/secretmanager/secret-templates/static/<secret_template_id>' -H 'Authorization: Bearer <token>'
Response Example
Status: 200 Ok |
{
"id": "57c29443-7677-48e5-aedf-19731d176070",
"secretType": "AWSServiceSecretTes",
"description": "description",
"rotationInterval": 30,
"parameters": [
{
"name": "url",
"description": "DB Hostname",
"mask": false,
"required": true,
"type": "singleLine"
},
{
"name": "username",
"description": "DB Username",
"mask": true,
"required": false,
"type": "multiLine"
},
{
"name": "password",
"description": "DB Password",
"mask": true,
"required": true,
"type": "password"
}
],
"passwordPolicyId": "81910feb-92d3-4583-b9a9-dd3476381a6b"
}