Been working on this one for awhile and can’t wrap my head around a solution.
I am trying to send a post request for an attribute with multiple values and nothing is working.
The documentation for the call is below and the data must be sent in form-data.
curl https://WEBSITENAME/api2/client/1/
-u ClientID:
-d multiselect_field_name=1
-d multiselect_field_name=2
-d multiselect_field_name=3
I have found success sending one variable using the following paramater
-d multiselect_field_name=1
However once I try to do more than 1 like the example above it only takes the first result.
Other things I have tried are
-d multiselect_field_name[0]=1
-d multiselect_field_name[1]=2
Which does not work at all. Anyone have any thoughts or have experienced this before?
Jici
May 30, 2024, 7:20pm
3
Can you share link to api doc?
Jici
May 30, 2024, 7:27pm
4
This could be multiselect_field_name[]
without number
Yeah I’ve tried that and it didn’t work sadly. Have tried so many iterations.
The API docs are limited and need to be signed in to access them. I attached all of whats there for the Call i am working on below.
Jici
May 30, 2024, 7:33pm
6
Did you tried in postman/insomnia? Is it working?
I have not. Was seeing if I can get it working on the bubble API connector before checking out 3rd party resources.
Jici
May 31, 2024, 12:08am
8
Try it in postman. It could help setting it after in Bubble.
I forget an option you could try is to put the request in the url like https://urlapi.com/?multiselect_field_name=value1&multiselect_field_name=value2
Thanks, unfortunately the data needs to be form-data and the url parameters do not work. I have tried to set it up in postman and it is not working either.
So strange as I have not encountered an issue like this when setting up API calls in bubble before and its really impacting development
Actually when I try in postman with 2 of the same parameters it does work but that is not working in bubble…
Have you seen this happen before?
Jici
May 31, 2024, 1:43pm
11
Share postman settings. Di d you try what I said in my previous post? You do what I say in form data. Just keep file as parameter
I am not sure what you mean? I tried putting the values in the URL but it did not work.
1 Like
Jici
May 31, 2024, 3:08pm
13
Can you post screenshot of postman settings that work? Header and params
This is what works at the moment. But strange the exact thing on bubble only takes 1 of the data points.
t
Jici
June 3, 2024, 3:46pm
15
I’Ve tested in requestbin, and Bubble only send one parameters when there’s a duplicated key. You can try to reach Bubble support for that.
Thank you for looking into it. I will make a bug report. Let me know if you have any other ideas possibly. Would ideally want to make it as dynamic as possible.
Jici
June 3, 2024, 3:54pm
17
You could create your own call into a plugin or using js toolbox probably. The main issue will be to work with the response after. But a good “cheat” could be to make the call POST with plugin or toolbox but only result the ID and after, fetch the ID using API connecor to get more data if needed
Jici
June 3, 2024, 3:56pm
18
Maybe using RAW and create the multipart… may be complex but possible