Forum Discussion

CEllis's avatar
CEllis
Resolver I
2 years ago
Solved

CURL

I was woundering if anyone had experience in using Wonde api with dataflows ?      
  • CEllis's avatar
    CEllis
    2 years ago

    lbendlin 

     

    Thanks for the direction the problem I had was the authetication method.

     mwoollen soloution below worked in the dataflow.

     

    Not sure why but I had to use the token in the username and have a blank password for the refresh schedule to work which I though was odd.

     

    let
      Username = "[your username]",
      Password = "[your password or TOKEN]",
      UserPass = Username & ":" & Password,
      Bytes = Text.ToBinary(UserPass),
      Base64_UserPass = Binary.ToText(Bytes, BinaryEncoding.Base64),
      TargetURL = "[target URL]",
    //TargetURL = "https://companyxyz.atlassian.net/rest/api/latest/search",
      Source = Json.Document(Web.Contents(TargetURL,
      [
         Headers = [
          #"Authorization" = "Basic " & Base64_UserPass, 
          #"Content-Type" = "application/json"
         ]
      ]
      ))
    in
      Source

     

    Many thanks

     

    Chris