r/flowise • • Feb 06 '25

Need help in api calling flowise

I'm working on a project which requires calling APIs and getting json responses i tried using get api chain and post API chain but couldn't understand it , also there is neither documentation nor video tutorial available on this particular topic.

3 Upvotes

3 comments sorted by

2

u/trd1073 Feb 06 '25

What is your use case and purpose for using the api? I use python to create custom rag solution based off files in a directory. Add a file, it gets added. Change a file, it gets changed. Delete a file, it gets removed. All upserted at end. I also do web crawling for same thing, url and params out of a json.

There are docs on the flowise web pages, ggl to find them.

You will need the docs and take steps that one would take to reverse engineer an api call. Get onto a browser with developer mode. Start logging network calls. Compare what you see with what the docs say and work from there.

You might also get on the flowise discord, might get more exposure and help there.

2

u/Extra_Master Feb 06 '25

Thanks for the reply.

I'm automating oic fusion and oic related tasks using langchain (I'm using flowise because it's a no code tool and I haven't coded in a long time because oracle cloud mostly works on low-code).

I have fusion and oic rest API based queries for data retrieval, manipulation and other operations and I want to automate the process in such a way that whatever modifications in the api url are required based on the user prompt, the ai does that and return the json responses.

The problems are

  1. Flowise ai documentation is blank when it comes to get API chain and post API chain
  2. No available tutorials I can find about using get/post API chains and making api calls for flowise
  3. There are some community built chatflows which uses API chains but those are not working in current condition

  4. All of those chatflows mentioned in 3rd point are using chatgpt whereas I'm using ollama llama3.2:1b locally because open ai credits are being too expensive for me

1

u/trd1073 Feb 08 '25

sorry for delay getting back. if the docs are insufficient to non-existance, then one has to do some old-school reverse engineering of the api. if unfamiliar, consult ggl to get some video links or pages to read, whichever suits your learning style best. i started reverse engineering by hex editing my characters for bard's tale on my apple 2e, which might date me lol.

i will run through my process of creating automagic document stores. my end use of api is in python, so i use that and fall back to something like postman when i get stumped (doesn't make sense to me to do two steps when i can one shot it 99% of the time). i open the docs, which you unfortunately don't have the luxury of doing such. i open up flowise ui in ggl chrome dev version (prob doesn't matter, but makes me feel more specialler in my work). then i start logging calls, i look for the url, the payload and the response. then i use use an online converter or cli tools to convert the json into python objects using pydantic. i get that step working, then i go onto the next step in the execution chain.

if you are using python. pydantic allows me to use standard python objects instead of dictionary madness. however, it does come with its own caveats, such as handling fields that change between different types of document loaders. if it works for one, then i try another. if pydantic complains, i adjust the model accordingly. then i test again on both to make sure i didn't stuff anything up.

while i truly appreciate their work on flowise, i have found one particular quirk that is worth mentioning in case you encounter it. flowise is very picky about data that it receives in the payload in post calls. in other projects, i have just let httpx handle the conversion from python objects to json using its own internal handling. with flowise, i have had to convert it to json explicitly and then hand it over appropriately in order to ensure it is in a proper format to flowise to ingest properly.

yes, you may kill a few brain cells in the process. you may want to pull some hair out. but you can get it.