Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

sonarQube API dynamic data

Hi, I want to access Sonar data via the API with the following request : let BaseUrl = "https://sonar.xxxx.xxx", RelPath = "api/projects/search", EntitiesPerPage = 500, GetJson = ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    HI Anonymous,

    I mean unpackage your custom functions, you can take a look at the following codes:

    let
        BaseUrl = "https://sonar.xxx.xxx",
        RelPath = "api/projects/search",
        EntitiesPerPage = 500,
        Json =
            Web.Contents(
                BaseUrl,
                [
                    RelativePath = RelPath,
                    Headers = [
                        #"Content-type" = "application/json"
                    ]
                ]
            ),
        components = Json.Document(Json)[components],
        #"TableConvert" =
            Table.FromList(
                components,
                Splitter.SplitByNothing(),
                null,
                null,
                ExtraValues.Error
            )
    in
        #"TableConvert"

    Regards,

    Xiaoxin Sheng