Creating an API Product

Overview

You can combine APIs of different ROMA Connect instances in the same region into an API product and share the API product with other users under your account.

Prerequisites

  • An API product and the ROMA Connect instances to which APIs belong must be in the same project in the same region.
  • Only APIs published in the RELEASE environment can be added to an API product.

Creating an API Product

  1. Log in to the ROMA Connect console and choose Assets in the navigation pane.
  2. Click Catalog Management in the upper right corner of the page.
  3. On the My Products tab page, click Create Product.
  4. In the Create Product dialog box, set product parameters and click Create.
    Table 1 Parameters for creating a product

    Parameter

    Description

    Region

    Region where ROMA Connect is being located.

    Project

    Select the project to which the API product belongs.

    Product Name

    Enter an API product name. It is recommended that you enter a name based on naming rules to facilitate search.

    Version

    Enter the version number of the API product.

    Logo

    Click Change and select and upload the image of the API product.

    Description

    Enter a brief description of the API product.

    After an API product is created, you need to add APIs to the product.

Adding APIs to a Product

  1. On the My Products tab page, click the name of the API product to access its details page.
  1. In the Included APIs area, click Add.
  2. In the Add API dialog box, select the APIs to add to the API product and click OK.
    • You can select APIs of only one integration application at a time. If you need to select APIs of another integration application, repeat this step.
    • If the API configuration information is modified in a ROMA Connect instance, you can click Synchronize on the right of the API in the API list of the API product to manually synchronize the latest API configuration to the API product after the API is published again.
      Table 2 Parameters for adding an API

      Parameter

      Description

      ROMA Instance

      Select the ROMA Connect instance to which the API belongs.

      Integration Application

      Select the integration application to which the API belongs.

      APIs

      Select the API to be added to the API product.

      • You can view and select only the APIs that have been published in the RELEASE environment.
      • You can add a maximum of 100 APIs to each product.
  3. In the Included APIs pane, click Edit API Definition on the right of the API.
  4. On the Edit API Definition page, edit the API definition information.
    1. Define request parameters/examples and click Next: Define Response Parameter/Example.
      • In the Request Parameter area, click Add to add the request parameters to the API.
        Table 3 Request parameter information

        Parameter

        Description

        Name

        Enter the name of a request parameter. If Location is set to PATH, the parameter name must be the same as that in URI.

        Type

        Select the data type of the request parameter.

        Location

        Select the position of the request parameter in an API request. This parameter can be set only if Type is set to STRING, NUMBER, or BOOLEAN. If Type is set to another value, this parameter has a fixed value of BODY.

        Example

        Enter an example of the request parameter value.

        Mandatory

        This parameter specifies whether the request parameter is mandatory in an API request.

        Description

        Enter a brief description of the request parameter.

        Parent Parameter

        This parameter specifies whether the request parameter is a parent parameter. This parameter can be set only if Type is set to OBJECT or ARRAY[OBJECT]. If Type is set to another value, this parameter has a fixed value of No.

        If Parent Parameter is set to Yes, you need to add a child parameter to this request parameter.

      • In the Request Examples area, add the request example information of the API.
        1. Click Add.
        2. In the displayed dialog box, enter a request example name and click OK.
        3. Select the added request example name on the left and enter the example in the Content text box on the right.
        4. Repeat 5.a.i to 5.a.iii to add multiple request examples.
    2. Define response parameters/examples and click Next: Define Error Code.
      1. Click on the right of HTTP Status Code.
      2. In the Add HTTP Status Code dialog box, enter a status code and click OK.
      3. Select the added status code on the left and enter the API response information of the status code on the right.
        • In the Response Parameters area, click Add to add API response parameters for the status code.
          Table 4 Response parameter information

          Parameter

          Description

          Name

          Enter the name of a response parameter.

          Type

          Select the data type of the response parameter.

          Location

          Select the position of the response parameter in an API response. This parameter can be set only if Type is set to STRING, NUMBER, or BOOLEAN. If Type is set to another value, this parameter has a fixed value of BODY.

          Example

          Enter an example of the response parameter value.

          Mandatory

          This parameter specifies whether the response parameter is mandatory in an API response.

          Description

          Enter a brief description of the response parameter.

          Parent Parameter

          This parameter specifies whether the response parameter is a parent parameter. This parameter can be set only if Type is set to OBJECT or ARRAY[OBJECT]. If Type is set to another value, this parameter has a fixed value of No.

          If Parent Parameter is set to Yes, you need to add a child parameter for this response parameter.

        • In the Response Example area, enter the API response example corresponding to the status code in the Content text box.
      4. Repeat 5.b.i to 5.b.iii to add multiple status codes.
    3. Define error codes.

      Click Add and add an error code for the API.

      Table 5 Error code information

      Parameter

      Description

      Error Code

      Enter the error code to be displayed upon an API calling failure.

      Description

      Enter the error description.

      Solution

      Enter a solution for the error code.

    4. Click Save to complete editing API definition.