External rest data source authentication issue

Merry Christmas Eve, The API developer got back to me with the following links for more info: Riadevelopers.com Riadevelopers.com To authenticate, Call [GET] https://testapi.orionadvisor.com/api/v1/security/token Include a Basic authorization header with the userid/pwd base 64 encoded: [Header] Authorization: Basic {uid}:{pwd} returns an “auth_token” The auth_token can then be used for all other api calls. [Header] Authorization: Session <auth_token>

HI. I’m still having issues with this. I just worked on it with my Salesforce Developer who has successfully build integrations with this API outside of Skuid. He reviewed your comments and my settings and says that everything is set correctly as far as we are able to tell. We can’t actually see what is happening behind the scenes. The flow that JD Bell laid out in his comment is correct. Here is a screenshot of my settings. Still no satisfaction…

Raymond,

This might help: http://help.skuidify.com/m/models-conditions-filters/l/455021-troubleshooting-and-debugging-for-exte…

Thanks Matt! I ran through this and the json is showing a post method instead of a get method. The tutorial, and my Salesforce developer indicate it should be a get. My model, however, is set to: Service Access Method = Get, so I’m not sure why it is using a post method

Hi Raymond, I took a look at this. Right now Skuid is always sending the authentication part of the request as POST no matter what. We need to add an “Authentication Verb” option to the authentication options. I’ll try to get this added to our next update. But that probably wont be out for another 3-4 weeks.

This reply was created from a merged topic originally titled External data issue. Hello, I’m still seeking help with this issue. I think it may be a problem with Skuid, so I marked this post as “Problem”. I am unable to connect to an external rest interface. Several community members tried to help and I ran a JSON diaginostic and found that my page is generating a post method instead of a get method. My Skuid page is set to method=Get, though. If anyone in Skuidland can help me out, I would greatly appreciate it. The details can be found in the below post:

https://community.skuidify.com/skuid/…

Thanks!

Ok, thanks Ben.

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

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

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.

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}}

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?

(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.

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