我一直在努力寻找一种对API请求进行身份验证的方法,以简化公司经常使用的报告。为我们提供服务的另一家公司缺乏提供帮助的意愿和/或知识,因此我处于停滞状态。我希望可以从SO那里得到一些帮助。
我用Fiddler查明了请求,它看起来像这样:
标题:
GET https://yy.zzz.com/main/location/repair/DetailReport?sFilterInitials=&sFilterRepairStartDate=07%2F01%2F2018&sFilterRepairEndDate=07%2F05%2F2018&nFilterCustomerID=&sReportType=RD HTTP/1.1
Host: yy.zzz.com
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://yy.zzz.com/main/location/repair/DetailReport
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: sess_main_login_fad58=eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee;
sess_main_company_XXXX_fad58=ZZZZZZZZZZZZZZZZXXXXXXXXXXXXXXX;
info_main_XXXX=a%3A5%3A%FFF%3A10%3A%22
company_id%22%3Bs%3A2%3A%9999%22%3Bs%3A7%3A%22
user_id%22%3Bs%3A3%3A%XXXXX%22%3Bs%3A8%3A%22
password%22%3Bs%3A34%3A%22%241%24XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX30%22%3Bs%3A15%3A%22
repair_point_id%22%3BN%3Bs%3A11%3A%22
ClientToken%22%3Bs%3A56%3A%22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%3D%3D%22%3B%7D;
BIGipServereyweb_ff_pool=9999999999.00000.0000
验证:
No Proxy-Authorization Header is present.
No Authorization Header is present.
我尝试了基本身份验证,即Bearer Token,提供了cookie来在Postman / PowerBI中对该请求进行身份验证,但似乎没有任何效果。我只是被重定向到登录页面。在登录页面上,我必须填写3个字段:公司,用户,密码。
我的目标是最终直接在Power BI中加载此数据。我该如何解决?有人可以根据我的处理情况提供示例吗?任何帮助将不胜感激。