Modifying a Dataset¶
Function¶
Modify basic information about a dataset, such as name, description, version, and labels.
Debugging¶
You can debug this API in which supports automatic authentication. API Explorer can automatically generate SDK code examples and provide the SDK code example debugging.
URI¶
PUT /v2/{project_id}/datasets/{dataset_id}
Parameter | Mandatory | Type | Description |
---|---|---|---|
dataset_id | Yes | String | Dataset ID |
project_id | Yes | String | Project ID. For details, see Obtaining a Project ID and Name. |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
add_labels | No | Array of Label objects | List of added labels |
current_version_id | No | String | Current version ID of a dataset |
dataset_name | No | String | Dataset name |
delete_labels | No | Array of Label objects | List of labels to be deleted |
description | No | String | Dataset description. The value contains 0 to 256 characters. Special characters |
update_labels | No | Array of Label objects | List of labels to be updated |
Parameter | Mandatory | Type | Description |
---|---|---|---|
attributes | No | Array of LabelAttribute objects | Multi-dimensional attribute of a label. For example, if the label is music, attributes can be genre or artist. |
name | No | String | Label name |
property | No | LabelProperty object | Basic attribute key-value pair of a label, such as color and shortcut keys. |
type | No | Integer | Label type. Options:
|
Parameter | Mandatory | Type | Description |
---|---|---|---|
default_value | No | String | Default value of a label attribute |
id | No | String | Label attribute ID, which can be obtained in the label list. |
name | No | String | Label attribute name, which can contain a maximum of 64 characters. Special characters |
type | No | String | Label attribute type. Options:
|
values | No | Array of LabelAttributeValue objects | List of label attribute values |
Parameter | Mandatory | Type | Description |
---|---|---|---|
id | No | String | Label attribute value ID |
value | No | String | Label attribute value |
Parameter | Mandatory | Type | Description |
---|---|---|---|
@modelarts:color | No | String | Label color, which is a hexadecimal code of the color. The default value is left blank. For example, #FFFFF0. |
@modelarts:default_shape | No | String | Default shape of an object detection label (dedicated attribute). By default, this parameter is left blank. Options:
|
@modelarts:from_type | No | String | Type of the head entity in the triplet relationship label. This attribute must be specified when a relationship label is created. This parameter is used only for the text triplet dataset. |
@modelarts:rename_to | No | String | The new name of the label |
@modelarts:shortcut | No | String | Label shortcut key, for example, D. By default, this parameter is left blank. |
@modelarts:to_type | No | String | Type of the tail entity in the triplet relationship label. This attribute must be specified when a relationship label is created. This parameter is used only for the text triplet dataset. |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
dataset_id | String | Dataset ID |
Request Example¶
Run the following command to update a dataset:
{
"description" : "just a test",
"add_labels" : [ {
"name" : "Ants",
"type" : 0,
"property" : {
"@modelarts:color" : "#3399ff"
}
} ]
}
Response Example¶
Status code: 200
OK
{
"dataset_id" : "gfghHSokody6AJigS5A"
}
Status Code¶
Status Code | Description |
---|---|
200 | OK |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Error Code¶
For details, see Error Codes.