Trigger Workflow via API

Nected enables you to securely trigger a rule from your systems via API for which you can choose to have private authentication using an authentication key.

Note: All production rules must be run securely using an API, but you can choose to run a staging rule either using an API or directly on the Nected platform.

Follow this procedure to trigger a rule using an API:

  1. Test and publish the rule you want to trigger.

  2. Go to the Trigger section of the rule, update the rule trigger settings as needed, and click three dots next to the API base URL. The API Settings window appears.

  3. Use the information on the API settings window to trigger the API using an API platform of your choice, for example Postman.

The following list describes the options on the API settings window:

  1. Authentication – The authentication method for the API. You can either select None (no authentication required) or Private (use an authentication key to trigger the API).

  2. Base URL – The base URL for the rule.

  3. Body Params – Body parameters that you can use to run the API.

    • environment: The default environment is production. You can set up different values based on which Rule you want to test in which environment.

      • Testing an Unpublished/Draft Rule in Staging: If you wish to test an unpublished or draft rule in the staging environment, you can use the API for testing purposes. To do this, set environment: Staging in the Body Parameters. This allows you to evaluate the rule's behavior and functionality before publishing it.

      • Running a Published Rule in Production: When you are ready to execute a rule in a live, real-time production environment, you need to trigger the API with environment: production. This action will activate the rule for real-time decision-making. If you don't pass any environment, it will automatically pick up the production instance.

      • Running a Published Rule in Staging: If you want to run a published rule in the Staging environment, you can do so by using the API with environment: Staging and isPublished: True. This enables you to simulate the rule's behavior without impacting your production processes.

  4. params: This would be as defined in "Add Source" to be passed along to API. You can copy this from the API Settings page and integrate it on your frontend/backend or on any 3rd party apps via HTTP call.

  5. Close the API Settings window. If you did not update the rule, then you do not need to test or publish the rule again.

The default environment is production.

By following these steps and utilizing Nected's API, you can seamlessly integrate your rules with your chosen database, allowing you to make data-driven decisions effortlessly.

Last updated