Secrets Manager API
The following explains how to use the KakaoCloud Secrets Manager service API.
Key information
IAM role management
The Secrets Manager service follows KakaoCloud’s IAM role-based access control (RBAC). A user token is used to check roles within a project, and API permissions are granted based on the assigned role.
Project roles
Role | Project Admin | Project Member | Project Reader | Secrets Manager Manager | Secrets Manager Viewer |
---|---|---|---|---|---|
Retrieve secret value | ✓ | ✓ | ✓ |
Secrets
The following APIs are available for secrets.
Retrieve secret
You can retrieve the value of a secret. If no version is specified, the value of the default version is returned.
API call
Method | Request URL |
---|---|
GET | https://secrets-manager.kr-central-2.kakaocloud.com/api/v1/secrets/{secret_id}/versions/value?version= |
Request headers
Header | Type | Required | Description |
---|---|---|---|
X-Auth-Token | string | Required | Enter the user authentication token. |
Content-Type | string | Required | application/json |
Path parameters
Parameter | Type | Required | Description |
---|---|---|---|
secret_id | string | Required | Unique ID of the secret |
Query parameters
Parameter | Type | Required | Description |
---|---|---|---|
version | integer | Optional | Secret version to retrieve |
Request body
Retrieve secret request body
This API does not use a request body.
Request
Retrieve secret request example
curl --location --request GET 'https://secrets-manager.kr-central-2.kakaocloud.com/api/v1/secrets/{secret_id}/versions/value' \
--header 'X-Auth-Token: {x-auth-token}' --header 'Content-Type: application/json'
Response body
Retrieve secret response body
{
"code": "string",
"message": "string",
"data": "string",
"requestId": "string"
}
Response elements
Field | Type | Description |
---|---|---|
code | string | Response code of the API request |
message | string | Response message of the API request |
data | string | The data stored in the secret |
requestId | string | Identifier of the API request |
Status codes
Code | Response | Description |
---|---|---|
200 | OK | Success |
400 | Bad Request | Invalid request - Review error message and correct the request |
403 | Forbidden | Authentication succeeded but the user does not have permission for the requested resource or action - Verify if the request was made with the correct account or project permissions |
404 | Not Found | Tag does not exist - Check tag_id information |
500 | Internal Server Error | Internal server error - Try again later |