Table of Contents

Asset metadata

Alex Cota Updated by Alex Cota

Asset metadata is additional information (image, video, or text) that you can attach to a data row.

Below are some common operations the GraphQL API supports for Asset metadata.

Note: To see an example of a JSON file with asset information, see Asset information overlay.
Add text metadata

Run this query

mutation addAssetInfo {
createAssetMetadata(
data: {
dataRowId:"<DATAROW-ID>",
metaValue:"This is textual asset information.",
metaType: TEXT
}
) {
id
}
}
Add image metadata

Run this query

mutation addAssetInfo {
createAssetMetadata(
data: {
dataRowId:"<DATAROW-ID>",
metaValue:"https://firebasestorage.googleapis.com/v0/b/labelbox-193903.appspot.com/o/cjhk4p9dyf5va0702liitudpz%2Fd3ffab29-d6be-4d69-b006-89a828679d29%2Fleft_small-pen-test-site_1_1537524039648.jpg?alt=media&token=66e84e55-97e8-46a6-9ab8-685f1e950581",
metaType: IMAGE
}
) {
id
}
}
Add video metadata

Run this query

mutation addAssetInfo {
createAssetMetadata(
data: {
dataRowId:"<DATAROW-ID>",
metaValue:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
metaType: VIDEO
}
) {
id
}
}
Edit asset metadata

Run this query

mutation updateAssetInfo {
updateAssetMetadata(
where:{
id:"<METADATA-ID>"
},
data:{
metaValue:"New Value Here",
metaType: TEXT
}
){
id
}
}
Remove asset metadata from a data row

Run this query

mutation removeAssetInfo {
deleteAssetMetadata(
where:{
id:"<METADATA-ID>"
}
){
id
}
}

Was this page helpful?

Members

Webhooks

Contact