How to associate Metadata to Document / folder using JDK API
AnsweredHello All,
I want to associate the metadata template created by admin to my documents using java sdk API.
How can i do the same ? can someone provide me sample of API or reference
-
I tried something simple and it seems to work.
public static void main(String[] args) { BoxAPIConnection api = new BoxAPIConnection(DEVELOPER_TOKEN); BoxFile file = new BoxFile(api, "removed for privacy33"); file.createMetadata(new Metadata().add("/foo", "bar")); Metadata metadata = file.getMetadata(); System.out.println("printing out meta-data: " + metadata.get("/foo")); }
Here's my output:
printing out meta-data: bar
Process finished with exit code 0
Please sign in to leave a comment.
Comments
3 comments