# Folder Structure For API Automation

**URL:** <https://community.postman.com/t/folder-structure-for-api-automation/59622>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [April 5, 2024, 9:34am UTC](https://community.postman.com/t/folder-structure-for-api-automation/59622 "2024-04-05T09:34:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gourish-mahale](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gourish-mahale](https://community.postman.com/u/gourish-mahale)\
**Post date:** [April 5, 2024, 9:34am UTC](https://community.postman.com/t/folder-structure-for-api-automation/59622/1 "2024-04-05T09:34:40Z")

</div>

Main Collection

- Reusable Functions
  - Prerequisite Data
    - API Tests
      - Persona1
        - Feature Name
          - Request

      - Persona2
        - Feature Name
          - Request

Is this the right folder structure in Postman for API automation. Functions are created inside objects specific to feature in Reusable Function folder better reusability.

FeatureName1 = {  
functionName1 : function{  
}  
},  
FeatureName2 = {  
functionName2 : function{  
}  
}

Anything wrong with this approach?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 6, 2024, 9:19am UTC](https://community.postman.com/t/folder-structure-for-api-automation/59622/2 "2024-04-06T09:19:24Z")

</div>

Hey @gourish-mahale,

This is a very subjective and context based question. The basic answer would be…“it depends”.

Everyone uses Postman in a different way and there isn’t _one_ approach that fits all use cases. If what you have works for you and your context, I would go with that.

What I would mention is that some of the workarounds that you’re doing for reusable scripts, might not be needed soon. Lots of very cool things coming into the product very soon. 🙏

---

<div class="post-metadata">

**Author:** ![gourish-mahale](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gourish-mahale](https://community.postman.com/u/gourish-mahale)\
**Post date:** [April 8, 2024, 3:38am UTC](https://community.postman.com/t/folder-structure-for-api-automation/59622/3 "2024-04-08T03:38:59Z")

</div>

Sounds good, Danny!! Can’t wait to get these new features rolled out… Currently in Postman, there’s some cons on reusing functions between folders defined at same level under main collection and following design patterns like SRP and others for API automation. Oops concepts can also not be followed.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [May 8, 2024, 3:39am UTC](https://community.postman.com/t/folder-structure-for-api-automation/59622/4 "2024-05-08T03:39:22Z")

</div>

Closed on May 8, 2024, 3:39am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
