Skip to main content

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

RoleProject AdminProject MemberProject ReaderSecrets Manager ManagerSecrets 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
MethodRequest URL
GEThttps://secrets-manager.kr-central-2.kakaocloud.com/api/v1/secrets/{secret_id}/versions/value?version=
Request headers
HeaderTypeRequiredDescription
X-Auth-Token   stringRequired   Enter the user authentication token.
Content-Type   stringRequired   application/json
Path parameters
ParameterTypeRequiredDescription
secret_id   stringRequired   Unique ID of the secret
Query parameters
ParameterTypeRequiredDescription
version   integerOptional   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
FieldTypeDescription
codestringResponse code of the API request
messagestringResponse message of the API request
datastringThe data stored in the secret
requestIdstringIdentifier of the API request
Status codes
CodeResponseDescription
200OKSuccess
400Bad RequestInvalid request
- Review error message and correct the request
403ForbiddenAuthentication 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
404Not FoundTag does not exist
- Check tag_id information
500Internal Server ErrorInternal server error
- Try again later