Forum Discussion
smpa01
2 years agoCommunity Champion
Methods available to datamart API
gbrueckl
I ran the following method on datamart just to test if refreshes method is avaialble to datamart apiPath ( as it is availabale to dataset apiPath)
-- the following returns ...
gbrueckl
2 years agoMost Valuable Professional
I just checked the docs (https://learn.microsoft.com/en-us/rest/api/power-bi/datasets) and it seems there are no APIs for datamarts hence you cannot query them with my code from above
- smpa012 years agoCommunity Champion
gbrueckl Thanks.
The documenation does not list any method for datamart
yet the following succeeds on a workspace_apiPath concat('/groups/abcdef-ghij-klmn-opqr-stuvwx',
'/datamarts') that made me think that I might be able to call other methods.I am little confused here as datamrts don't have any API methods yet it succeddsand I thought I would be able to call additional methods on apiPath?cteThree as ( select dm from cteTwo LATERAL VIEW explode(pbi_api_udf(concat( workspace_apiPath, '/datamarts'), '${pbi_access_token}')) AS dm ) the above returns an object { "capabilities": "4", "lastRefreshTimeUTC": "2024-05-28T22:47:54.263Z", "modifiedByUser": "{displayName=user, [email protected], objectId=9e1103aa-a128-4bec-8b8e-d1004422b3b7}", "name": "DEV", "state": "1", "datasetObjectId": "f331fd8e-b3ce-4b24-90aa-c5a0d6699aaf", "lastRefreshStatus": "1", "datamartType": "Sql", "apiPath": "/groups/grpID/datamarts", "nextRefreshTimeUTC": "9999-12-31T23:59:59.997Z", "datasetId": "1955466", "version": "638477205269348724", "ownerUser": "{displayName=user, [email protected], objectId=9e1103aa-a128-4bec-8b8e-d1004422b3b7}", "lastModifiedTimeUTC": "2024-05-29T00:58:29.79", "status": "1", "objectId": "245952d6-0487-4f2a-abcb-89689d4813c5", "folderObjectId": "f8a6fefa-0df7-4fe7-ac93-dc0a9003594e", "dataflowObjectId": "659bd422-955c-43b7-8304-4e50b8f1ab48", "createdDate": "2024-05-28T15:06:43.76" }