CLI for Exchange Assets
Command | Description |
---|---|
Uploads an Exchange asset using Exchange Experience API |
|
Modifies mutable data of an existing Exchange asset |
|
Modifies an Exchange asset |
|
Downloads an Exchange asset |
|
Lists all assets |
|
Downloads an asset’s description page from Exchange |
|
Changes an asset’s description page from Exchange |
|
Uploads an asset’s description page from Exchange |
|
Updates an asset’s description page from Exchange |
|
Deletes an asset’s description page from Exchange |
|
List all pages for a given asset |
|
Copies an Exchange asset |
|
Deletes an asset from Exchange |
|
Deprecates an asset |
|
Undeprecates an asset |
|
Shows a given asset’s information |
|
Uploads a resource to an asset portal |
|
Lists published resources in the asset portal |
|
Downloads resource from the asset portal |
|
Deletes resource from the asset portal |
|
Modifies the status of an existing asset |
Exchange commands are currently not available for GovCloud. |
exchange:asset:upload
> exchange:asset:upload [flags] <assetIdentifier>
This command uploads a rest-api, soap-api, http-api, raml-fragment, custom, app, template, example, policy, extension, external-library, connector asset, or ruleset using the ID passed in <assetIdentifier>
.
Use the following format for the assetIdentifier argument:
([groupID]/)assetID/version
If group_id is not specified, it defaults to the currently selected organization ID.
Flag | Description |
---|---|
|
Asset name (required if no pom file is specified) For example:
|
|
Asset description |
|
Asset properties For example:
|
|
Asset file, identified as To send multiple files, you typically use the same flag multiple times:
An exception to this is when you upload ruleset documentation with a ruleset. Both sets of classifiers and packaging options must be entered in a single
Examples: To upload a POM file and a RAML specification:
To upload a ruleset and its documentation:
|
|
Asset type Required if no file is specified. Supported Values:
If it is uploaded, the type is inferred from the classifier of the file. Depending on the type of asset, some possible classifier values are:
|
|
Categories (value should be a string in JSON format) '{"key": "value"}' For example: '{"Department": "IT"}' |
|
Fields (value should be a string in JSON format) '{"key": "value"}' For example: '{"releaseDate": "2020-01-01T20:00:00.000Z"}' |
|
Keywords (comma-separated) For example:
|
|
Tags (comma-separated) For example:
|
|
Asset dependencies (comma-separated) For example:
|
|
Asset status Supported Values:
Default value:
|
exchange:asset:mutableDataUpload
> exchange:asset:mutableDataUpload [flags] <assetIdentifier>
This command modifies the mutable data of an already created asset, including tags, categories, fields, and documentation.
Use the following format for the assetIdentifier argument:
[<groupID>]/<assetID>/<version>
If group_id is not specified, it defaults to the currently selected organization ID.
Flag | Description | Example |
---|---|---|
|
Documentation file. (Should specify the "zip" file path. Example: "--docs /…/file-path/docs.zip") |
|
|
Categories |
|
|
Fields |
|
|
Tags (comma-separated) |
|
exchange:asset:updateStatus
> exchange:asset:updateStatus [flags] <assetIdentifier>
This command modifies the status of an already created asset.
Use the following format for the assetIdentifier argument:
[<groupID>]/<assetID>/<version>
If group_id is not specified, it defaults to the currently selected organization ID.
Flag | Description | Example |
---|---|---|
|
Asset status Supported Values:
|
|
Valid transitions are:
From | To |
---|---|
|
|
|
|
|
|
Note that the published
state corresponds to the stable
state
exchange:asset:modify
> exchange:asset:modify [flags] <assetIdentifier>
This command modifies the Exchange asset identified with <assetIdentifier>
.
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
Besides the default --help
flag, this command also accepts:
Flag | Description | Example |
---|---|---|
|
New asset name .2+<.< |
|
|
Comma-separated tags for the asset |
|
exchange:asset:download
> exchange:asset:download [flags] <assetIdentifier> <directory>
This command downloads the Exchange asset identified with <assetIdentifier>
to the directory passed in <directory>
.
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:list
> exchange:asset:list [flags] [searchText]
This command lists all assets in Exchange.
You can specify keywords in searchText to limit results to APIs containing those specific keywords. |
Besides the default --help
flag, this command also accepts:
Flag | Description | Example |
---|---|---|
|
Number of results to retrieve |
|
|
Offsets the number of APIs passed |
|
|
Filters by organization id |
|
|
Specifies the response format. |
|
exchange:asset:page:download
> exchange:asset:page:download [flags] <assetIdentifier> <directory> [pageName]
This command downloads the description page specified in <pageName>
for the Exchange asset identified with <assetIdentifier>
to the directory passed in <directory>
.
If [pageName] is not specified, this command downloads all pages.
This command only supports published pages. |
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
The description page in downloaded in Markdown format. When name
is not specified, all pages are downloaded.
This command accepts only the default flag --help
.
exchange:asset:page:modify
> exchange:asset:page:modify [flags] <assetIdentifier> <pageName>
This command modifies the description page specified in <pageName>
, for the Exchange asset identified with <assetIdentifier>
.
This command only supports published pages. |
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
Besides the default --help
flag, this command also accepts the --name
flag to set a new asset page name.
exchange:asset:page:upload
> exchange:asset:page:upload [flags] <assetIdentifier> <pageName> <mdPath>
This command uploads an asset description page from the path passed in <mdPath>
using the name specified in <pageName>
to the Exchange asset identified with <assetIdentifier>
.
Naming the page "home" makes the uploaded page the main description page for the Exchange asset.
This command publishes all active drafts as part of the operation. |
Argument assetIdentifier
should be formatted as follows: [group_id]/<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:page:update
> exchange:asset:page:update [flags] <assetIdentifier> <pageName> <mdPath>
This command updates the content of an asset description page from the path passed in <mdPath>
using the name specified in <pageName>
to the Exchange asset identified with <assetIdentifier>
.
Naming the page "home" makes the updated page the main description page for the Exchange asset.
This command publishes all active drafts as part of the operation. |
Argument assetIdentifier
should be formatted as follows: [group_id]/<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:page:delete
> exchange:asset:page:delete [flags] <assetIdentifier> <pageName>
This command deletes the description page specified in <pageName>
, for the asset identified with <assetIdentifier>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
This command only supports published pages. |
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:page:list
> exchange:asset:page:list <assetIdentifier>
This command lists all pages for the asset passed in <assetIdentifier>
.
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command only supports published pages. |
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
This command also accepts the default flag --help
.
exchange:asset:copy
> exchange:asset:copy [flags] <source> <target>
This command copies the Exchange asset from <source>
to <target>
.
Arguments <source>
and <target>
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts the default flag --help
, and also:
Flag | Description | Example |
---|---|---|
|
Organization ID to copy asset into |
|
exchange:asset:delete
> exchange:asset:delete [flags] <assetIdentifier>
This command deletes the Exchange asset passed in <assetIdentifier>
.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation. |
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:deprecate
> exchange:asset:deprecate <assetIdentifier>
This command deprecates the asset passed in <assetIdentifier>
.
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:undeprecate
> exchange:asset:undeprecate <assetIdentifier>
This command undeprecates the asset passed in <assetIdentifier>
.
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command accepts only the default flag --help
.
exchange:asset:describe
> exchange:asset:describe <assetIdentifier>
This command describes the asset passed in <assetIdentifier>
.
Argument assetIdentifier
should be formatted as follows: ([group_id]/)<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
exchange:asset:resource:upload
> exchange:asset:resource:upload [flags] <assetIdentifier> <filepath>
This command uploads the resource specified in <filepath>
to a page in the asset portal described in <assetIdentifier>
.
You can use this command for any page of your <assetIdentifier>
asset.
Supported file extensions for <filepath>
are: jpeg
, jpg
, jpe
, gif
, bmp
, png
, webp
, ico
, svg
, tiff
, tif
.
The argument assetIdentifier
should be formatted as follows: [group_id]/<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
The successful output command will be a markdown codesnippet.
This command accepts only the default flag --help
.
exchange:asset:resource:list
> exchange:asset:resource:list [flags] <assetIdentifier>
This command lists the resources in the asset portal of the asset specified in <assetIdentifier>
.
Argument assetIdentifier
should be formatted as follows: [group_id]/<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
This command lists published resources by default. You can use the --draft flag to list draft resources from the asset portal.
|
This command accepts the --draft
flag to list non-published resources in the asset portal.
This command has the --output
flag. Use the --output
flag to specify the response format. Supported values are table
(default) and json
.
This command also accepts the default flag --help
.
exchange:asset:resource:download
> exchange:asset:resource:download [flags] <assetIdentifier> <resourcePath> <filePath>
This command downloads the published resource specified in <resourcePath>
from the asset portal of the asset specified in <assetIdentifier>
to the file specified in <filePath>
.
Argument assetIdentifier
should be formatted as follows: [group_id]/<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
Argument <resourcePath>
must be a published resource.
You can list all published resources using the asset resource list command.
This command only supports published resources. |
This command accepts only the default flag --help
.
exchange:asset:resource:delete
> exchange:asset:resource:delete [flags] <assetIdentifier> <resourcePath>
This command deletes the resource specified in <resourcePath>
from the asset portal of the asset specified in <assetIdentifier>
by publishing a new portal in which resourcePath
has been deleted.
Argument <assetIdentifier>
should be formatted as follows: [group_id]/<asset_id>/<version>
.
If group_id
is not specified, it defaults to the currently selected Organization ID.
Argument <resourcePath>
must be a published resource.
You can list all published resources using the asset resource list command.
This command publishes all active drafts as part of the operation. |
This command accepts only the default flag --help
.