Metadata Exception
Hi,
I created a template that I am applying to files and folders. I can add and update values for this template in files and folders but when I try to retrieve the metadata for that template I get an exception:
curl https://api.box.com/2.0/folders/FOLDER_ID/metadata/enterprise/TEMPLATE_NAME -H "Authorization: Bearer TOKEN"
Error:
{"message":"Instance not found for '\"parented\", \"folder_FOLDER_ID\", \"TEMPLATE_NAME-GUI\"'","code":"instance_tuple_not_found","request_id":"############"}
I'm using the .Net SDK as well
metadata = await _boxClient.MetadataManager.GetFolderMetadataAsync(folder.Id, MetadataTemplatScope, MetadataTemplateName);
Getting the same error either for folder or files.
I have to add that for some cases it works.
I also tried with scope = "enterprise_MyEnterpriseId"
Thanks,
-
Good morning ,
that error indicates that the specific folder has no metadata of the type TEMPLATE_NAME-GUI added.
Have you tried to retrieve ALL the metadata for that specific folder by removing the specific template?
https://api.box.com/2.0/folders/FOLDER_ID/metadata
There you will see ALL the templates associated to that folder. If the result is empy that means that the folder does not have any associated template.
Thanks
Please sign in to leave a comment.
Comments
1 comment