0 votes
1 view
in BI by (10k points)
edited by

I am using a Trello rest API as a data source for Power Bi and when I published and getting the following

 error authentication 400 error

let
    Source = Json.Document(Web.Contents("https://api.trello.com/1/boards/cExjoJEB/cards?key=<my key>a&token=<my token>")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded {0}" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "checkItemStates", "closed", "dateLastActivity", "desc", "descData", "dueReminder", "idBoard", "idList", "idMembersVoted", "idShort", "idAttachmentCover", "idLabels", "manualCoverAttachment", "name", "pos", "shortLink", "badges", "dueComplete", "due", "idChecklists", "idMembers", "labels", "shortUrl", "subscribed", "url"}, {"id", "checkItemStates", "closed", "dateLastActivity", "desc", "descData", "dueReminder", "idBoard", "idList", "idMembersVoted", "idShort", "idAttachmentCover", "idLabels", "manualCoverAttachment", "name", "pos", "shortLink", "badges", "dueComplete", "due", "idChecklists", "idMembers", "labels", "shortUrl", "subscribed", "url"}),
    #"Expanded {0}1" = Table.ExpandListColumn(#"Expanded {0}", "idMembersVoted"),
    #"Expanded {0}2" = Table.ExpandListColumn(#"Expanded {0}1", "idLabels"),
    #"Expanded {0}3" = Table.ExpandRecordColumn(#"Expanded {0}2", "badges", {"attachmentsByType", "location", "votes", "viewingMemberVoted", "subscribed", "fogbugz", "checkItems", "checkItemsChecked", "comments", "attachments", "description", "due", "dueComplete"}, {"attachmentsByType", "location", "votes", "viewingMemberVoted", "subscribed.1", "fogbugz", "checkItems", "checkItemsChecked", "comments", "attachments", "description", "due.1", "dueComplete.1"}),
    #"Expanded {0}4" = Table.ExpandListColumn(#"Expanded {0}3", "idChecklists"),
    #"Expanded {0}5" = Table.ExpandListColumn(#"Expanded {0}4", "idMembers"),
    #"Expanded {0}6" = Table.ExpandListColumn(#"Expanded {0}5", "labels"),
    #"Expanded {0}7" = Table.ExpandRecordColumn(#"Expanded {0}6", "labels", {"id", "idBoard", "name", "color"}, {"id.1", "idBoard.1", "name.1", "color"}),
    #"Expanded {0}8" = Table.ExpandRecordColumn(#"Expanded {0}7", "attachmentsByType", {"trello"}, {"trello"}),
    #"Expanded {0}9" = Table.ExpandRecordColumn(#"Expanded {0}8", "trello", {"board", "card"}, {"board", "card"}),
    #"Expanded {0}10" = Table.ExpandRecordColumn(#"Expanded {0}9", "descData", {"emoji"}, {"emoji"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded {0}10",{"checkItemStates", "closed", "desc", "emoji", "dueReminder", "idBoard", "idMembersVoted", "idAttachmentCover", "idLabels", "manualCoverAttachment", "pos", "shortLink", "board", "card", "location", "votes", "viewingMemberVoted", "subscribed.1", "fogbugz", "checkItems", "checkItemsChecked", "due.1", "dueComplete.1", "dueComplete", "idChecklists", "id.1", "idBoard.1", "name.1", "color", "shortUrl", "subscribed"})
in
    #"Removed Columns"

1 Answer

0 votes
by (20.5k points)
edited by

Check the following code:

Web.Contents(
)
Web.Contents(
 [
  RelativePath="3/action/package_search",
  Query=[q="cows"]
 ]
)
Web.Contents(
    [
        RelativePath="3/action/package_search",
        Query=
        [
            q="cows",
            rows="20"
        ]
    ]
)

  If u want to know more about the course then check the Power Bi Certification

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...