Forum Discussion
Read all data from dalux Api
the code since is this one :
let
Source = Json.Document(Web.Contents("https://field.dalux.com/service/api" & "/4.0/projects/6663914611/tasks", [Headers=[#"X-API-KEY"="290d553c-c523-43f1-9eb0-4f241ed51802"]])),
#"Converti en table" = Table.FromRecords({Source}),
#"items développé" = Table.ExpandListColumn(#"Converti en table", "items"),
#"items développé1" = Table.ExpandRecordColumn(#"items développé", "items", {"taskId", "subject", "usage", "type", "number", "created", "createdBy", "workflow", "location", "userDefinedFields"}, {"taskId", "subject", "usage", "type", "number", "created", "createdBy", "workflow", "location", "userDefinedFields"}),
#"type développé" = Table.ExpandRecordColumn(#"items développé1", "type", {"name"}, {"name"}),
#"createdBy développé" = Table.ExpandRecordColumn(#"type développé", "createdBy", {"userId"}, {"userId"}),
#"workflow développé" = Table.ExpandRecordColumn(#"createdBy développé", "workflow", {"name"}, {"name.1"}),
#"location développé" = Table.ExpandRecordColumn(#"workflow développé", "location", {"level", "room", "building", "drawing", "locationImages"}, {"level", "room", "building", "drawing", "locationImages"}),
#"level développé" = Table.ExpandRecordColumn(#"location développé", "level", {"name"}, {"name.2"}),
#"room développé" = Table.ExpandRecordColumn(#"level développé", "room", {"name"}, {"name.3"}),
#"building développé" = Table.ExpandRecordColumn(#"room développé", "building", {"name"}, {"name.4"}),
#"drawing développé" = Table.ExpandRecordColumn(#"building développé", "drawing", {"name"}, {"name.5"}),
#"locationImages développé" = Table.ExpandListColumn(#"drawing développé", "locationImages"),
#"locationImages développé1" = Table.ExpandRecordColumn(#"locationImages développé", "locationImages", {"name", "fileDownload"}, {"name.6", "fileDownload"}),
#"userDefinedFields développé" = Table.ExpandRecordColumn(#"locationImages développé1", "userDefinedFields", {"items"}, {"items"}),
#"items développé2" = Table.ExpandListColumn(#"userDefinedFields développé", "items"),
#"items développé3" = Table.ExpandRecordColumn(#"items développé2", "items", {"key", "name", "values"}, {"key", "name.7", "values"}),
#"metadata développé" = Table.ExpandRecordColumn(#"items développé3", "metadata", {"totalItems"}, {"totalItems"})
in
#"metadata développé"
Hello, I'm working on Dalux and connected it to Power BI with API. I'm not sure to understand what you meant by the fact that you can't have all the pages. If it's still the case, you can send me a message that we have a look on it.