Test custom connector

After you have configured an action, test the connector's ability to interact with the target API by executing real API calls.

Prerequisites

  • Ensure that you have the Create/Edit custom connector packages permission.
  • You must have created atleast one action in the connector to test its functionality.

During testing, the connector sends a request to the specific endpoint defined in the action and parses the response received from the API.

Procedure

  1. Log in to your Control Room.
  2. Navigate to Manage > Packages.
  3. On the Packages page, click the Connectors tab.
  4. Open a connector.
  5. Select an action, click the Test tab.
  6. Enter the request parameters or modify the request body.
  7. Click Test operation. The following example video will walk you through testing endpoints using the Pet Store sample API (https://petstore.swagger.io/). You can import the YAML source from https://petstore.swagger.io/v2/swagger.yaml. The video demonstrates how to test two functionalities:
    1. Adding a New Pet:
      • Endpoint:
        POST  https://petstore.swagger.io/v2/pet
      • Headers: By default, Content-Type: application/json and Accept: application/json are set.
      • Request Body: You can customize the request body with any valid pet information. Here's a sample structure: JSON
        {
          "id": 1001,
          "category": {
            "id": 0,
            "name": "dog"
          },
          "name": "Pluto",
          "photoUrls": [
            "string"
          ],
          "tags": [
            {
              "id": 0,
              "name": "string"
            }
          ],
          "status": "available"
        }
    2. Finding Pets by Status:
      • Endpoint:
        GET  https://petstore.swagger.io/v2/pet/findByStatus?status=available
        (you can replace available with other valid statuses like pending or sold)
      • Headers: By default, Accept: application/json is set.
    Note:

    Uploading files within connector actions is currently not supported during the testing phase. This functionality becomes available after you publish your action.

    The API will return a response code and response body.