Overview of the command-line tool
The developer toolkit provides commands for working with APIs, Products, and applications, and for launching the API Designer graphical tool.
Command syntax
apic command:sub-command [argument] [options]
where - command is the command, usually the thing on which you are acting (for example, product, app, API, Catalogs, and so on).
- sub-command is the action to perform.
- argument is the argument, where applicable (for
example,
catalog
). - options are any number of command-line options, which have the form
--option [value]
. Options also have a short form with a single dash instead of a double dash.
apic apps:publish --server mgmnthost.com
.For some commands, either the command or sub-command portion is optional. For example:
apic products:publish
is equivalent toapic publish
.apic products:list
is equivalent toapic products
.
create
command has a slightly different
syntax:apic create --type sub-command [options]
-h
or --help
option to view command help. Some of the commands in the following tables are annotated with Stability:
prototype, which indicates that IBM® is in the process of
collecting customer feedback on the commands and you should not use them in production
scripts.Viewing version information
Display the version of the command-line tool by entering the command: apic --version
or apic -v
. Display extended version information, including the versions of all the command-line tool plug-in modules, by entering the command: apic --ext-version
.
Launching the API Designer
The API Designer graphical tool provides most of the capabilities of the command-line tool but with a visual interface.
To launch the API Designer, enter the command apic edit
.
Creating and validating artifacts
Command | Description | Sub-commands |
---|---|---|
apic config |
List and manage configuration variables. For more information, see Using configuration
variables. With no sub-command, lists values of defined configuration variables. |
|
apic create |
Create project artifacts. |
![]() --template template-name option. |
apic edit |
Run the API Designer and open in default web browser. | None |
|
Manage OpenAPI (Swagger 2.0) extensions in a
catalog. With no sub-command, lists the extensions in the production catalog. Stability: prototype |
|
apic loopback |
Create LoopBack project and project
artifacts. With no sub-command, creates a new LoopBack project. All of these commands are Stability: prototype, except for
|
|
|
Create Micro Gateway applications. Important: IBM API
Connect
Micro Gateway is deprecated in IBM API
Connect Version 5.0.8 in favor of DataPower® Gateway. From 1 April 2020, Micro Gateway, and associated toolkit CLI commands, will no longer
be supported. Existing users can migrate their API definitions to IBM
DataPower Gateways. For information on supported API policies, see
Built-in
policies.
|
None |
apic validate |
Validate API or Product definition YAML file. | None |
Managing and testing applications
Command | Description | Sub-commands |
---|---|---|
apic logs |
Display server logs continuously to console. | None |
|
List and manage service properties for a LoopBack
application running locally. With no sub-command, lists values of defined service properties. |
|
|
List and manage services. With no sub-command, lists all services that are currently executing. |
|
|
If run in LoopBack project directory, start the LoopBack application; otherwise, start the Micro Gateway. Important: IBM API
Connect
Micro Gateway is deprecated in IBM API
Connect Version 5.0.8 in favor of DataPower Gateway. From 1 April 2020, Micro Gateway, and associated toolkit CLI commands, will no longer
be supported. Existing users can migrate their API definitions to IBM
DataPower Gateways. For information on supported API policies, see
Built-in
policies.
|
None |
|
Stop the specified service or all services. | None |
|
Opens the API Explore tool. Shows the operations, definitions, and documentation for all of
the APIs that are contained in the project directory. To specify a particular API, include the name
of the API in the command, for
example:
|
Option:
|
Managing artifacts and publishing to the cloud
Command | Description | Sub-commands |
---|---|---|
apic apps |
List, manage, or publish applications. Default sub-command is
|
|
apic apis |
List and manage APIs in a Catalog or Space.Stability: prototype Default sub-command is |
|
apic catalogs |
List and manage Catalogs. |
|
![]() apic devapps |
List and get information about consumer applications. Default sub-command is
|
|
apic drafts |
List and manage APIs and Products in drafts. Default sub-command is
|
|
apic login |
Log in to API Manager. | None. Specify server and credentials with the required flags:
![]() |
apic logout |
Log out from API Manager. | None. Specify server with the required flag:
|
![]() apic members |
List members in an organization. Stability: prototype |
None |
![]() apic orgs:get |
Display information on a consumer or provider organization. Use --type
provider|consumer to specify either provider or consumer organization. |
|
apic organizations
|
List and get information about organizations. Default sub-command is Note: The
organizations command available in early releases is deprecated in favor
of orgs . |
|
apic policies |
List and manage policies in a Catalog. Default sub-command is
|
|
apic publish |
Publish a Product and its referenced APIs to a Catalog.
|
None. This is an alias for |
apic products |
List and manage Products in a Catalog. Default sub-command is
|
|
![]() apic spaces |
List and manage Spaces
contained in a Catalog. Default sub-command is |
|
![]() apic subscriptions |
List and manage subscriptions in a Product or a Catalog. Default sub-command is
|
|