Created
May 25, 2020 20:06
-
-
Save katoen/62e49159033c5d8078605387d8f94f0f to your computer and use it in GitHub Desktop.
TOSHL Finance API Power BI - List entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
List TOSHL.com transactions in Power BI Power Query | |
https://developer.toshl.com/docs/entries/list/ | |
all KEYS & IDs stored as parameters | |
*/ | |
let | |
Source = Json.Document( | |
Web.Contents( | |
"https://api.toshl.com/entries?from=2000-01-01&to=2020-05-31", | |
[Headers = [#"Content-Type" = "application/json", accept = "application/json", Authorization | |
= "Bearer " & TOSHLAPIKEY]] | |
) | |
), | |
#"Converted to Table" = Table.FromList( | |
Source, | |
Splitter.SplitByNothing(), | |
null, | |
null, | |
ExtraValues.Error | |
), | |
#"Expanded Column1" = Table.ExpandRecordColumn( | |
#"Converted to Table", | |
"Column1", | |
{ | |
"id", | |
"amount", | |
"currency", | |
"date", | |
"desc", | |
"account", | |
"category", | |
"created", | |
"modified", | |
"completed", | |
"deleted", | |
"tags", | |
"import", | |
"readonly" | |
}, | |
{ | |
"id", | |
"amount", | |
"currency", | |
"date", | |
"desc", | |
"account", | |
"category", | |
"created", | |
"modified", | |
"completed", | |
"deleted", | |
"tags", | |
"import", | |
"readonly" | |
} | |
) | |
in | |
#"Expanded Column1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment