API Catalog CLI
Command | Description |
---|---|
Configures autocompletion for API Catalog commands |
|
Creates or deletes a credentials configuration file |
|
Creates a descriptor file |
|
Updates a descriptor file |
|
Publishes assets to Exchange |
Discover and catalog your API definitions, documentation files, and associated metadata as part of an automated process with API Catalog CLI. You can embed the publish asset command in your automation tools, such as a CI/CD pipeline or custom scripts, to automatically trigger the publishing of your API assets to Exchange. API Catalog CLI is agnostic of CI/CD tools and runtime environments.
api-catalog autocomplete
$ api-catalog autocomplete [flags]
This command accepts the following flags:
Flag | Description |
---|---|
blank |
Displays instructions for configuring autocompletion |
bash |
Installs autocompletion using Bash shell settings |
zsh |
Installs autocompletion using Z shell settings |
-r, --refresh cache |
Removes the current autocompletion configuration. Use this before running the command with a different shell type. |
Examples
$ api-catalog autocomplete $ api-catalog autocomplete bash $ api-catalog autocomplete zsh $ api-catalog autocomplete --refresh-cache
The API Catalog CLI autocomplete plugin is not currently supported in Windows. |
api-catalog conf
Manage authentication credentials in a configuration file (config.json) by adding and removing key value pairs. Set one key value pair per command execution.
> api-catalog conf <authkey> <authkeyvalue> [flags]
<authkey>
The authentication key name. Possible key names are:
username
password
client_id
client_secret
host
environment
organization
<authkeyvalue>
The value for the specified authentication key.
This command accepts the following flags:
Flag | Description |
---|---|
|
Deletes the config file entry for the given key |
|
Shows the help for this command |
|
Shows the value that corresponds with the given key |
|
Shows the key that corresponds with the given value |
api-catalog create-descriptor
> api-catalog create-descriptor [flags]
This command accepts the following flags:
Flag | Description |
---|---|
|
Default: The name and location in which to save the generated catalog descriptor file |
|
Generates an |
api-catalog update-descriptor
> api-catalog update-descriptor [flags]
This command accepts the following flag:
Flag | Description |
---|---|
|
Default: The name and location in which to save the updated catalog descriptor file information |
api-catalog publish-asset
> api-catalog publish-asset [flags]
This command accepts the general and authentication flags in addition to the following flags:
Flag | Description |
---|---|
|
Runs the publish job asynchronously. |
or ANYPOINT_DESCRIPTOR_FILE environment variable |
Default: ./catalog.yaml The name and location of the catalog descriptor file.
|
|
Runs the command to verify that the descriptor file is valid. No APIs are published. |
|
Bypasses the comparison and creates a new version of the asset in Exchange regardless of the content. |
|
Updates the asset’s metadata, such as tags, in the latest version in Exchange regardless of the content. This does not republish the asset. |
|
Prints the execution result in JSON format. |
|
Enables silent logging. |
|
This flag works in conjunction with the Example:
|
|
Enables verbose logging. |
|
This flag works in conjunction with the Example:
|
General and Authentication Flags
Following are the general and authentication flags for commands that authenticate to Anypoint Platform:
Flag | Description |
---|---|
or
|
Connected app client ID See Authentication. |
or
|
Prompt for the connected app secret for the client ID See Authentication. |
or
|
Not currently used |
or
|
The name of the Anypoint Platform environment where the APIs are cataloged |
or
|
Default: anypoint.mulesoft.com The Anypoint Platform base URL without the protocol For the US Anypoint Platform, use: anypoint.mulesoft.com For the European Anypoint Platform, use: eu1.anypoint.mulesoft.com |
or
|
The ID of the Anypoint Platform organization where the APIs are cataloged |
or
|
Anypoint user password See Authentication. |
or
|
Anypoint username See Authentication. |