[GH-ISSUE #4420] [feature]: Support for Variables in Collections #1621

Closed
opened 2026-03-16 21:08:41 +03:00 by kerem · 8 comments
Owner

Originally created by @Lyxnode on GitHub (Oct 9, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4420

Is there an existing issue for this?

  • I have searched the existing issues

Summary

I am requesting the addition of a feature that allows users to define and use variables within collections, not just in environments. This feature would significantly enhance the flexibility, maintainability, and reusability of collections.

Why should this be worked on?

Implementing variables in collections will provide significant benefits in terms of modularity, ease of use, maintainability, and collaboration. It aligns with modern development practices and addresses several pain points currently faced by developers. By adding this feature, it will enhance its platform's functionality and provide a more powerful and flexible setup for the collections, ultimately leading to better software outcomes.

There are siturations where you want to have some variants on a collection, but don't want to set it up in an environment.

Originally created by @Lyxnode on GitHub (Oct 9, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4420 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Summary I am requesting the addition of a feature that allows users to define and use variables within collections, not just in environments. This feature would significantly enhance the flexibility, maintainability, and reusability of collections. ### Why should this be worked on? Implementing variables in collections will provide significant benefits in terms of modularity, ease of use, maintainability, and collaboration. It aligns with modern development practices and addresses several pain points currently faced by developers. By adding this feature, it will enhance its platform's functionality and provide a more powerful and flexible setup for the collections, ultimately leading to better software outcomes. There are siturations where you want to have some variants on a collection, but don't want to set it up in an environment.
kerem 2026-03-16 21:08:41 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@samcoppock commented on GitHub (Oct 9, 2024):

I will have a go at this as part of hacktoberfest.

To be sure i have understood the request

On the just right of the centre of the screen there is a vertical menu with 'environments' and 'collections' as the first 2 options.
if you click on either then click new ( on the right of them ) you get a modal.

the 'environments' modal has an option for adding variables
the 'collections' one does not.

Are you asking for this to also be added to the modal that appears when you click collections->new ?

<!-- gh-comment-id:2402008371 --> @samcoppock commented on GitHub (Oct 9, 2024): I will have a go at this as part of hacktoberfest. To be sure i have understood the request On the just right of the centre of the screen there is a vertical menu with 'environments' and 'collections' as the first 2 options. if you click on either then click new ( on the right of them ) you get a modal. the 'environments' modal has an option for adding variables the 'collections' one does not. Are you asking for this to also be added to the modal that appears when you click collections->new ?
Author
Owner

@kris-hamade commented on GitHub (Oct 9, 2024):

I believe what they are requesting is something similar to what I'm looking for. In Postman you currently have variables at several levels.

Global > Environment > Collection

this is in lieu of not having variables directly on the request level. This would definitely be a very nice to have feature and would help a lot of people immensely.

At my current job we nest a lot of variables based on collection and environments that populate when certain requests are made and not having it at the collection level creates a lot more work

image
Something like that picture.

Edit: I realize that example wouldn't work but hopefully you get the idea. You could check this out in postman.

<!-- gh-comment-id:2403458020 --> @kris-hamade commented on GitHub (Oct 9, 2024): I believe what they are requesting is something similar to what I'm looking for. In Postman you currently have variables at several levels. Global > Environment > Collection this is in lieu of not having variables directly on the request level. This would definitely be a very nice to have feature and would help a lot of people immensely. At my current job we nest a lot of variables based on collection and environments that populate when certain requests are made and not having it at the collection level creates a lot more work ![image](https://github.com/user-attachments/assets/64a93351-7261-44ad-afd8-46e8a842af4a) Something like that picture. Edit: I realize that example wouldn't work but hopefully you get the idea. You could check this out in postman.
Author
Owner

@Lyxnode commented on GitHub (Oct 10, 2024):

That's exactly what I'm referring to @kris-hamade – the ability to set variables on collections.

<!-- gh-comment-id:2404910663 --> @Lyxnode commented on GitHub (Oct 10, 2024): That's exactly what I'm referring to @kris-hamade – the ability to set variables on collections.
Author
Owner

@ThomasL81 commented on GitHub (Nov 26, 2024):

Hi, I am interested as well. It would also be nice to include 'folder' as a level to specify/inherit them.

In my use case, I have a data api with similar get/put/patch/delete requests per object type. Then, having a folder per object type and specifying them in variables, would make maintenance a lot easier.

Watching this feature request.

Cheers!

<!-- gh-comment-id:2500231067 --> @ThomasL81 commented on GitHub (Nov 26, 2024): Hi, I am interested as well. It would also be nice to include 'folder' as a level to specify/inherit them. In my use case, I have a data api with similar get/put/patch/delete requests per object type. Then, having a folder per object type and specifying them in variables, would make maintenance a lot easier. Watching this feature request. Cheers!
Author
Owner

@kris-hamade commented on GitHub (Apr 3, 2025):

Any update on this @samcoppock?

<!-- gh-comment-id:2776396094 --> @kris-hamade commented on GitHub (Apr 3, 2025): Any update on this @samcoppock?
Author
Owner

@samcoppock commented on GitHub (Apr 9, 2025):

Any update on this @samcoppock?

Im not currently working on this - too busy with other things. @kris-hamade

<!-- gh-comment-id:2790648879 --> @samcoppock commented on GitHub (Apr 9, 2025): > Any update on this [@samcoppock](https://github.com/samcoppock)? Im not currently working on this - too busy with other things. @kris-hamade
Author
Owner

@Lyxnode commented on GitHub (Jun 1, 2025):

@liyasthomas Can you link to the other feature request that this is a duplicate of?

<!-- gh-comment-id:2927633619 --> @Lyxnode commented on GitHub (Jun 1, 2025): @liyasthomas Can you link to the other feature request that this is a duplicate of?
Author
Owner

@liyasthomas commented on GitHub (Jun 1, 2025):

@liyasthomas Can you link to the other feature request that this is a duplicate of?

https://github.com/hoppscotch/hoppscotch/issues/3736

<!-- gh-comment-id:2927647757 --> @liyasthomas commented on GitHub (Jun 1, 2025): > [@liyasthomas](https://github.com/liyasthomas) Can you link to the other feature request that this is a duplicate of? https://github.com/hoppscotch/hoppscotch/issues/3736
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1621
No description provided.