mqsipushapis command

Use the mqsipushapis command to create or update the definition of one or more deployed REST APIs on IBM® API Connect.

Purpose

You can use the mqsipushapis command to push (export) the definition of one or more deployed REST APIs into IBM API Connect. If you want to push a single deployed REST API to IBM API Management Version 4, you can use the IBM Integration Toolkit, as described in Pushing a REST API to IBM API Management or IBM API Connect by using the IBM Integration Toolkit. Support for pushing multiple REST APIs is provided for IBM API Connect Version 5 and later.

You can use IBM API Connect to manage and publish APIs. It provides additional features such as monitoring and fine-grained control over access and workload management, such as the ability to control the number of requests per second for a given client application. IBM API Connect works in conjunction with an IBM DataPower® Gateway appliance; IBM API Connect pushes configuration to the IBM DataPower Gateway, which in turn proxies the requests back to the IBM Integration Bus integration server that hosts the deployed REST API.

Syntax

Read syntax diagramSkip visual syntax diagrammqsipushapisintegrationNodeSpec -e  integrationServerName -t apiConnectHost -g apiConnectPort -u apiConnectUser -a apiConnectPassword  -o apiConnectOrganization  -r apiConnectProductTitle  -k restAPIs -c apiConnectProductCatalog -d apiConnectProductName -s apiConnectProductVersion -x httpInboundProxyHost -y httpsInboundProxyHost -v traceFileName -w timeoutSecs
integrationNodeSpec
Read syntax diagramSkip visual syntax diagram integrationNodeName  -n integrationNodeFileName -i ipAddress -p port -i ipAddress -p port

Parameters

integrationNodeSpec
(Required) You must specify at least one parameter to identify the target integration node for this command, in one of the following forms:
integrationNodeName
This parameter identifies the name of a specified integration node. To connect to a remote integration node, you must also specify -i and -p.
-n integrationNodeFileName
This parameter identifies the name of a .broker file that contains the connection details for a local or remote integration node. Include the location (path) and file name when you specify this parameter. You must ensure that the location is accessible when you run this command.

Use this option if multiple users want to connect to the same integration node, or if you are using advanced connection parameters such as SSL. To learn more about creating and using a .broker file, see Connecting to an integration node by creating a .broker file.

If you want to run a command that uses SSL to administer a remote integration node over a secured channel, you must specify the keystore and truststore password for the connection that is using the IBM_JAVA_OPTIONS environment variable. For more information, see Resolving problems when running commands.

-i ipAddress, -p port
These parameters identify the connection details for the integration node.

Use this option for connections to remote integration nodes that do not require advanced connection parameters.

If you are connecting to a remote integration node, you can additionally prefix integrationNodeName to explicitly set which integration node to connect to. You cannot use -n integrationNodeFileName in the same command.

Parameters that you omit assume default values:

  • -i ipAddress: The host name or IP address of the computer on which the integration node is running. If you do not specify this parameter, a value that represents the local computer is used.

    If you want to connect to a secured integration server as a specific user, provide the security credentials as a URI in the following format: tcp://user:password@hostname. If your password contains URI Reserved characters, you must convert these characters to the percent-encoded format. For more information, see A correct URL and password returns error BIP1939 when you attempt to connect to a remote host name in Resolving problems when running commands.

  • -p port: The port on which the web user interface HTTP connection listener is listening. If you do not specify this parameter, the value 4414 is used.
-e integrationServerName
(Required) The name of the integration server where the REST APIs are deployed.
-t apiConnectHost
(Required) The host name of the IBM API Connect system.
-g apiConnectPort
(Required) The port of the IBM API Connect system. This value must be an integer between 0 and 65535.
-u apiConnectUser
(Required) The user name that is being used to connect to IBM API Connect. You can specify a blank value for this parameter, in which case the password that you specify is treated as an API key.
-a apiConnectPassword
(Required) The password that is being used to connect to IBM API Connect.
-o apiConnectOrganization
(Required) The name of the IBM API Connect organization where the APIs will be pushed.
-r apiConnectProductTitle
(Required) The title of the IBM API Connect product to be created or updated and then staged.
-k restApis
(Required) The names of the APIs that will be pushed. You can specify multiple API names, which must be separated by a colon (:).
-c apiConnectCatalogTitle
(Optional) The title of the IBM API Connect catalog where the product will be staged. If you do not specify this option, the product will not be staged.
-d apiConnectProductName
(Optional) The name of the IBM API Connect product to be created or updated and then staged. If you do not specify this option, the name of the product will be derived from the title. The name must use only numbers (0-9), letters (a-z A-Z), dashes (-), or underscores (_).
-s apiConnectProductVersion
(Optional) The version of the IBM API Connect product to be created or updated and then staged. If this parameter is not specified, the version number defaults to 1.0.0.
-x httpInboundProxyHost
(Optional) The host name and port of the proxy that receives the inbound HTTP request for the REST API that is running on IBM Integration Bus. The host name and port are separated by a colon (:). If no value is specified, the host name and HTTP port of the integration server will be used.
-y httpsInboundProxyHost
(Optional) The host name and port of the proxy that receives the inbound HTTPS request for the REST API that is running on IBM Integration Bus. The host name and port are separated by a colon (:). If no value is specified, the host name and HTTPS port of the integration server will be used.
-v traceFileName
(Optional) Sends internal debug trace information to the specified file.
-w timeoutSecs
(Optional) The length of time (in seconds) that the utility waits to ensure that the command has completed. The default value is 60.

Responses

In addition to standard command responses, the following responses are returned by this command:
  • BIP9350 Push REST APIs to an IBM API Connect system.
  • BIP9351 The value specified for the IBM API Connect port is not a number.
  • BIP9352 The organization could not be found in IBM API Connect.
  • BIP9353 An error occurred while connecting to IBM API Connect using the mqsipushapis command.
  • BIP9354 The catalog could not be found in the specified organization in IBM API Connect.
  • BIP9355 The specified product is already staged for the organization in IBM API Connect. It will be replaced.
  • BIP9356 Successfully created the API in IBM API Connect.
  • BIP9357 Successfully replaced the specified API in IBM API Connect.
  • BIP9358 Successfully created the product and added the API to it in IBM API Connect.
  • BIP9359 Successfully added the API to the product in IBM API Connect.
  • BIP9360 Successfully staged the product to the catalog in IBM API Connect.
  • BIP9361 The REST API is not deployed to the specified integration server.
  • BIP9362 The product could not be staged in IBM API Connect due to an earlier error.
  • BIP9363 The selected installation of IBM API Connect is not supported by this command.
  • BIP9364 IBM API Connect operation failed.
  • BIP9365 Unable to establish a connection to IBM API Connect on the specified port.
  • BIP9366 The product was not staged in IBM API Connect as staging was not requested when the command was run.
  • BIP9367 More than one catalog by the specified name was found in the organization in IBM API Connect.
  • BIP9368 The specified catalog was found in the organization in IBM API Connect but it was not of type 'Sandbox' so it cannot be used.
  • BIP9369 The specified product and version were found in the specified organization in IBM API Connect; however, it has a title that is different from the title specified in the mqsipushapis command.
  • BIP9370 The mqsipushapis command could not complete.

Examples

Always enter the command on a single line; in some examples, line breaks have been added to enhance readability.

Push a single API called myapi to an IBM API Connect product:
mqsipushapis IBNODE -e default -t mysystem -g 443 -u testuser -a mypassword -o myOrg –c "MyCatalog" -r "MyProduct" –s 1.0.0 -k myapi
Push APIs called myapi1, myapi2, and myapi3 to an IBM API Connect product:
mqsipushapis IBNODE -e default -t mysystem -g 443 -u testuser -a mypassword -o myOrg –c "MyCatalog" -r "MyProduct" –d "ProdName" –s 2.0.0 -k myapi1:myapi2:myapi3