Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have the following query that is working fine in Power BI desktop (I have anonymised the API Key and Workspace ID in the relative path). However, when publised, I am getting an error:Failed to update data source credentials: Web.Contents failed to get contents from 'https://reports.api.clockify.me/' (404): Not Found
Is there any way round this?
let
// Inline dynamic date range: last 365 days
todayDate = DateTime.Date(DateTime.LocalNow()),
startDate = Date.ToText(Date.AddDays(todayDate, -365), "yyyy-MM-dd") & "T00:00:00Z",
endDate = Date.ToText(todayDate, "yyyy-MM-dd") & "T23:59:59.999Z",
// API credentials and endpoint parts
apiKey = "-",
baseUrl = "https://reports.api.clockify.me",
relativePath = "v1/workspaces/-/reports/detailed",
// JSON request body
requestBody = [
dateRangeStart = startDate,
dateRangeEnd = endDate,
exportType = "JSON",
detailedFilter = [
page = 1,
pageSize = 1000
]
],
binaryBody = Json.FromValue(requestBody),
// API call
response = Web.Contents(baseUrl, [
RelativePath = relativePath,
Headers = [
#"X-Api-Key" = apiKey,
#"Content-Type" = "application/json"
],
Content = binaryBody
]),
// Parse and transform response
json = Json.Document(response),
entries = json[timeentries],
table = Table.FromList(entries, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
output = Table.ExpandRecordColumn(table, "Column1", {
"_id", "description", "userId", "timeInterval", "billable", "projectId", "taskId", "tagIds",
"approvalRequestId", "type", "isLocked", "currency", "amount", "rate", "earnedAmount",
"earnedRate", "costAmount", "costRate", "projectName", "projectColor", "clientName",
"clientId", "taskName", "userName", "userEmail"
})
in
output
Solved! Go to Solution.
Hi @Griggs
I took your query and added my own Clockify API Key & Workspace ID, and initially received the same error when setting up Data Source Credentials in the Power BI Service.
After some testing, it seems the only way to avoid the error and validate the Data source credentials is to bypass the connection test by enabling "Skip test connection" as shown here:
This seems to be one of those cases where the Power BI Service simply can't validate the API URL. Changing the split between Base & Relative URLs didn't seem to help in this case.
In any case, after enabling "Skip test connection", I was able to successfully refresh the semantic model in the Service.
Are you also able to get refresh working in the same way?
Hi @Griggs
I took your query and added my own Clockify API Key & Workspace ID, and initially received the same error when setting up Data Source Credentials in the Power BI Service.
After some testing, it seems the only way to avoid the error and validate the Data source credentials is to bypass the connection test by enabling "Skip test connection" as shown here:
This seems to be one of those cases where the Power BI Service simply can't validate the API URL. Changing the split between Base & Relative URLs didn't seem to help in this case.
In any case, after enabling "Skip test connection", I was able to successfully refresh the semantic model in the Service.
Are you also able to get refresh working in the same way?
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |