Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lai, Weijian <laiweijian4@huawei.com> Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
23 KiB
Obtaining Sample Search Condition
Function
This API is used to obtain sample search condition.
URI
GET /v2/{project_id}/datasets/{dataset_id}/data-annotations/search-condition
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dataset_id |
Yes |
String |
Dataset ID. |
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
labelers |
Array of strings |
List of labeling team members. |
labels |
Array of Label objects |
Label list. |
metadata |
Map<String,Array<String>> |
Attribute key-value pair of a dataset. |
Parameter |
Type |
Description |
---|---|---|
attributes |
Array of LabelAttribute objects |
Multi-dimensional attribute of a label. For example, if the label is music, attributes such as style and artist may be included. |
name |
String |
Label name. |
property |
LabelProperty object |
Basic attribute key-value pair of a label, such as color and shortcut keys. |
type |
Integer |
Label type. The options are as follows:
|
Parameter |
Type |
Description |
---|---|---|
default_value |
String |
Default value of a label attribute. |
id |
String |
Label attribute ID. |
name |
String |
Label attribute name. |
type |
String |
Label attribute type. The options are as follows:
|
values |
Array of LabelAttributeValue objects |
List of label attribute values. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Label attribute value ID. |
value |
String |
Label attribute value. |
Parameter |
Type |
Description |
---|---|---|
@modelarts:color |
String |
Default attribute: Label color, which is a hexadecimal code of the color. By default, this parameter is left blank. Example: #FFFFF0. |
@modelarts:default_shape |
String |
Default attribute: Default shape of an object detection label (dedicated attribute). By default, this parameter is left blank. The options are as follows:
|
@modelarts:from_type |
String |
Default attribute: 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 |
String |
Default attribute: The new name of the label. |
@modelarts:shortcut |
String |
Default attribute: Label shortcut key. By default, this parameter is left blank. For example: D. |
@modelarts:to_type |
String |
Default attribute: 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. |
Example Requests
Obtaining Sample Search Condition
GET https://{endpoint}/v2/{project_id}/datasets/{dataset_id}/data-annotations/search-condition
Example Responses
Status code: 200
OK
{ "labels" : [ { "name" : "Cat", "type" : 0, "property" : { "@modelarts:color" : "#3399ff" } }, { "name" : "Rabbit", "type" : 0, "property" : { "@modelarts:color" : "#3399ff" } } ], "metadata" : { }, "labelers" : [ "human/test_123/test_123", "human/xxx@xxx.com", "human/xxx@xxx.com" ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.