OpenAPI
You can create a custom OpenAPI connector and import OpenAPI files in JSON or YAML format. Currently, OpenAPI 2.0 and 3.0 are supported.
The OpenAPI connector supports multiple authentication modes, connection types, and custom actions and action parameters.
Creating an OpenAPI Connector
- Log in to the new ROMA Connect console.
- In the navigation pane on the left, choose Connector. On the page displayed, click the Custom Connector tab.
- Click New Connector. The New OpenAPI Connector dialog box is displayed.
- Select a file to be imported.
Table 1 Description for file importing Parameter
Description
Select an OpenAPI file.
- Select the OpenAPI version. You can select 2.0 or 3.0.
- Click Download Template to download the OpenAPI template file of the corresponding version.
- Modify the template file based on service requirements and upload the file.
Authentication Type
Select the authentication type required when the connector is used to create a connection. The authentication type is extracted from the security mode in the OpenAPI specification.
The template file for version 3.0 is used as an example. The following authentication types are available:
- api_key: API key authentication. Authentication parameters can be modified in this case.
- x-bfs-iam-token: IAM user token authentication.
- x-bfs-iam-aksk: IAM user AK/SK authentication.
- Basic: Basic authorization.
- None: No authentication is required.
Action
Select the action to be configured. The action is extracted from the API in the OpenAPI specification. After a connector is generated, you can add a trigger.
- Configure basic information.
Table 2 Parameter description Parameter
Description
Icon
Icon for the custom connector.
Click Upload Icon to upload an icon from the local host. If this parameter is not uploaded, a default icon is generated based on the initial letter of the connector name.
Name
Enter the connector name.
Tag
Enter a tag for the connector.
Type
Select a connector type.
- HTTP
- Database
- Huawei Cloud service
- SaaS application
- Other
- Message system
Description
Enter the description of the connector to identify it.
- Click Create and Configure Details. The action configuration page is displayed.
- Click . In the pop-up box, configure action information and click OK.
Table 3 Parameter description Parameter
Description
Name
Enter the action name.
Type
Select an action type.
- GET
- POST
- PUT
- DELETE
Path
Enter a path, for example, /history.
Description
Enter the action description.
- After the action is added, configure action parameters.
Table 4 Parameter description Parameter
Description
Input Parameter
Options are Query, Header, and Path.
- Name: Enter the parameter name.
- Display Name: Enter the parameter display name.
- Type: Select the parameter type. Options are string, integer, and number.
- Mandatory: Whether a parameter is mandatory.
- Description: Enter the parameter description.
Click in the Operation column to add a parameter.
Body
Configure request body parameters. When the action type is POST, PUT, or DELETE, request body parameters are required.
- Name: Enter the parameter name.
- Display Name: Enter the parameter display name.
- Type: Select the parameter type. Options are object, string, integer, and number.
- Mandatory: Whether a parameter is mandatory.
- Description: Enter the parameter description.
Click in the Operation column to add a parameter.
NOTE:By default, the name of the first parameter is a root node, and the parameter type is object. Both of them cannot be modified.
Return Value
Configure return value parameters. Click in the Return Value column and add different return values in the drop-down list.
- Name: Enter the parameter name.
- Display Name: Enter the parameter display name.
- Type: Select the parameter type. Options are object, array, string, and integer.
- Mandatory: Whether a parameter is mandatory.
- Description: Enter the parameter description.
Click in the Operation column to add a parameter.
NOTE:By default, the name of the first parameter is a root node, and the parameter type is object. Both of them cannot be modified.
- Click Save.
Creating an OpenAPI Connection
- Log in to the new ROMA Connect console.
- In the navigation pane on the left, choose Connector. On the page displayed, click the Custom Connector tab.
- Click New Connection in an OpenAPI connector.
- In the pop-up box displayed, configure the information.
Table 5 Parameter description (Basic authentication) Parameter
Description
Name
Enter the connection name.
URL
Enter the connection address.
Username
Enter a username.
Password
Enter the password.
Description
Enter a description.
In this example, the OpenAPI connector uses the basic authentication. OpenAPI connectors using other types of authentication require corresponding authentication parameters when creating a connection.
If a custom connector uses no authentication, no connection is required.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot