New Contributor
Posts: 5
Registered: ‎10-24-2017

Preregistering "Managed Metadata" via Cloudera Navigator API

Is it possible to preregister managed metadata via Navigator REST API?



I have created a Namespace: file_metadata with some properties in the Cloudera Navigator Web UI.


The following curl query returns HTTP/1.1 400 Bad Request. (But this works perfectly for the files that are already extracted by the Navigator):


curl http://cloudera_server.local:7187/api/v12/entities/ -u <USER>:<PASS> -X POST 
-H "Content-Type: application/json"
-d '{
"sourceId": "5699921",
"parentPath": "/landing",
"originalName": "file.txt",
"name": "file.txt",
"customProperties": {"file_Metadata": {"author": "author1"}


However, If I remove "customProperties": {"file_Metadata": {"author": "author1"}, the query will work and the metadata would be preregistered.


Also based on the documentation, the preregister (POST operation) is possible for "name", "description", "tags", and "properties"; and I guess here "properties" is the "Custom Metadata" and not the "Managed Metadata".


New solutions