API dynamic data problem

Hi Bubble users!

I have troubles to connect with the API and to send my dynamic data to the api

Case:

we are sending samples to a laboratory and want the data back

There for we have 3 steps:

1 we need to send an sample order via API “Eurofins Order” including lots of dynamic values.

Question 1: I have defined a lot of body parameter keys, but how do I fill these keys with dynamic values from a button click??

After the company Eurofins has checked the sample they give the result back in 2 steps
2. API “Eurofins Resuls Available” that reports back the basic informatie of the sample (ID)!
The initialize call works. see screenshot below:

  1. API "Eurofins Results v14 should give me all values of the sample ID that I have to sent as a parameter to the API


“The intialize call” works, when I send the ID to this API.

Question 2: How do I get these data from step 2 and 3 in my bubble database?

Question 3: How to make this an automatically checked:

A. check if there is a sample ready (step 2)

B. Pick the results of that sampel (step 3)

Thanks a lot for your help!
Marco

Remove private checkbox to ID. This way you will be able to pass datafrom one call to another one.

1 Like

Thanks Jici, but the questions is how do I pass that information from Call to my database and (bak?) to the other Call

I can’t find anything to do that between “Button is Clicked” and the API

thanks for your advise

If you want to store information in your DB, you need to create or make change to a thing and in the field where you want to storeinformation, use Get Data from API. If you plan to store more than 1 field, I suggest to set a state with the data API First and Use this state to get the information

Hi Jici,

I know how to change tings en make things.
Problem is that I can not find any function that allows me to do some thing with the API setup in the Plugin API connector.

Where can I make a connection with the button and and send the “button click”-information via a workflow (schedule API WF?) to a backend workflow (endpoint?) and from endpoint to API CALL

thanks for your advise!

There’s two way to use API connection.
If you have set your API Call to be “Data” type, this will be available using Get Data From API un data source or field.
If you have set your api Call to be “Action” type, this will be available in workflow action (plugin tab).
Now, how you will use it will depend on what you want to do exactly. Normally, if you are doing a GET request, this should be set as Data and be available in Data source with Get Data From API.
All other reques (POST, PATCH, PUT, DELETE) should be set as action (because this is what they are).

Don’t forget that only initialized call will be available in Get Data from API or workflow action.

In your Question A, you ask: A. check if there is a sample ready (step 2)
Ideally, check if the API provide webhook. If yes, this is what you should use to know when a sample is ready.

Normally, if you are doing a GET request, this should be set as Data and be available in Data source with Get Data From API.

I don’t see the option “Get Data From API”…

I only see these options:

thanks for your advise!

Get data is available in Data source, not in workflow.
For exmaple, if you create a thing, set a field, in value, you will be able to select Get Data From API. This option is available where Do a Search for is also available.

Thanks mate!

I’m able to download headers in step 2, but not the ID, so I can’t send it to step 3.

and for step 3 when I do not send the ID I get this and I’m not able to import the keys to my things fields…


Thanks for your help!

This is available in 's body arrayofresultsummarymodel… that is too long to show the rest
But once you will select this, you will have other option

Thanks Jici!

Found the ID and are able to get it into my thing, so step 2 is finished.
Step 3 is still the question…
How do I send the ID to the API Call?

I have entered it manual and clicked “Intialize Call” the result is shown below the button, but there is still the red comment "you need to intialize this call before it will work…

Can you give me again a push in the right direction?
Thanks a lot for all your help and time!

Are you sure the result will be type text?
Can you provide link to the API Doc?

it’s xml… And I have connection and are able to get data in my database!

Thanks for that part too Jici!
I will investigate how to organise the data as I have “grouped” data in the xml and I do not have any clue how to route it into my thing…

Thanks again for all your help!

1 Like

If the result give you a list, you can schedule API workflow on a list. You can also use a list of text (for barcode) and it’s also possible to use regex to create a list by splitting with the comma.

Thanks Jici

I think I understand what you mean and try to work out a bit more about splitting up the data.

Is it possible to give me some advise on step 1 also?
because I still not able to see what you wrote:

If you have set your api Call to be “Action” type, this will be available in workflow action (plugin tab).

I have changed it from Data to Action, but I can’t find the function to send my dynamic data to the API…

All your help is much appreciated!

@Jici

I have found the issue…
I had defined a parameter key myself after deleting that I was able to Initialize the Call successfully.
After that I have found the call in my page workflow and was able to enter dynamic values.

Sending the data to the API works, BUT…
It looks like the API is only sending the header and not all the keys

results in a feedback of the API reception:

What is going wrong here?
Thanks again for all your time and help!
So much appreciated !

1 Like

Unrelated to this API, but you just solved my problem with the Quickbooks API. The answer for me was to put that Accept = application/json and then magic happened.