Skip to main content

Hi,

 

I've troubles updating a metadata attribute on a file.

 

I followed the instructions on the github site and on the documentation site.

BoxFile file = new BoxFile(api, "id");

file.updateMetadata(new Metadata().add("/foo", "bar"));

 

In my case:

 

BoxFile boxBestand = new BoxFile(api, bestandsId);

boxBestand.updateMetadata(new Metadata().add("/"+veld, waarde));

 

Tried:

 

BoxFile boxBestand = new BoxFile(api, bestandsId);

boxBestand.updateMetadata(boxBestand.createMetadata(template, "enterprise",  new Metadata().add("/"+veld, waarde));

 

And tried this method:

 

BoxFile boxBestand = new BoxFile(api, bestandsId);

Metadata metadata = new Metadata();
metadata = boxBestand.getMetadata(template, "enterprise");
metadata = metadata.replace("/"+veld, waarde);
boxBestand.updateMetadata(boxBestand.createMetadata(template, "enterprise", metadata));

 

All I get is 400 errors.

The API returned an error code r400 | bu1qqzggyxcgu1z4.034474d9889552d8bf4cf8604601c282d] schema_validation_failed - object instance has properties which are not allowed by the schema: e"retentiebeleid"]

 

Regards,

 

Marcel

 

 


Be the first to reply!

Reply