# How to get all variables attached to the collection?

**URL:** <https://community.postman.com/t/how-to-get-all-variables-attached-to-the-collection/22036>\
**Category:** Help Hub\
**Created:** [March 29, 2021, 12:28pm UTC](https://community.postman.com/t/how-to-get-all-variables-attached-to-the-collection/22036 "2021-03-29T12:28:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [March 29, 2021, 12:28pm UTC](https://community.postman.com/t/how-to-get-all-variables-attached-to-the-collection/22036/1 "2021-03-29T12:28:42Z")

</div>

Hello Everyone,  
I want to access all the variables within the collection using Postman API.  
Is it possible to that?  
Thank You

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [March 30, 2021, 12:05am UTC](https://community.postman.com/t/how-to-get-all-variables-attached-to-the-collection/22036/2 "2021-03-30T00:05:33Z")

</div>

Hello @thefierycoder 👋

Yes you can do that 🥳

Incase you don’t have Postman API, kindly fork from [here](https://www.postman.com/postman/workspace/405e0480-49cf-463b-8052-6c0d05a8e8f3/collection/12959542-c8142d51-e97c-46b6-bd77-52bb66712c9a).

Currently we can get the Collection and Environment related details. For getting the global variables the feature request is in-progress in [GH](https://github.com/postmanlabs/postman-app-support/issues/7982).

Once you fork the Postman API’s, you have Collection folder.

![image](https://us1.discourse-cdn.com/getpostman/original/2X/6/6ab3652f4a0364f9979577f9456416c2a428da80.png)

This will return all the collection details, from here you can pick the UID,

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/7/d/7d676c71d8d0def856276d077dcc0c4e6d2e8aa9.png)

And that goes into the next request, “Single Collection”

Here you have the section “variable” which will lists all the collection variables.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/3/0325f3dc63a15bc1208fff8483deb1f20abfb1f7.png)

From here on, you can tweak them based on your needs 😊

Let us know if you face issue here!!

---

<div class="post-metadata">

**Author:** ![taehoshino](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/taehoshino/32/6608_2.png) [@taehoshino](https://community.postman.com/u/taehoshino)\
**Post date:** [March 30, 2021, 12:35am UTC](https://community.postman.com/t/how-to-get-all-variables-attached-to-the-collection/22036/3 "2021-03-30T00:35:22Z")

</div>

Hey @thefierycoder and @bpricilla 👋

You can now get collection uid from within the app!! 🎉  
 ![collection_uid](https://us1.discourse-cdn.com/getpostman/original/3X/2/8/2839883450f5075f1c7cb05647c7f7a50f320ae0.png)

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [March 30, 2021, 2:42am UTC](https://community.postman.com/t/how-to-get-all-variables-attached-to-the-collection/22036/4 "2021-03-30T02:42:01Z")

</div>

Thanks @bpricilla@taehoshino for your help.🙏
