Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sowmiya
Helper III
Helper III

Connecting Five9 API with Power BI

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Sowmiya,

 

You can refer to following links about use power query to get data from REST api and web service:

 

Get Data from Twitter API with Power Query

Sample:

let
 //Url header which used in other request
 APIHeaderURl="https://app-scl.five9.com:443/",
 //Login to get Authorization Key
 username="abc@xxx.com",
 password="******",
 body="{""passwordCredentials"":{""username"":"&username&",""password"":"&password&"},""policy"":""ForceIn""}",
 AuthKey =Web.Contents("https://app.five9.com/appsvcs/rs/svc/auth/login",
     [
         Headers = [#"Content-Type"="application/json"],
         Content = Text.ToBinary(body) 
     ]
 ),
 
 //Use Sample
 agentID=123456,
 RequestPath="appsvcs/rs/svc/agents/"&agentID&"/callbacks",
 Result = Web.Contents(APIHeaderURl&RequestPath,
     [
         Headers = [#"Authorization"=AuthKey,
                    #"Content-Type"="application/json"])
     ]
 )
 in
  Result

 

Working with web services in Power Query/Excel and Power BI

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Sowmiya,

 

You can refer to following links about use power query to get data from REST api and web service:

 

Get Data from Twitter API with Power Query

Sample:

let
 //Url header which used in other request
 APIHeaderURl="https://app-scl.five9.com:443/",
 //Login to get Authorization Key
 username="abc@xxx.com",
 password="******",
 body="{""passwordCredentials"":{""username"":"&username&",""password"":"&password&"},""policy"":""ForceIn""}",
 AuthKey =Web.Contents("https://app.five9.com/appsvcs/rs/svc/auth/login",
     [
         Headers = [#"Content-Type"="application/json"],
         Content = Text.ToBinary(body) 
     ]
 ),
 
 //Use Sample
 agentID=123456,
 RequestPath="appsvcs/rs/svc/agents/"&agentID&"/callbacks",
 Result = Web.Contents(APIHeaderURl&RequestPath,
     [
         Headers = [#"Authorization"=AuthKey,
                    #"Content-Type"="application/json"])
     ]
 )
 in
  Result

 

Working with web services in Power Query/Excel and Power BI

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Does this work even though the second link provided (to the Config Web Service API) is a SOAP API and not a REST API?  If not, is there any way to send the requests in a SOAP envelope?

Good afternoon, Can someone help me, use the query that they put in to connect me to five9 but send me the following message:

 

Expression.Error: No se puede aplicar el operador & a los tipos Text y Number.
Detalles:
Operator=&
Left=appsvcs/rs/svc/agents/
Right=123456

 

I am lost 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors