{question}
How do I modify a Workspace Group Name?
{question}
{answer}
In this article, we are going to discuss how to rename the workspace group using Management API. We need to follow the below steps to rename the workspace group,
Step 1: Creating Management API Key - Please check the KB - Creating Management API Key.
Step 2: Open the Management API docs page, choose "Workspace Groups" like below,
https://docs.singlestore.com/managed-service/en/reference/management-api/reference.html
Step 3: Choose the "Patch" section and Click on the lock,
After clicking the lock it opens up the Authorize page where you are authorizing to access the workspaces,
Value = Paste the saved API Key.
After clicking "Authorize", The box looks like the below and now you can close it (Don't click on logout, if you logout you have to do again authorize)
Step 4: Click on "Try it out" and input the "ID of the workspace group",
Example:
IMPORTANT NOTE: Be careful with the below step,
Step 5: Edit the Request body (Make sure to delete everything in the box),
Copy and paste the below in the Request body section,
{
"name": "staging"
}
The request body should just contain the name:
Verify and Click on Execute! It will change the workspace group name to staging
.
The above operation is via UI,
It's possible to perform the Management API Operation using curl as well.
Syntax:
curl -X PATCH "https://api.singlestore.com/v1/workspaceGroups/workspace_group_id" -H "accept: application/json" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d "{\"name\":\"new-workspace-group-name\"}"
- workspace_group_id -> Check the KB on How to Get Workspace Group ID.
-
$API_KEY: Generate as instructed initially and update the command with your API Key.
- new-workspace-group-name.
We have to provide the above 3 values.
Example Curl command:
curl -X PATCH "https://api.singlestore.com/v1/workspaceGroups/23e1c3ec-ea-44ed-b4-d83534d2d3" -H "accept: application/json" -H "Authorization: Bearer c2c9fb5b131167d5251a80d3701bff2cdb0a4d74229b8f3fc2d1aaff" -H "Content-Type: application/json" -d "{\"name\":\"staging\"}"
For further questions, please reach out to SingleStore Support, you can open a support ticket.
{answer}