Contact Us 1-800-596-4880

CLI Commands for API Governance

You can use Anypoint CLI commands to automate your API Governance processes and work with custom rulesets.

Command Description

Uploads a custom ruleset asset along with its documentation to Exchange (publishes an asset)

Evaluates filter criteria to determine which rulesets apply to APIs that meet that criteria

Inspects an API specification and lists its schemas

Validates an API specification against a specified governance ruleset

Creates the documentation file for a governance ruleset definition

Creates a governance profile

Deletes a governance profile

Lists information for a specific governance profile ID

Lists all governance profiles for an organization

Updates a governance profile

Clones a governance ruleset and applies specified updates to rules

Lists ruleset rules

Initializes a governance ruleset definition based on a data schema

Validates a governance ruleset specification’s format

Install the Anypoint Platform CLI

If you plan to use the API Governance CLI commands, install Anypoint Platform CLI where you run your commands. The Anypoint CLI installation includes the API Governance plugin. For detailed installation instructions, including prerequisite software requirements, see Installing Anypoint CLI 4.x.

Permissions for Anypoint CLI Governance Commands

Anypoint CLI commands that access functionality in Anypoint Platform require adequate permissions to execute successfully.

The governance commands require the following permissions:

  • None:

    Any commands that run locally without accessing Anypoint Platform, such as ruleset validate, ruleset document, and api validate

  • Governance Administrator:

    Commands that update API Governance entities, such as profile create, profile update, and profile delete

  • Governance Viewer:

    Commands that list API Governance information only, such as api inspect and profile list

Ruleset Development CLI

You can also use an open-source CLI, ruleset-development-cli, to help you create custom rulesets. See Create Rulesets Using the Ruleset Development CLI.