Use this script to disable all interaction from Snyk to my SCM for a given time period
- Remove the Snyk webhook by getting the Webhook Id and using it to delete the webhook
- Get integrations from different organizations and then update each integrations settings.
- Get all integrations first
- Go through each integration to get the integration settings by integration ID
- Return integration IDs into an array along with associated settings.
- Update integration settings to off. Looped through each integration setting data attribute and set it to false. Focus on making sure all SCM settings are identified and set to off.
- Later down the line turn the settings back on.
Approach #1
Webhooks Approach:
Approach #2
- Get a list of all integrations
- Get integration settings
- Update integration settings - This will be done twice: once to turn things "off" and then back "on"