How do I create or disable default automation rules?

  • 17 January 2023
  • 0 replies
  • 100 views

To make things easier for you, we’ve created a set of default rules that are activated on your first scan and applicable to all of your repositories. As an admin, you are also able to disable existing default rules and can assign new rules to be added to integrated repositories by default. 

Keep in mind that once a rule is marked as default, it will be enabled for new repositories, even if it was disabled for existing repositories.

 

How do I set a rule as a default rule?

  1. Go to Automation in the left side menu. Here, you are able to create new automation rules, as well as edit the existing rules
     

     

  2. Click on the Default rule button
     

     

  3. In the confirmation modal, select whether the rule should be activated for only newly integrated repositories or existing repositories as well
     

     

  4. Click on Confirm

  5. Done - from now on, newly integrated repositories will be affected by your default rule!
     

     

 

This can also be done when creating or editing an automation rule:

  1. Click on the New+ button to create a rule OR Edit rule in an existing rule

  2. Tick the Default rule checkbox
     

     

  3. Click on Save

  4. Done - from now on, newly integrated repositories will be affected by your default rule!

 

How do I remove a rule as a default rule?

  1. Go to Automation in the left side menu. Here, you are able to create new automation rules, as well as edit the existing rules.
     

     

  2. Click on the Default rule button
     

     

  3. In the confirmation modal, click on Go ahead
     

     

  4. Done - from now on, newly integrated repositories will no longer be affected by your default rule!

 

How do I disable the default automation rules using the API?

 You are able to disable these rules through our API to create your own custom policy.

 

The default rules can be accessed through the endpoint:

api/1.0/open/admin/user/default-rules-enabled

 

You can check the current status of your default rules:

curl -X 'GET' \

  'https://debricked.com/api/1.0/open/admin/user/default-rules-enabled' \

  -H 'accept: */*' \

  -H 'Authorization: Bearer <token>'

 

The response will show you “true” if the default rules are enabled and “false” if they are disabled, e.g.:

{

    "defaultRulesEnabled": true

}

 

You can change the current status using “enabled”:true and “enabled”:false. Here’s an example of how to disable it:

curl -X 'PATCH' \

  'https://debricked.com/api/1.0/open/admin/user/default-rules-enabled' \

  -H 'accept: */*' \

  -H 'Authorization: Bearer <token>' \

  -H 'Content-Type: application/json' \

  -d '{

  "enabled": false

}'

 

Once you disable the default rules using the API, the automation rules won’t trigger when a new repository is added to your account. Remember to set up your own rules to optimize your use of our tool!

 

 


0 replies

Be the first to reply!

Reply