Problems with an external API

I made a c # API that inserts and updates data in SQL server. I have tested this API with Postman and it works. I introduced this API in a custom action in ADALO and it works with the sample data. When I call the custom action from the click of a button, the API does not work giving a 500 internal server error, even if using the same example data that worked previously. I cannot understand what this could depend on.
I thank in advance who will help me.

Hi @emanuele1964 ,
Welcome to Adalo. Could you provide some screenshots of the configurations in the custom action and does it give you only 500 error or any other details?

Hello, I’m new to Adalo and having a problem with displaying images from an API. As a test, I chose a public api from a site called dog.ceo, but when I manage to create a api collection in Adalo I’m not able to retrieve the image from it. I’ve attached an image of endpoints from the website in the hopes that someone can help with this. Thanks in advance.

Hi @DLF, that is because the response is a single object, not an array. The COllections always need to run a GET request as an Array to validate the API endpoint, unfortunately it is a restriction of how Adalo is setup.

{
“message”: “https://images.dog.ceo/breeds/puggle/IMG_084828.jpg”,
“status”: “success”
}

You will be able to use as a custom action though.

3 Likes

Hi @DLF,

Welcome to the community :partying_face:

You need a custom action for this because the JSON response returns one result and it’s not a array! Just saw @JL_LJ reply! What he said :point_up:

Made a video! : Radnom Dog Image.mp4 - Google Drive

Thank you

3 Likes

Thank you for helping to understand what the problem is, also being new to APIs made me feel completely lost on this.

1 Like

This has been a great help! Thank you so much. :+1:

3 Likes

Hi @emanuele1964 and @JL_LJ I have to set up an api connection to sql server as well. I wonder if you would share how you connected yours to Adalo. I have had success with Airtable so I hope SQL Server will be good as well. Many thanks in advance. Mary

Hi Mary,
What is the SQL platform you use? Oracle, MySQL, Microsoft? Usually they offer a REST API functionality that you will need to setup in order to be able to connect to ADALO.

Check if Authorization process is OAUTH2.0 as Adalo is not compatible with it yet.

As an example, you can check the Azure one (Microsoft): Create an Azure SQL Database using REST | Microsoft Docs

1 Like

Many thanks JL. Likely MS SQL Server. Will look into it. Just want to make sure that Adalo is compatible with SQL Server. thanks, Mary

Excuse me pendermj, I am only now reading your request. I have created a web api rest in c #. However, I found it difficult as the test works successfully but then with the custom lists there are record repetition problems

Hi @emanuele1964 ,
I am not sure how to help with this.
It sounds like you have successfully connected to the MS C# API , but the problem is possibly in the Adalo creation of custom lists using this api .

@JL_LJ I wonder if you can help emanuele ? Why is he getting record repetition problems?

Thanks Mary

Hello all,
Was off on Holidays :slight_smile: . @emanuele1964 Can you post the details in PM of the issues you are facing not to spam? Then we can post publicly a solution. Thx.

I honestly don’t know what to publish. The problem is that when I try to view records from external resources (APIs that give json results) the records that are displayed are much more than the records returned by the API as they are proposed multiple times. The biggest problem is that this happens randomly, not always;
I read in other answers that you need to put the key field at the beginning of the fields in the external resource, but this didn’t solve the problem either; the only thing I noticed is that this malfunction occurs when the number of records exceeds ten, but even in this case there is no precise limit

I specify that the APIs work correctly tested with postman