Skip to main content

DeleteCategory

Permanently deletes a specified category.

Operation description

  • RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (requiring AliyunBailianDataFullAccess, which includes the sfm:DeleteCategory permission point) and join a workspace before they can call this operation. Alibaba Cloud accounts (primary accounts) can call this operation directly without authorization. We recommend that you call this operation by using the latest version of the Alibaba Cloud Model Studio SDK.
  • This operation is idempotent.
Rate limiting: This operation is subject to rate limiting when called frequently. Do not exceed 5 calls per second. If you are throttled, retry later.

Debug

You can directly run this operation in OpenAPI Explorer, saving you the trouble of calculating signatures. After the operation runs successfully, OpenAPI Explorer can automatically generate SDK code examples. Try it now

RAM authorization

The following table describes the authorization information of the operation. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this operation. Details are as follows:
  • Action: the specific permission point.
  • Access level: the access level of each operation. Valid values: write (Write), read (Read), and list (List).
  • Resource type: the resource types that support authorization for the operation. Details are as follows:
    • Required resource types are marked with a preceding asterisk (*).
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
sfm:DeleteCategorydelete
*All resources
*
    None
None

Request syntax

DELETE /{WorkspaceId}/datacenter/category/{CategoryId}/ HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
CategoryIdstringYes

The category ID, which is the CategoryId returned by the AddCategory operation. Open Collections and click Details for the target file dataset. Click the ID icon next to the category name, then click the copy icon to copy the category ID.

cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx
WorkspaceIdstringYes

The ID of the workspace to which the category belongs. For information about how to obtain the workspace ID, see How to use a workspace.

llm-3shx2gu255oqxxxx

Response elements

ElementTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

17204B98-xxxx-4F9A-8464-2446A84821CA
Dataobject

The business data field of the operation.

CategoryIdstring

The ID of the deleted category.

cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx
Statusstring

The status code returned by the operation.

200
Successboolean

Indicates whether the operation is called successfully:

  • true: The operation is successful.
  • false: The operation fails.
true
Messagestring

The error message.

workspace id is null or invalid.
Codestring

The error status code.

success

Examples

Success response JSON format
{
  "RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA",
  "Data": {
    "CategoryId": "cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx"
  },
  "Status": 200,
  "Success": true,
  "Message": "workspace id is null or invalid.",
  "Code": "success"
}

Error codes

Visit the Error Center to view more error codes.