I've created an asset with a multiple attribute, like for instance, a set of images.
I would like to insert images to that asset with Webcenter Sites REST API but I don´t know how.
Single attribute is like this:
sourceAssetAttribute = new Attribute();
sourceAssetAttributeData = new Data();
sourceAssetAttribute.setName("FSIILongDescription");
sourceAssetAttributeData.setStringValue("Test Long Description");
sourceAssetAttribute.setData(sourceAssetAttributeData);
sourceAsset.getAttributes().add(sourceAssetAttribute);
And multiple is how ?
I finally got it.
It´s like this:
sourceAssetAttribute = new Attribute();
sourceAssetAttributeData = new Data();
sourceAssetAttribute.setName("attribute_name");
sourceAssetAttributeData.getStringLists().add(0,"Asset_type:"+asset_id));
sourceAssetAttributeData.getStringLists().add(1,"Asset_type:"+asset_id));
sourceAssetAttribute.setData(sourceAssetAttributeData);
sourceAsset.getAttributes().add(sourceAssetAttribute);