API development and management commands
A summary of the core commands in the IBM® API Connect developer toolkit.
Authenticating
apic login
command to authenticate to an API
Manager service, and the
apic logout
command to remove your local authentication credentials.For full details on how to log in to your management server from the CLI, see Logging in to the management server.
Configuring the command-line tool to use TLS certificates
API Manager uses TLS profiles to secure data transmission. For information on how to create a TLS profile in API Manager, see TLS profiles.
To configure the toolkit command-line tool to use certificates to communicate with an API Manager that has TLS profiles that are enabled, follow these steps:
For more information about the NODE_EXTRA_CA_CERTS environment variable, see Node.js documentation.
Creating and managing local files
You create and work with API and Product definition YAML files locally before you stage them to API Manager.
To create a local API definition file, use the apic create:api
command. To
create a local Product definition file, use the apic create:product
command.
Use the apic apis
and apic products
commands to list API
Manager artifacts of the
specified type.
To validate the syntactical correctness of a local API or Product definition file, use the
apic validate
command.
To create a draft API in API
Manager from a local API or
Product definition file, use the apic draft-apis:create
and apic
draft-products:create
commands, respectively.
$ref
field to reference a fragment of OpenAPI code that is defined
in a separate file, the
$ref
field is replaced with the contents of the target file before an API is
validated, created in draft, staged, or published. For more information, see Using $ref to
reuse code fragments in your OpenAPI
files.Working with Catalogs and Spaces
To create a Catalog, use the apic catalog:create
command. To view information on
a Catalog, use the apic catalog:get
command; to list all Catalogs that are
contained in organizations that the currently authenticated user is a member of, use the
apic catalogs
command.
You can use a Space to partition a Catalog so multiple teams can manage Products and APIs independently in a single Catalog. A Space is conceptually like a subcatalog, except that Products and APIs in all Spaces in a given Catalog are published to the same developer portal. For more information about Spaces, see Using syndication in IBM API Connect.
apic catalogs:set catalog_name --spaces enabled
apic spaces
commands to create and
manage Spaces: apic spaces
- List Spaces contained in a Catalog.apic:spaces create
- Create a Space in a Catalog.apic:spaces get
- Get information on a Space in a Catalog.apic:spaces set
- Set information on a Space in a Catalog.apic:spaces delete
- Delete a Space in a Catalog.
Command summary
The following tables summarize apic
commands for API development and management.
Command | Description | Subcommands |
---|---|---|
apic config |
List and manage configuration variables. For more information, see Using configuration variables. With no subcommand, lists values of defined configuration variables. |
|
apic create |
Create a draft API or Product definition YAML file. |
|
apic extensions |
Manage OpenAPI
extensions in a Catalog. With no subcommand, lists the extensions in the production Catalog. |
|
apic login |
Log in to API Manager. | None. Specify server and credentials with the required flags:
For full details on how to log in to your management server from the CLI, see Logging in to the management server. |
apic logout |
Log out from API Manager. | None. Specify server with the required flag:
You can append the port number to the server name if it is not the default value of 443. |
apic validate |
Validate API or Product definition YAML file. | None |
Command | Description | Subcommands |
---|---|---|
apic apis |
List and manage APIs that are staged or published to Catalog or Space. Default
subcommand is |
|
apic apps |
List and manage developer applications that are registered in a consumer
organization. Default subcommand is |
|
apic catalogs |
List and manage Catalogs in a provider organization. Default subcommand is
|
|
apic catalog-settings |
Manage the configuration settings for a Catalog |
|
apic drafts |
List and manage the draft API and Product definitions in a provider organization. Default
subcommand is |
|
apic draft-apis |
List and manage the draft API definitions in a provider organization. Default subcommand is
|
|
apic draft-products |
List and manage the draft Product definitions in a provider organization. Default
subcommand is |
|
apic members |
List and manage the members of a provider organization, consumer organization, Catalog, or
Space. Default subcommand is |
|
apic member-invitations |
List and manage member invitations. A member invitation is created when a user is invited to be a member of a provider organization, consumer organization, Catalog, or Space. Default
subcommand is |
|
apic orgs |
List and manage provider organizations, and the admin organization. Default subcommand is
|
|
apic org-settings |
Manage settings for provider organizations, and the admin organization. |
|
apic policies |
List and manage policies in a Catalog. Default subcommand is
|
|
apic products |
List and manage Products that are staged or published to Catalog or Space. Default
subcommand is |
|
apic identity-providers |
View information about identity providers. |
|
apic spaces |
List and manage Spaces contained in a
Catalog. Default subcommand is |
|
apic subscriptions |
List and manage subscriptions in a Product or a Catalog. Default subcommand is
|
|
Command | Description | Subcommands |
---|---|---|
apic consumer-orgs |
Manage consumer organizations |
|
apic consumer-org-settings |
Manage consumer organization settings |
|
apic groups |
Manage groups |
|
apic invitations |
Manage invitations. An invitation is created when a user is invited to be the owner of a provider organization, consumer organization, Catalog, or Space. |
|
apic member-invitations |
Manage member invitations. A member invitation is created when a user is invited to be a member of a provider organization, consumer organization, Catalog, or Space. |
|
apic members |
|
|
apic registrations |
|
|
apic role-defaults |
|
|
apic roles |
|
|
apic tasks |
|
|
apic user-registries |
|
|
apic user-registry-settings |
|
|
apic users |
|
|
apic test |
Test your APIs |
|