Publish a draft Product to make the APIs in that Product visible on the Developer Portal for
use by application developers. The syndication feature in IBM®
API Connect means that if Spaces are enabled for a
Catalog, Products can be published only to a Space within that
Catalog.
Before you begin
Ensure that you have a Catalog to stage to in the API
Manager or API Designer user interfaces (UI). For more
information, see Creating
and configuring Catalogs. Note: All references in this topic to a Catalog can also be applied to
Spaces in a Catalog,
unless specified otherwise. For more information about
Spaces, see
Using syndication in API Connect.
To complete the Product management tasks that are described in this topic, you must either
be the owner of the API provider organization, or be assigned permission for the target Catalog or Space.
For
information on configuring Product management permissions for a Catalog or Space, see Creating and configuring
Catalogs or Managing user access in a Space.
About this task
You can complete this task either by using the API Designer UI application, or by using the
browser-based API
Manager UI. Publishing is not available when working offline in API Designer.
You cannot re-publish a Product version to a production Catalog, you must create a new version of
the Product for publication; see Creating a new version of your Product. If Spaces are enabled in a
production Catalog, you cannot re-publish the same Product version to any Space in the Catalog,
neither the same Space nor a different
Space.
You can, however, re-publish a Product version to the Sandbox Catalog, or other non-production
Catalog, for ease of iterative testing. When you re-publish a Product
version to a non-production Catalog, you can choose whether or not to preserve any application
subscriptions; deleting subscriptions can facilitate scripted deployment in a continuous integration
environment, where the re-creation of application subscriptions will be controlled by the
scripts.
If Spaces are
enabled in a non-production Catalog and you re-publish a Product version to a different Space to the one in
which it was previously published, it is removed from the previous Space and published
to the newly specified Space.
Validation of the API definition file occurs during the
staging or publishing process. The following validation occurs:
- Validation against the OpenAPI schema by using the API Dev Tools Swagger Parser
(https://www.npmjs.com/package/@apidevtools/swagger-parser).
- Validation against IBM extension properties.
- Semantic validation, which includes the following types of validation:
- Ensuring that if an OpenAPI is enforced by an API Connect
Gateway, then the
scheme must be HTTPS, or the parameter name for an API key security scheme in the header must be
either
X-IBM-Client-Id
or X-IBM-Client-Secret
.
- Ensuring that if the OpenAPI is not enforced by an
API Connect
Gateway, then a
host
must be provided.
- De-referencing of local references in the definition file (that is, values of
$ref
properties), and ensuring these are valid JSON Pointers within the file.
Note: If the OpenAPI file that defines your
API uses a $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 the product that contains the API is staged or published
(the
$ref
field is supported only if you are using the
API Connect
developer toolkit).
For more information, see Using $ref to
reuse code fragments in your OpenAPI
files.
Procedure
To publish a Product, complete the following steps:
- Optional: If you have accounts on multiple provider
organizations, you can select a new provider organization for staging and publishing from the
Organization menu.
-
In the navigation pane, click
Develop.
- Select the Products
tab.
- You can publish a Product either from the Develop listing page, or
from within the Product itself.
- To publish a Product from the Develop listing page, click the
options menu icon alongside the required Product version, and then select
Publish.
If you are re-publishing a Product to non-production Catalog, and the Product has application
subscriptions, the
Publish option deletes them. To preserve application
subscriptions, click
Publish (Preserve Subscriptions) instead.
Note: If there
are any existing subscriptions to the Product, the
Publish (Preserve
Subscriptions) operation will fail if you remove any consumer organizations or consumer
organization groups from the Product visibility or subscribability settings; you can, however, add
further organizations or groups.
For information on managing visibility and subscribability
settings, see Editing a draft
Product.
For information on consumer organization groups, see Working with
consumer organization groups.
- To publish a Product from within the Product itself, complete the following
steps:
- Click the Product version that you want to work with.
- Click the options menu icon:
- Select Publish.
-
Select the Catalog to which you want to publish the Product. You must have a compatible gateway
type associated with the catalog to proceed, as described in Creating and
configuring Catalogs.
-
If Spaces have been enabled
in the selected Catalog, select the Space that you
require.
Note: The Catalogs that you can select from are those that are defined for the management server and
provider organization that you are connected to.
If you are using the API
Manager user interface, the connection
details are determined by the API
Manager
URL that you open, and the user ID with which you log in. If you are using the API Designer user interface, you provide the
management server details and user ID in the login window that opens when you first launch API Designer; see Logging into API Designer.
For details of
how to create a Catalog in a provider organization, see Creating and configuring
Catalogs.
-
If you want to publish the Product only to selected gateway services, select Publish
to specific gateway services, then select the required gateway services. Only the
gateway services whose type matches the gateway type setting for the Product are listed. For
information on gateway types, see API Connect gateway types.
- The Visibility
and Subscribability sections display the visibility and subscribability
settings that have been configured for the draft Product, but you can modify these before publishing
if required; proceed as follows:
-
In the Visibility section, specify the users that you want the Product
to be visible to. You can choose Public to make the Product visible to all
users, Authenticated to make the Product available to users who have
successfully authenticated, or Custom to specify the consumer organizations
and consumer organization groups that you want the Product to be visible to.
If you select
Custom, use the
Type to add
organizations field to search for the consumer organizations and consumer organization
groups, in the selected Catalog, that you want the Product to be visible to. For information about
how to create and manage consumer organizations and consumer organization groups, see
Administering
Consumer organizations.
-
In the Subscribability section, specify the users that can subscribe to
the Plans in the Product. You can choose Authenticated to make the Plans in
the Product subscribable by users who have successfully authenticated, or
Custom to specify the consumer organizations and consumer organization
groups that can subscribe to the Plans in the Product.
If you select
Custom, use the
Search organizations and
groups field to search for the consumer organizations
and consumer organization
groups, in the selected Catalog, that you want the Product to be subscribable to. If you
selected custom visibility, only the consumer organizations
and consumer organization
groups selected there are available for adding to the custom subscribability list. For
information about how to create and manage consumer organizations
and consumer organization
groups, see
Administering Consumer organizations.
Note:
- If you select custom visibility or subscribability, only 10 search results are displayed in the
selection list for the consumer organizations and consumer organization groups. If necessary, enter
a more specific search string to refine the search.
- If custom visibility or subscribability has already been configured in the draft Product, the
titles that are displayed in the table of selected organizations and groups are derived by taking
the names that are defined in the draft Product and finding the corresponding titles in the Catalog
that has been selected as the publish target.
- Click Publish.
Results
Your Product is published to a Catalog. The state of the Product is shown as
Published in the header of the Product itself, and you can click
Published to see which Catalogs or Spaces the Product is published to.
You can also view the state of the product in the Catalog in API
Manager. If you published the
product from API Designer,
ensure you are logged into API
Manager with the same user
name and password that you used for API Designer. Click
Manage in the API
Manager UI, then select the
required Catalog. The Product is shown with a state of Published.
If your Product is
DataPower® API Gateway compatible, the
following states are available:
- Published-failed
- Retired-in progress
- Published-success
- Deprecated-success
To know more about the status of a product, click the
information
icon next to
the product. A window with the product's state details opens. It shows the plan, subscription, and
product status.
Note: The DataPower Gateway (v5 compatible) products do not
have this feature.
For information about the lifecycle of a product, see The Product
lifecycle.
If approval is required to publish Products in the Catalog, a publish approval request is sent,
and the Product moves to the publishing state; the Product is published in the Catalog when the
request is approved. If approval is not required, the Product is published immediately.
Note: If approval is required to stage Products to the Catalog, a stage approval request is sent.
When the request is approved, the Product moves to the staged state and must be separately published
in the Catalog. For information on publishing a staged Product in a Catalog, see
Publishing a
Product.
For information on configuring Product lifecycle approvals
for a Catalog, see Creating and configuring Catalogs. For information on approving requests, see Approving Product
lifecycle and subscription requests.
If the Product contains no Plans, a Plan called Default Plan is added
automatically to the Product in the Catalog.