post https://{serverid}.nexusrun.com/databases/{databaseid}/buckets//keys//rename
This API endpoint is used to rename a key within a specific bucket in the NexusRunDB database. It allows you to update the key's ID while keeping the value intact.
- The Master access key or any access keys with "read_write_key" permissions (or tokens generated for these access keys) have the ability to rename the ID of a key within a NexusRunDB database bucket.
- You need to provide the new key name in the request body. The new key name should be included as part of the request payload to specify the desired new ID for the key.
- If there is already a key with the same key ID existing in the bucket, attempting to rename a key to the same ID will result in a BadRequest (400) response. This indicates that the operation cannot be completed as it would lead to a conflict with an existing key. In such cases, you would need to choose a unique key ID for the renamed key to avoid the conflict.
- The maximum length for a key ID is 250 bytes, and the forward slash (/) character is not allowed in the key ID. When renaming a key in a NexusRunDB database bucket, make sure that the new key ID adheres to these specifications.
- Unicode characters are allowed in the new key ID.