Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have an API that uses the post method for authentication
Content = "{""username"":""username"", ""password"":""password""}". I receive the message that the Login was successful.
That authentication session (which I believe is Get-Cookie JSESSIONID) is to be used for another api that also uses a post method to grab a list of records based off of the search criteria used in the post. Example: Content = "{""searchfield"":""searchterm""}".
I have searched everywhere and I can't find anything that points me in the right direction. I don't see where the JSESSIONID is provided in the response from the authentication api. When I put either of the APIs in postman, they both have Set-Cookie listed under Headers with JSESSION ID=xxxxxxxx; Path =/(path name) and other information. Any help would be greatly appreciated.
I'm still trying to get this to work. I am able to sucessfully authenticate to the Login_URL but am getting stuck on how to retrieve the data once I authenticate. The Xml.Table that gets generated for the response is our ID, username, password (which is blank for security reasons) and a message showing a success or failure.
My API document has this:
https://SOURCE URL/RELATIVE PATH/rest/auth/login
Method POST, To Login, return OK (200) or other error response.
Login Data: {"username":"{Username}","password":"{Password}"}
I am using the following code for the Login authentication
let
Source = Login_URL,
Content = Credentials,
Response = Xml.Tables(Web.Contents(Login_URL, [Content=Text.ToBinary(Content), Headers=[#"Content-Type"="application/json"]]))
in
Response
Data_URL:
https://SOURCE URL/RELATIVE PATH/rest/service/list/object
Method POST, Login is required, return a list of JSON or XML Object and OK (200) or other error response.
Input Data:
{"field1":"{field1}","field2":"{field2}"}
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |