Configuring rulesets in IBM API Studio

Learn to manage rulesets in IBM API Studio to enforce governance standards and validate APIs during the API design process.

About this task

Rulesets define the governance and validation standards that help APIs comply with organizational and global best practices. In IBM API Studio, ruleset management gives you a consistent way to fetch, apply, and enforce these rules during API design and testing.

IBM API Studio connects with API Manager to retrieve both global rulesets, defined centrally, and custom rulesets, which are created for specific needs. The integrated linting engine uses these rulesets to validate APIs, enabling seamless checks in your API design process.

Procedure

  1. From the home page, click API Studio settings.
  2. Click Ruleset management.
  3. Choose an API Manager connection and the Provider organization from drop-down menu.
    Note:
    • This step applies only to the desktop application. For IBM API Studio in API Connect on-premises and SaaS instances, the API Manager connection is selected by default.
    • If you add any custom rule or ruleset in API Manager, you must publish it. Then, open API Studio settings > Ruleset management in IBM API Studio, refresh the ruleset list, and enable or disable the required rulesets. Finally, open the editor to verify the auto-validation.
    • Only published rulesets from API Manager are displayed in IBM API Studio.
    The Ruleset management tab displays both global and custom rules that are imported from API Manager.
  4. Auto validation is enabled by default for each ruleset, and you can turn it off if needed.
    The integrated linting engine validates APIs in the editor by using the selected rulesets.

What to do next

  • You can view the applied rulesets only for an OpenAPI specification in the code view. Click Validation to open Manage rulesets in the editor and view the applied rulesets. You can also add or remove rulesets.
  • Errors related to the applied rulesets appear in the Problems tab. You can sort linting errors by ruleset using the Triggered by filter in the Problems tab and resolve them as needed.