As I understand that you are trying to retrieve the schema of assets scanned with Cosmos DB as the source in Microsoft Purview. To retrieve the schema of assets scanned with Cosmos DB or Files as the object type in Azure Purview, you need to ensure that you're approaching the API calls correctly and that the necessary metadata is available in the Purview catalog.
Here are some steps and considerations to help you troubleshoot and retrieve the schema for files and Cosmos DB assets:
Based on the information you have provided, it is possible that the file format is unstructured, and Purview may not capture the schema automatically. In such cases, you may need to define custom classifications or connectors for specific file types. Another possibility is that the necessary metadata is not available in the Purview catalog.
Therefore, I would recommend checking the Purview scans and classifications to ensure that the right classifications are applied to the assets you want to query. If you are still having trouble retrieving the schema, you may want to refine the scan configuration or consider using custom metadata connectors if your assets have unique structures.
I hope this information helps. Please do let us know if you have any further queries.
Thank you.