Resource Roles
This page of the documentation describes roles and permissions for resource access in SaaS. For working with others in On-Premise installations, click here.
For an overview of resource sharing and user roles, click here.
Resources within SwaggerHub can be shared with other people.
The number of members that can be added to SwaggerHub depends on the SwaggerHub plan. Click here to explore adding users.
Roles
A user (organization member) can be assigned the following roles:
Designer
Consumer
Owner - a designer with system administration privileges
For product management in Portal, go to the User Management section on the Portal documentation.
These roles provide the following privileges:
Privilege | Consumer1 | Designer |
---|---|---|
Resources | ||
View APIs and domains | ✓ | ✓ |
Create and edit APIs, and domains; add an delete versions, publish/unpublish, rename, compare and merge | ✓ | |
Create and manage Portal products | ✓ | |
Create, edit and manage API custom templates | organization owners | |
Transfer resources to another owner, delete resources | organization owners | |
Code generation | ||
Generate client and server code 2 | ✓ 2 | |
Configure codegen options | ✓ | |
Integrations | ||
Add, manage and trigger integrations | ✓ | |
Working with Others | ||
Manage sharing | ✓ | |
Comments (OpenAPI only) | ||
View, add, reply, edit, resolve, delete, reopen comments | ✓ 3 | ✓ |
1 Organization members get commenting permissions automatically if they SwaggerHub SaaS, SwaggerHub On-Premise 1.24 and later.
option is enabled for the organization. They can also view the Portal Products. This option is available in2 API owners and designers can limit the client and server generators available to individual APIs.
3 Consumers can resolve, edit, delete, and reopen only their own comments.
Manage resource sharing
Designers can manage the members that are allowed to share resources.
Open your API or domain page.
In the top right corner, click :
To add members, enter a user name or team name you want to add, and select a role for each.
To remove a user, click Remove next to their name.
Newly invited users will get an email notification.
Email notifications
All people sharing a resource receive an email notification when:
They have been invited to share a resource.
Comments are added, replied to, resolved or reopened.
A version of a resource is published, unpublished or deleted.
Note
Saving the API in the editor and adding a new API version do not trigger notifications. Also, notifications are not sent to the user who triggered notifications.
Concurrent editing
Multiple users can edit the same API definition simultaneously. However, when somebody saves their changes, they can overwrite the changes made by others. To prevent data loss, during editing, SwaggerHub displays a warning every time someone saves their changes to the definition:
Also, if someone changed the API definition while you were editing it, SwaggerHub will warn you before saving your changes:
To avoid data loss in this case, we recommend that you save your API to a file and then merge it with the API stored in SwaggerHub. You can merge specifications by using the SwaggerHub Compare and Merge feature, or by using some external merge tool.
Also, we recommend that you use comments to coordinate your work with other users.