Forum Discussion

14 Replies

  • BuddyB's avatar
    BuddyB
    Frequent Visitor

    As a Qualys user, I have been working on this as well.  I will try to come up with a series of guides that are a bit more polished, but for a basic API connectivity scenario like yours, which seems to be the most common, I'll show you how that's done.  Qualys isn't great about showing the step-by-step process for API connectivity, or telling folks that their data is a bunch of nested tables. It won't be a flat CSV report download via the Qualys UI. 

     

    Instead of a screenshot to show you, I made a quick YouTube video to show you how I connect vai API and drill into the nested tables. 

    Here is the video:  Pull Qualys VM Data via API using PowerBI - https://youtu.be/6J-AES7L5eA

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I followed the same link but I am unable to see the data. Please see below screenshot. Any ideas why???

       

      let
      Source = Web.Page(Web.Contents("https://qualysapi.qualys.eu/api/2.0/fo/asset/host/?action=list", [Headers=[Authorization="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", #"X-Requested-Width"="Detection"]])),
      #"Changed Type" = Table.TransformColumnTypes(Source,{})
      in
      #"Changed Type"

      • Anonymous's avatar
        Anonymous
        Not applicable

        Maybe try something like: 

         

        let
        Url = "https://qualysapi.qualys.eu/api/2.0/fo/asset/host/",
        AuthString = "Basic ########################",
        Source = Xml.Tables(
        Web.Contents (
        Url,
        [
        Headers = [ #"Authorization" = AuthString,
        #"X-Requested-With" = "Power BI"],
        Query = [action = "list"],
        Content = Text.ToBinary("")
        ]

        )
        ),
        Table = Source{0}[Table],
        HOST_LIST = Table{0}[HOST_LIST],
        HOST = HOST_LIST{0}[HOST],
        #"Changed Type" = Table.TransformColumnTypes(HOST,{{"ID", Int64.Type}, {"IP", type text}, {"TRACKING_METHOD", type text}, {"DNS", type text}, {"NETBIOS", type text}, {"OS", type text}, {"QG_HOSTID", type text}, {"CLOUD_PROVIDER", type text}, {"CLOUD_SERVICE", type text}, {"CLOUD_RESOURCE_ID", type text}, {"EC2_INSTANCE_ID", type text}})
        in
        #"Changed Type"

         

  • camples79's avatar
    camples79
    Frequent Visitor

    Did anyone get this work? I can't get thru authenticating without an error. 

    • BuddyB's avatar
      BuddyB
      Frequent Visitor

      See my other reply with a YouTube video link that shows you how to connect.

       

      -Buddy