Forum Discussion

Alina12's avatar
Alina12
Helper I
2 years ago
Solved

How to connect Jira REST API as data source? Power BI Service friendly and with pagination??

Hi to all I've spent hours and hours trying to load the Jira data into Power BI via its REST API. I have now managed to do it, but with the well-known problem of the error message of a dynamic data ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Alina12 ,

     

    Hope all is going well.

     

    Please follow these steps:

     

    1. The error you are encountering in the function is due to attempting to concatenate a binary () with a string. Since is used with , it is treated as a binary.

     

    You should modify your approach to use and options within for pagination as well.GetJiraIDCountBaseUrlBaseUrlWeb.ContentsRelativePathQueryWeb.Contents

     

    2. Modify the GetPage function:

    GetPage = (Index) =>
        let
            Skip = Text.From(Index * JiraIDPerPage),
            Top = Text.From(JiraIDPerPage),
            PageData = Web.Contents(
                https://XXX.XXX.net/jira/rest/api,
                [
                    RelativePath="2/search",
                    Query=
                    [
                        jql="filter=525545",
                        startAt=Skip,
                        maxResults=Top,
                        fields="issuetype,key,summary,customfield_10401,labels,customfield_10000,status,resolution,customfield_11200"
                    ],
                    Headers=[Authorization="Bearer XXX"]
                ]
            ),
            Json = Json.Document(PageData),
            Value = Json[#"issues"]
        in Value,
    

     

    If you have other questions, please contact me at any time.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!