Rest API as DataSource - Knowledge and Understanding

Hello I’m looking for information about “Rest Api as Datasource” I can’t find a topic in the documentation of Softr.io

I try to understand the way of setting all this,

For a POST request, if I understood correctly it is necessary that in the body there is the object Json is this right? but how to customize this object dynamically? in the documentation concerning the API that I’m trying to implement, it seems to me that json indicates the type of values expected,

I tried to do something like this but it doesn’t work:

{
“folder”: “/folders/0”,
“type”: “{typeContact}”,
“name”: “{name}”,
}
}

Can you help me please?

Thank you

Hi there! I think you’re trying to feed variables from the user into this API? Here’s how you can do it:

In this example, I am filtering Stripe invoices by getting customers from the logged-in user fields: {LOGGED_IN_USER: Stripe Customer} . Stripe Customer is a field for the logged-in user. So the placeholder structure for the logged-in user is {LOGGED_IN_USER:anyFieldOfUser}

Hmmm thank you for your reply,

i try to understand but there is some basics i didnt get yet ^^

for example: you use url param because it’s a GET request ?
but for a POST, how can i do ?

in my example on documentation side they said : “Request Body schema: application/json” and they gave the json object so i thought it was on body section that i need to set my fields ?

And for knowledge, Softr need another datasource for user i guess ? or we can build full app with rest api ?

You can use URL params for POST / GETs.

If you’re trying to create something, you should be using the Call API action, and not the Rest API. Rest API is meant for pulling data in. Call API is meant for triggering actions and creating data.

Since our Rest API is so new, I think it’s best to work as a supplement to an app that has a database at the moment.

Alright Thank you for clarification i think i have it,

If you want the full story, we use a CRM,

in addition for customers we created a portal client with softr + airtable

So we have an human operation to convert project from softr/airtable into project on CRM,

My goal is to converge and match data from airtable and CRM, automation to add projects etc…

and our CRM provide an API so i make some tests with your new feature

Do you know when a topic will be created in the documentation ?

Thank you

1 Like

Great to hear it! Hopefully now you can further leverage your CRM with your Softr build!

Here is docs on Rest API: Rest API – Softr Help Docs

2 Likes

Hello,

Thank you for the link !

Here a feedback : when you miss click outside of modal and you are already added a lot of ressources, the window auto close and bye bye settings ^^
(maybe add a pop up to confirm?)

Another point, i can’t see method PUT and DELETE is there a specificity to this ?

Thank you

Ah, yeah that’s a pain point for sure! Will see if we can get that addressed.

For PUT / DELETE you will want to trigger that using our CALL API action via client side. Rest API is more about pulling data into your application!

1 Like