API Get Metadata Registerd Models

vinhdv4
New Contributor

Hi all,

I has been call DBX API for get all metadata model
My user have no EXECUTE privileges on registered model, it only have USE CATALOG / USE SCHEMA  on parent catalog/schema
I still can get all metadata of Model

Here is my python code for call API:
___

import json
from databricks.sdk import WorkspaceClient
w = WorkspaceClient()
list_models = w.registered_models.list(
    catalog_name="system",
    schema_name="ai",
    include_browse=True)
i=0
for model in list_models:
    print(json.dumps(model.as_dict(), indent=4, ensure_ascii=False))
    i+=1
print(i)
___


But this documentation required EXECUTE privilege on the registered model (https://docs.databricks.com/api/workspace/registeredmodels/list)

Can anyone explain for me, please? T___T