How to define pass parameters to a UX REST Data Broker?

David Hubbard
Tera Guru

I'm trying to use an existing REST API in UI Builder via UX REST Data Broker (sys_ux_data_broker_rest).

When I add this into UI Builder I can see result data - meaning (I think) it made a request

But no option is provided to pass a parameter to this - how do I define/pass the parameter? 

I have tried adding JSX definitions to properties and parameters - but not sure how to tell UI Builder about the parameter that needs to be provided.

 ### UPDATE

I have got an inch closer.

I found that the "Properties" is an Array

Now the ID field appears in UI Builder.

However even with a specific sys_id in that field (one that does return a user on an HTTP request via Postman) returns empty array.

So the question is now (I think) : How to define the "API" parameter in the 'sys_ux_data_broker_rest'?

If I have tried

  • hard coding the id in the API URL - I get data.
  • however other forms all fail
    • "{id}" - the standard REST API definition form
    • "%id"
    • "$id"

 

 

 

1 ACCEPTED SOLUTION

lakshminarayan4
ServiceNow Employee
ServiceNow Employee

All is good except your url parameters should contain double curly braces paramters. See the example belowfind_real_file.png

View solution in original post

6 REPLIES 6

lakshminarayan4
ServiceNow Employee
ServiceNow Employee

All is good except your url parameters should contain double curly braces paramters. See the example belowfind_real_file.png

Unfortunately with that I now get - "Invalid URL. Please check values"

find_real_file.png

My mistake - somehow the ID had been blanked out - it's working now

find_real_file.png

 

That is with the double braces

find_real_file.png

 

Many thanks

Hi

I have a follow on question - relating to calling a REST POST endpoint - "How to define pass POST Data via a UX REST Data Broker?".  Any chance you could take a look?  

Thanks