Importing APIs through an API Design File
ROMA Connect allows you to import APIs through an API design file. API definition files in YAML and JSON formats can be imported, and the file content must comply with the Swagger 2.0 specifications.
Prerequisites
- Supplement the extended Swagger definition of APIs in the API file to import.
- Ensure that the quotas of APIs and API groups meet the requirements before importing APIs.
- If you choose New Group when importing an API, the value of the info.title field in the API definition file is used as the API group name. Before importing an API, do not change the value of the info.title field.
Importing APIs
- Log in to the ROMA Connect console. In the navigation pane on the left, choose Resource. On the displayed page, click the instance to access its console.
- In the navigation pane on the left, choose API Connect > APIs. In the upper right corner of the page, click Import APIs.
To import APIs, you can also choose API Connect > API Groups. In the upper right corner, click Create API Group and select Import API Design File.
- Select a local Swagger file in YAML or JSON format.
- Configure API import information.
Table 1 Importing APIs Parameter
Description
Import To
Select the method for importing APIs.
- New group: Import APIs to a new API group. If you select this option, the system automatically creates an API group and imports the APIs to this group.
- Existing group: Select an existing API group and add the imported APIs to this group.
Scope
Mandatory for Import To set to New group.
Specify who can view the API group.
- Integration application: An API group belongs to a specific integration application. Only users who have permissions for this application can view and perform operations on the API group.
- All: All users in the current instance can view and perform operations on the API group.
Integration Application
Mandatory for Scope set to Integration application.
Select the API group's integration application.
Basic Definition Overwrite
Available for Import To set to Existing group.
This parameter specifies whether to overwrite the existing APIs when the imported APIs conflict with those in the existing API group.
Extended Definition Overwrite
Specifies whether to overwrite the existing extended information, such as custom authentication, request throttling policy, and access control policy, when there is a conflict between the imported API and ROMA Connect.
- Enable: The existing extended information is overwritten with that defined in the imported file.
- Disable: The existing extended information is used, rather than that in the imported file.
Parameter Import
Check the content of the imported file.
- Check for valid format.
- Format the file.
- Download the file to the local host.
- Enable Mock to use a mock backend service for importing APIs.
- Click Import Now.
To unify request and backend information of the imported APIs before the import, click Configure Global Settings and configure the information as prompted. Click Submit to import the APIs.
- In the dialog box that is displayed, choose whether to publish the APIs now. If you select Now, select the environment you want to publish the APIs in.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.