Forum Discussion
convert python code to M inside query
- Anonymous4 years ago
Hi EDO_01_1789,
Any update on this? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
lbendlin ,
I just tried this code and it doesn't work
here is my error message
here is the code I pasted in the query
let
url = "https://app.salsify.com",
payload = "{\""configuration\"": {\""entity_type\"": \""all\"",\""filter\"": \""=list:default\"",\""properties\"": \""'UPC','Product Name','Brand','Main Image','Short Description','Long Description'\"",\""include_all_columns\"": false,\""sort_order\"": \""desc\"",\""sort_property\"": \""Brand\""}}",
Source = Web.Contents(url, [Headers=[#"Content-Type"="application/json", Authorization="abcde"]])
in
Source
- lbendlin4 years agoSuper User
The message is clear on what you need to do. Easiest will be to go to data source settings, remove the API source, and then refresh, specifying anonymous auth.
your "authorization" header must have the format "Bearer abcde" , not just "abcde" .
- EDO_01_17894 years agoHelper I
it's starting to work, but do you know why I don't have any data?
- lbendlin4 years agoSuper User
Your API call needs to be modified according to their documentation and based on what you are trying to accomplish.