Add support for duplicating APIs, Roles, and Keys#435
Merged
Conversation
Release 7.2 preparation
Updating dist files
… of APIs, Keys, and Roles.
…copy all configurations
- Fixed API request format by wrapping payloads in { resource: [data] } as expected by backend
- Updated role duplication to copy all permissions (role_service_access_by_role_id) and lookup keys (lookup_by_role_id)
- Updated service duplication to copy entire config object with all service-specific settings
- Updated app duplication to copy all app configurations including type, url, storage settings, etc.
- Added proper error handling with catchError and throwError for all API calls
- Use snake_case for API fields (is_active, role_id, api_key, etc.)
- Apps generate new API keys when duplicated
- All duplicate operations show appropriate success messages
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed role duplication not copying permissions: - Changed from snake_case to camelCase field names (roleServiceAccessByRoleId, lookupByRoleId, isActive) - Fixed permission field mapping to use camelCase (serviceId, verbMask, requestorMask) - Fixed filters structure to match API format with name/operator/value - Added fields and related parameters to the create request - Fixed app duplication not working: - Removed api_key from payload (API keys are generated server-side) - Removed unnecessary async/await for API key generation - Fixed refresh API key action to use snake_case api_key Both issues were caused by API field naming convention mismatches. The DreamFactory API expects camelCase for roles and snake_case for apps. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
removed console log
VladyslavTy
approved these changes
Aug 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In an effort to streamline creation of APIs, Roles, and Keys, we've added the ability to duplicate already configured services to remove the mundane tasks of reconfiguring them.
There is now an ellipses on the far right that gives the user the option to duplicate the API, Role, or Key and are prompted to provide a new name for it to avoid conflicts.
When duplicated they are inactive by default and the duplicated database APIs will not have the password because it's encrypted for security.