Define query parameter and add it in API call

I created query parameter but i can’t add it in API callScreenshot 2024-03-27 133029

If this is a nodejs project, then you need to define it on the main page, not on the content page.

Yes, is nodejs project. I defined it in homepage.ejs, main.ejs and index.ejs

You only need to define it on the main page and save the main page.

This is my Project Folder

So, i created an API call and i added it on load of the homepage.
Where do i have to add the query parameter? In homepage.ejs or in main.ejs?

1 Like

You define your query param on your main page. You select in your server action properties on the page you are calling it …

So, i’m using server connect to create an API call as you can see.


I added the query param in the main page, Then, in the homepage, i added the API action.

Now, how can i add the query param from here?

Dear @Giuseppe_Credentino,

I suppose that all you want is to:
SERVER_SIDE:

  1. Create an api (serverconnect) doing what you want to do in it:
    image

  2. Add a variable in your $_GET

  3. And name it as you want:

FRONT_SIDE:
4) Add the serverconnect you just created (getContactDetails) in your main.ejs.

  1. Then you will see the $_GET variable that you created in step-2

Click the lightening bolt and bind the query you want…

After that you can create Dynamic Events like Success as you see at the bottom of step-5 screenshot and do what you want to do when the api is successfully executed…

I hope I understood correctly what you want.

*Advice:
Try not to create multiple threats for the same purpose…
It is diffucult for all of the users to help you.
Give all the data in one threat, explain what you have so far and what you want to archive in order to have accurate responses.

Cheers

1 Like