How can I pull reports data from Resource Management connect to Power BI?
I'm not a developer and my knowledge of APIs are limited.
I'm working on getting data from the resource management tool to power bi. I was able to pull all data, except for reports. I know I have to do a POST request, which I'm trying for the first time. I did run this query and I'm still getting errors.
I'm getting this message "We couldn't authenticate with the credentials provided." my credentials are set anonymous.
What am I doing wrong?
Answers
-
another attempt, another error
let
apiUrl = "https://api.rm.smartsheet.com/api/v1/reports/rows",
apiToken = "XXXXXX", // Replace with your Smartsheet API token
headers = [
#"Content-Type"="application/json",
#"auth"=apiToken
],
queryParams = [
view = "time_fees_hours",
time_frame = "this_week",
group_by = {"project_id"},
today = DateTime.ToText(DateTime.LocalNow(), "yyyy-MM-dd"),
calc_incurred_using = "confirmed-unconfirmed"
],
response = Json.Document(Web.Contents(apiUrl, [Headers=headers, Query=queryParams])),
data = response
in
data