487
Views
6
Comments
Connecting to REST API
Question

I have been trying to get a REST API connected for more than a week now.  This isn't easy.  Everything works in Postman, in the Azure API test area and I can hit the API directly through the address.  However, when I try to set it up in OutSystems, all the documentation is outdated so nothing I try works.  The new OutSystems platform doesn't use Actions to initiate the OAuth2 steps like the few documents in the online documentation explain.  I have tried opening other projects but they are using the old way of implementing the APIs.  


I need help setting up and connecting to the api.  

I am using a Function App in Azure with an HTTP Trigger.  I can hit, the api in Postman.  I can successfully test the api in Azure.  I can paste the address into a browser and get back a response but Outsystems, I get "Not Authorized".


So, how do we SET UP these api's??  Is there any RECENT documentation outlining this? 

2021-08-30 15-28-09
Leandro Correa

Hi Kyle,

Take a look at the IDP forge component:

https://www.outsystems.com/forge/component-overview/599/idp


Can you attach a postman and OutSystems print with yours parameters? 

2018-05-31 18-44-19
Ravi Vakkalanka

Hi Kyle,

I guess you have to use custom authentication headers to access the REST API's. Follow this sharepoint example on how to use custom authentication headers to get a access token from the API.

https://www.outsystems.com/forge/component-overview/4114/sharepoint-connector


Thanks

Ravi

2019-06-03 16-15-55
Kyle Denton

I have single sign on working in the app.  I can hit the API when I use an IFrame and reference the API address. However, setting up the API in the REST section is a different story. Also, My Azure Function App has been registered and authorized with OutSystems.  I have assigned all users to the group in OutSystems.  I am not using a Swagger definition so this is a single API.


Again, the instructions include a Server Action which is not supported in OutSystems for a REST api.  There are no options to create a Server Action.  It only shows, "Add REST API Method..." and "Add Structure".  

UserImage.jpg
Joel Lister

Hi Kyle,

Did you ever get this working? I am trying to connect to the Arduino IOT cloud api but not having any joy. I cant get it fine in postman but cant seem to get it going in outsystems

2019-06-03 16-15-55
Kyle Denton

It's been a long minute since I worked on that.  I would make sure your port numbers are correct.  If it works in Postman, you're almost there and it should work in OutSystems.  Make sure IOT Cloud is allowing the port from OutSystems, there may be a specific port you need to open or set an exception for.  If it's working in postman on your system, the port from your system may be different that the port OutSystems is using.  


UserImage.jpg
Joel Lister

Thanks for taking the time to reply Kyle.

Unless I am mistaken there is no way of opening ports on the arduino iot cloud. At least for the time being I am going to have to give it up as a bad job.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.