bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Expand Folder Vars API

Open phrfpeixoto opened this issue 1 year ago • 6 comments

I have checked the following:

  • [x] I've searched existing issues and found nothing related to my issue.

This feature

  • [ ] blocks me from using Bruno
  • [x] would improve my quality of life in Bruno
  • [ ] is something I've never seen an API client do before

Describe the feature you want to add, and how it would change your usage of Bruno

Bruno currently has an API to retrieve folder variables, but there's no API to set or remove folder variables.

This would be useful for a folder that deals with several requests involving the same resource, ie: A folder for a restful API for handling a Pet.

Pet APIs Folder
   |___  Create Pet (set's the pet_id variable onto the folder, after creating it)
   |
   |___  Retrieve Pet (reads the folder-level pet_id, and uses it to retrieve the pet)

Mockups or Images of the feature

setFolderVar

Sets a folder-level variable

Example:

let data = res.getBody()
bru.setFolderVar("pet_id", data.id)

deleteFolderVar

Deletes a folder-level variable

Example:

let pet_id = bru.deleteFolderVar("pet_id")

phrfpeixoto avatar Mar 13 '25 11:03 phrfpeixoto

I would like to work on this @phrfpeixoto

rajesh-agrawal avatar Apr 11 '25 13:04 rajesh-agrawal

Hello @phrfpeixoto @helloanoop , Please approve.

https://github.com/usebruno/bruno/pull/4484

rajesh-agrawal avatar Apr 11 '25 18:04 rajesh-agrawal

hey Folks 👋 - I came across this feature and it would be really useful for me too. Any chance, your PR gets merged anytime soon @rajesh-agrawal ? Thanks for taking care 🙏

codebaard avatar May 21 '25 14:05 codebaard

I would love for this to get merged.

CastorDaedalus avatar Jun 04 '25 20:06 CastorDaedalus

I think this would be useful for the reasons explained here

Canna71 avatar Sep 10 '25 09:09 Canna71

In which release version this feature would be available? I am looking to use this feature for an automation where I need to keep same variable name with different values at each folder level.

jagdishc avatar Nov 14 '25 03:11 jagdishc

Hello, +1 for this feature

mRamzii avatar Dec 10 '25 13:12 mRamzii

Heyy, I would love to see this feature merged. It would make my life so much easier!

LarsRingersma avatar Dec 11 '25 07:12 LarsRingersma