Adding and removing actions for connectors that are created from OpenAPI docs
If the OpenAPI document that you upload has fewer than 10 actions, all of the actions are automatically selected and available in the left panel. If your OpenAPI document has more than 10 actions and only 10 actions are available in the left panel, you might want to add or remove some of the actions provided.
Adding actions
To add an action for a connector created from an OpenAPI document, complete the following steps:
- From the CDK home page, click the connector that you want to work with. The Actions tab is displayed.
- Notice that the groups and actions are displayed.
- Click Add or remove actions. The Add or remove actions panel is displayed.
- (Optional) Click Available actions. This panel includes all the actions added from the OpenAPI document.
- Select the actions that you want your connector to use.
- Click Apply changes. Go to Step 6.
- (Optional) Click Create an action.
-
(Optional) If you have a CURL command, you can paste it into the bottom field to create an action.
-
If you do not have a CURL command, complete the following fields for the applicable group name:
-
Action name: The name of the action that is displayed to users of your connector.
-
Base path: The location of the action relative to the server URL. The value must start with a leading slash (/). For example,
/{basePath}
. -
Method: Specify how the action is invoked.
-
Group: The name of the group that the action belongs to.
Tip: Any path parameters that are used in the base path are automatically added to the Request tab as path parameters. For instance, if your server URL and base path are
http://localhost.com/user/{user-name}/repos/{repo_name}/issues
then{user-name}
and{repo-name}
are added as path parameters to the Request tab. Also, note that anything in the curly brackets can be modified. For example, you can change{user-name}
to{User name}
.Note: Each connector can have only one base path and method combination. You cannot reuse the same combination in the same connector.
-
-
Click Add action.
-
- A notification is displayed to indicate that the action was updated successfully and the Action details tab is displayed.
- (Optional) In the Action details tab, provide a description of the action in the Description field.
- Notice that the Action type field is populated based on the value you provided for the method in Step 5a.
- In the Server URL field, add the name of the host or the IP address that serves the API. For example,
http://localhost.com
.
Removing actions
To remove an action, complete the following steps:
- From the CDK home page, click the connector that you want to work with.
- Click the Actions tab.
- Click Add or remove actions. The Add or remove actions panel is displayed.
- Select Available actions. This panel includes all the actions added from the OpenAPI document.
- Deselect the actions that you do not want your connector to use.
- Click Apply changes to remove the action.