# Swagger API for limited user in a specific component

**URL:** <https://community.dreamfactory.com/t/swagger-api-for-limited-user-in-a-specific-component/5183>\
**Category:** App Configuration\
**Created:** [May 18, 2020, 12:34pm UTC](https://community.dreamfactory.com/t/swagger-api-for-limited-user-in-a-specific-component/5183 "2020-05-18T12:34:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark\_ddb](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mark\_ddb](https://community.dreamfactory.com/u/mark_ddb)\
**Post date:** [May 18, 2020, 12:34pm UTC](https://community.dreamfactory.com/t/swagger-api-for-limited-user-in-a-specific-component/5183/1 "2020-05-18T12:34:01Z")

</div>

Based on the [https://community.dreamfactory.com/t/swagger-api-for-limited-user/1893](https://community.dreamfactory.com/t/swagger-api-for-limited-user/1893) we want to have a specific access to one component without selecting all component.

Example:  
DB1 - Database 1  
DB2 - Database 2  
User - Limited User  
\_table/view\_table - Specific Component  
Get - Access Limit

User should have a Role that it can access DB1 & DB2 only and it is limited to access \_table/view\_table component only on Get access only limit.

But upon diagnosing and troubleshooting the Role, you need to select \* (all component) for the api\_docs to display instructions to pull api, meaning it will display all components for a specific database.

What we require is to limit the user to one Component only in a Get access limit, this is to prevent data loss and other issues.

Our DreamFactory Version: 2.14.0

---

<div class="post-metadata">

**Author:** ![abhishek.pandey](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@abhishek.pandey](https://community.dreamfactory.com/u/abhishek.pandey)\
**Post date:** [May 20, 2020, 9:50pm UTC](https://community.dreamfactory.com/t/swagger-api-for-limited-user-in-a-specific-component/5183/2 "2020-05-20T21:50:13Z")

</div>

Hello @mark_ddb. Thank you for reaching out. You are on the right path.

1. You first need to create a role with the Get Access rights over the databases (DB1 and DB2).  
Then proceed to create a new user.

2. Under the roles tab, enter the user info under the ‘Basic’ tab. Under the ‘Roles’ tab, from the drop-down list for api\_docs, select the role you created in step 1

3. Login with the credentials you created for the user in step 2.

When that user logs in, they will be presented with only the allowed endpoints you allocated under roles. I tried to replicate what you are trying to do. Here is a screenshot - [https://share.getcloudapp.com/geuWXw9j](https://share.getcloudapp.com/geuWXw9j)

Let me know if this helps. I will be happy to answer any questions you have.  
Thanks
