Forum Discussion

smeredith's avatar
smeredith
Frequent Visitor
7 years ago

Help with POST API

Hi I have been pouring over the internet trying to solve this problem, but am stumped. If there is helpful information elsewhere I may have missed, please point me in the right direction.

We have a piece of equipment which stores data to a cloud service. The service provides JSON files with the data via REST API. Currently we are using Postman to generate the POST command using Basic Auth to recieve the token. We then use the token to run several other GET requests to get the JSON files we need. The JSON files are then edited using notepad++, and the imported into PowerBI via queries. I am confident all of this can be done within Power BI, I just don't know how. Here is the console data from Postman to receive the token:

 

Pretty
Raw
POST /api/Authenticate HTTP/1.1
Content-Type: application/json
Authorization: Basic ZWRlbmlubm92YXBpQGZvcm5leXZhdWx0LmNvbTpjcUBebV8rQmhnNl5laEdQ
User-Agent: PostmanRuntime/7.16.3
Accept: */*
Cache-Control: no-cache
Postman-Token: af82fe58-e7fe-4a76-a4f3-64fd65ae141f
Host: forneyvaultapi-v5staging.azurewebsites.net
Accept-Encoding: gzip, deflate
Content-Length: 84
Cookie: ARRAffinity=84bf4a47daca0e8b2456e7f9b916668a7467930da7d6cbd0753e915d0fcce476
Connection: keep-alive
{
"username": "[email protected]",
"password": "password"
}
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 1490
Content-Type: application/json; charset=utf-8
Content-Encoding: gzip
Expires: -1
Vary: Accept-Encoding
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 05 Sep 2019 19:31:59 GMT
"long token string"

2 Replies