Skip to end of metadata
Go to start of metadata

Label API

The Label API allows you to add, modify and remove labels in your system. Furthermore you can label your assets or remove labels from the asset. The following methods are available:

 

Get all labels

Method

Method Name

Returns

getall

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

Output Value

Name

Description

Sample Output

label_id

ID of the label

1

label_text

Text of the label itself

pictures

label_path

Path of the label, each level is separated with a "/"

pictures/color

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Get one label

Method

Method Name

Returns

getlabel

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

label_idID of the labelStringyes108
or as a list 108,109

Output Value

Name

Description

Sample Output

label_id

ID of the label

1

label_text

Text of the label itself

pictures

label_path

Path of the label, each level is separated with a "/"

pictures/color

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Add or update a label

Method

Method Name

Returns

setlabel

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

label_idID of the label (Provide an label ID if you want to update the label, else DON'T pass any value and the label will be added!)Stringno108
label_textText of the labelStringyespictures
label_parentThe parent label to nest the labelStringno107

Output Value

Name

Description

Sample Output

responsecode

A response number

0 = success

message

Status of operation

Label updated successfully

label_id

The label id. If you create a new label, the ID of the label, else the ID you're passing

1110008

REST: Sample Request

Sample Output

Remove a label

Method

Method Name

Returns

remove

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

label_idID(s) of the label to removeStringyes108
or as a list 108,109 

Output Value

Name

Description

Sample Output

responsecode

A response number

0 = success

message

Status of operation

Label(s) removed

REST: Sample Request

Sample Output

Add labels to an asset

Method

Method Name

Returns

setassetlabel

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

label_idID of the labelStringyes

108
or a list of IDs 108,109

asset_idID of the assetStringyes129844
asset_typeType of assetStringyesimg = images
vid = videos
aud = audios
doc = documents
folder = folders
collection = collection 
appendIf set to true it will append to existing labels, else set to false to overwriteStringnotrue (default)
false (all labels will be replaced with these ones) 

Output Value

Name

Description

Sample Output

responsecode

A response number

0 = success

message

Status of operation

Label(s) added

REST: Sample Request

Sample Output

Remove labels from an asset

Method

Method Name

Returns

removeassetlabel

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

label_idID(s) of the label to removeStringyes108
or as a list 108,109 
asset_idID of the assetStringyes1989

Output Value

Name

Description

Sample Output

responsecode

A response number

0 = success

message

Status of operation

Label(s) removed

REST: Sample Request

Sample Output

Get label of asset

Returns all labels of an asset.

Method

Method Name

Returns

getlabelofasset

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

asset_idID of the assetStringyes108
or as a list 108,109
asset_typeType of asset to queryStringyesimg = images
doc = documents
vid = videos
aud = audios
folder = folders
collection = collections 

Output Value

Name

Description

Sample Output

label_id

ID of the label

1

label_text

Text of the label itself

pictures

label_path

Path of the label, each level is separated with a "/"

pictures/color

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Get asset of label

Returns all assets with the given label_id.

Method

Method Name

Returns

getassetoflabel

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

label_idLabel IDStringyes108
label_typeFrom which label type to return recordsStringnoassets (default)
folders
collections 

Output Value

Name

Description

Sample Output

Columns

Different columns

see sample output

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Search for label(s)

Availability

This API method is available in release 1.6.2 and above

Method

Method Name

Returns

searchlabel

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

searchforLabel(s) to search forStringyespictures
overridemax

The search limits the # of records returned to 1000. If you wish to return all records you
can use this parameter to override the limit e.g. &overridemax=1. Doing so may use up server resources
so caution should be used with large record sets. 

Numericno1

Output Value

Name

Description

Sample Output

label_id

ID of the label

1

label_text

Text of the label itself

pictures

label_path

Path of the label, each level is separated with a "/"

pictures/color

REST: Sample Request

Sample Output

  • No labels