Forum Discussion
pr92
1 year agoFrequent Visitor
Call API as data source with parameter hash in MD5
Hello, I have a GET API that I want to call to get my data. In Power query, I have to send dynamic values in my GET URL : First variable : current timestamp, in the following format YYYY-...
- 1 year ago
Hello, pr92 ,
I am not aware of native way, however, here's workaround using public API to hash it:
here's M code, you can turn it into function:let valueToHash = "hello", md5 = Web.Contents("api.hashify.net", [RelativePath="/hash/md5/hex?value="&valueToHash]), openJson = Json.Document(md5)[Digest] in openJson
edit:
I am gonna give you the function also here:let hastToMD5 = (valueToHash as text)=> let md5 = Web.Contents("api.hashify.net", [RelativePath="/hash/md5/hex?value="&valueToHash]), openJson = Json.Document(md5)[Digest] in openJson in hastToMD5and then you call it like this:
vojtechsima
1 year agoSuper User
Hello, pr92 ,
I am not aware of native way, however, here's workaround using public API to hash it:
here's M code, you can turn it into function:
let
valueToHash = "hello",
md5 = Web.Contents("api.hashify.net", [RelativePath="/hash/md5/hex?value="&valueToHash]),
openJson = Json.Document(md5)[Digest]
in
openJson
edit:
I am gonna give you the function also here:
let
hastToMD5 = (valueToHash as text)=>
let
md5 = Web.Contents("api.hashify.net", [RelativePath="/hash/md5/hex?value="&valueToHash]),
openJson = Json.Document(md5)[Digest]
in
openJson
in
hastToMD5and then you call it like this: