Skip to main content
Nintex Community Menu Bar
Question

External rest data source authentication issue

  • July 10, 2024
  • 33 replies
  • 25 views
  • Translate

Did this topic help you find an answer to your question?
Show first post
This topic has been closed for comments

33 replies

Forum|alt.badge.img+17

Ok, thanks Ben.

Translate

Forum|alt.badge.img+8

Hi Raymond, as of Banzai Update 7, you can now send authentication requests with GET.
http://www.skuidify.com/skuidreleases

Translate

Forum|alt.badge.img+17

I’m excited to try it! Thanks for the hard work.

Translate

Forum|alt.badge.img+17

Unfortunately no satisfaction on this. I changed the verb to GET, but I still get this error when I load the page with the model based on the service in page builder: 1. Error retrieving metadata for Model(s) associated with Data Source ‘OrionConnect’. Please check Models’ properties to ensure they are set correctly. Error connecting to REST Data Source at URL “https://api.orionadvisor.com/api/v1/portfolio/accounts”: Unauthorized I checked my user ID and password several times and they are correct.

Translate

Forum|alt.badge.img+13

Raymond, in your Common Request Headers, the following is invalid and will not return anything: {{$Auth.Body.access_token}}. Replace it with this:

Session {{$Auth.Response.Body.access_token}}

Translate

Forum|alt.badge.img+17

Ha! It works! It really works! You guys are awesome! Now I have a couple follow up question. 1)It is bringing the data in, but it is in read only format. If I switch the model behavior to Read/Write the service URL and the service access method settings hide. If I then load the live page, it still brings in data, but is still read only. Is read/write possible? 2) I set up a model on an object that has 10’s of thousands of records. It exceeded the governors and I got an error as expected, but unlike regular models, these models don’t have regular conditions. They are URL merge conditions and when I try to create one it tells me, “This model’s service URL does not contain any merge parameters”. Also, there are no settings for max records or sort by. Is there currently any way for me to either cap the number of records queried or apply a condition to the model?

Translate

Forum|alt.badge.img+13

(1) When you switch the Model to Read/Write, the Service URL and other properties get moved into a “Query”  Method within the Methods child node of the Model (next to Fields). If your REST API that you’re using supports it, you can add additional Methods to provide the ability to Create, Update, and/or Delete records of the REST Resource in question. Whether this makes sense / is possible for your particular REST API depends on the API you’re using.

(2) As far as limiting which / how many records are returned by a REST request, this is entirely dependent on the particular REST API you’re using, in your case OrionConnect. Often, REST API’s provide various URL Parameters that you can add to your REST Model’s URL which will limit the number of records retrieved or apply the equivalent of “Conditions” to the request. For example with OrionConnect, the TradeFiles GET request lets you include startDate and endDate URI Parameters with your request to limit the range of TradeFiles requested. This is just a for instance — I’m not sure which API you’re using, there may not be any URI Parameters supported by the REST API you want to use, but typically if there’s enough data being returned that Salesforce governor limits were exceeded, I’m betting that there’s some URI Parameters you can use to restrict the payload size.

Translate

Forum|alt.badge.img+17

Great, thanks. I’ll take a look.!

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings