The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi @q2bi ,
I think you may want to use Visual API in your custom visual. I suggest you to refer to below offical blogs.
For reference:
Visual API for Power BI Visuals - Power BI | Microsoft Learn
Power BI visual project structure - Power BI | Microsoft Learn
Local Storage API in Power BI Visuals - Power BI | Microsoft Learn
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Hi! Is there any solution to this issue?
No, i want to send http post request in my custom visual like this.
const url = 'https://www.mycompany.com/api/v1/comment/save';
const username = 'company_username';
const password = 'company_password';
const headers = new Headers();
headers.set('Authorization', 'Basic ' + btoa(username + ":" + password));
headers.set('Content-Type', 'application/json');
const data = {
comment: 'This is a sample comment',
userId: 12345
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
Is there any ideas to access my api safely ? Setting API username and password in PowerBI Gateway connection then BI visual connects the Gateway connection? or anyother user token that i can get no need to publish the BI visual ?