This topic describes how to update the AES encryption key for a credential by using an API. After you update the key, the system re-encrypts all stored credential passwords with the new key.
API call description
If you set a password, you must be authenticated. For more information, see API hybrid encryption.
Request path
PUT /api/v1/security/credential/encrypt-secret-key
Request parameters
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| aes_key | string | Yes | dG***********Xk= | The new AES key, in Base64-encoded raw key bytes. |
Response
Parameter |
Type |
Description |
|---|---|---|
| successful | bool | Indicates whether the request was successful. |
| timestamp | time.Time | The timestamp when the server completed the request. |
| duration | int | The time taken by the server to process the request, in milliseconds. |
| status | int | The HTTP status code. |
| traceId | string | The trace ID of the request. |
| error | ApiError | The error information, which contains the following parameters:
|
Examples
Request example
PUT 10.10.10.1:2886/api/v1/security/credential/encrypt-secret-key
{
"aes_key": "dG***********Xk="
}
Response example
{
"successful": true,
"timestamp": "2025-10-14T15:21:01.277047628+08:00",
"duration": 500,
"status": 200,
"traceId": "e6f64ba7f54e7a55"
}
