Added get_secret_key method to admin.py #266
Merged
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.
Added a get_secret_key method to retrieve integration secret key from Admin API
Description
Added a method in admin.py to make calls to the /admin/v1/integrations/[integration_key]/skey endpoint.
Motivation and Context
Despite the documentation indicating this functionality is available and the Admin API providing the correct endpoint it is not currently implemented in the code. I am developing a script to automate the creation of new application integrations and programmatically store them in our organization's secret management solution. When testing the create_integration method I found that it returned all the necessary info except the secret key, when done in this way the secret is obfuscated and thus not suitable for my needs.
Additionally, this will address issue #254.
How Has This Been Tested?
Testing was completed by modifying a development branch of the source and the method has been a number of times while testing my integration script, with no noticeable issues.
Types of Changes