Update a workspace¶
Change the name of an existing workspace.
PATCH https://moi.matrixorigin.cn/newmoi/workspaces/{id}
Before you call¶
First list workspaces to confirm the workspace to update. Prepare a personal access token and the workspace ID. You do not need to enter a workspace before calling this API.
Path parameter and request body¶
Replace $AI_STUDIO_API_KEY, $WORKSPACE_ID, and $WORKSPACE_NAME with actual values.
curl -X PATCH "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "'"$WORKSPACE_NAME"'"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
ID of the workspace to update. |
|
string |
Yes |
New workspace name. It cannot be empty. |
Successful response¶
On success, the API returns 200, which indicates that the name was saved.
{
"code": "OK",
"msg": "OK"
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
Error response¶
{
"code": "ErrParamInvalid",
"msg": "Invalid request parameters",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Human-readable error message. |
|
null |
|
Next steps¶
List workspaces to confirm that the name was updated.
Last updated on