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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
lumi
Frequent Visitor

RelativePath for Servicenow adding an extra '/' in URL

Hi all, 

 

Could you please give me an idea regarding below issue?

 

I'm getting data from servicenow API using functions.
In order to make it possible online refresh schedule - the RelativePath is used.

However, the full URL gets with an extra "/" after table name - wicth causes the url to be invalid.

https://xxxx.service-now.com/api/now/v2/table/change_request/?sysparm_query=business_service=xxx&sysparm_limit=50


Queries:

Function:

(business_service as text) =>
let
Relative = Json.Document(Web.Contents("https://xxxx.service-now.com/api/now/v2/table/change_request",
            [ RelativePath = "?sysparm_query=business_service=" & business_service & "&sysparm_limit=50"
                    ]))
in 
    Relative

Query:

let
    Query = Json.Document(Web.Contents("https://xxx.service-now.com/api/now/v2/table/cmdb_ci_service", 
            [ RelativePath = "?sysparm_query=company=xxxxx"])),
    ....
    
 #"Added Custom" = Table.AddColumn("Query","Function", each Function([Value.id]))

in
    Query


Thank you,

Lumi

3 REPLIES 3
nglenn1
Regular Visitor

I didn't see a clear answer to this and after probably a dozen different tries having this same issue it is somehow happy with moving my relative path further back into the url than where I had it, right up to the moment I needed to pass the parameter

THIS:

Source = Xml.Tables(Web.Contents("https://xxxx.xxxx.com/sites/xxx/_api/web/Lists/",
        [RelativePath ="getbytitle('Contractor%20Relationship%20Manager')/items("&IDS&")/versions"]))

INSTEAD OF THIS:

Source = Xml.Tables(Web.Contents("https://xxxx.xxxx.com/sites/xxx/_api/web/Lists/getbytitle('Contractor%20Relationship%20Manager')/items(",[RelativePath = IDS & ")/versions"]))

 Where my function is:

(IDS as text)=>
nglenn1
Regular Visitor

Did you ever figure this out? The response below seems entirely off topic. I'm getting the same thing. Head scratcher

v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @lumi,

 

Here is a similar thread showing how to get data from ServiceNow from desktop and configure scheduled refresh.

Publish and schedule refresh for ServiceNow changes

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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