Qntrl Web Services | Qntrl Online Help | Create Inbound REST APIs in Qntrl | Custom Secure Endpoints

Configure Inbound REST API

Qntrl’s Inbound REST Web Service allows you to create custom API endpoints that external users or systems can call to perform specific actions inside Qntrl. When a user triggers the API, Qntrl receives the request and processes it based on the configured logic in a Function script or Circuit.

One of the key features of Inbound REST is that customers can white-label their API URLs to reflect their own domain names, masking the Qntrl domain.

Key Highlights  

  • Custom Endpoints: Create REST API URLs specific to your workflows.
  • Secure Access: Support for OAuth and API Key authentication.
  • Smart Logic: Trigger custom scripts (Functions) or automated flows (Circuits).
  • White-labeling: Mask Qntrl URLs with your domain. Example: https://<your-domain>/webservice/<org_id>/<endpoint>
 

How It Works  

  1. External system sends API request.
  2. Qntrl receives and authenticates the request.
  3. Configured logic is executed via Function or Circuit.
  4. Response is sent back, and related actions are triggered inside Qntrl.

Let’s walk through the steps to configure an Inbound REST request.

Create a Module     

Each inbound REST API is grouped under a module, allowing you to organize related endpoints, such as those for jobs, layouts, or custom processes.
To create a module:
  1. Navigate to  (settings>> WEB SERVICES >> Inbound >> Select REST.
  2. Click New Inbound REST.
  3. Fill in the following fields:
    1. Name: Provide a logical name for the module (e.g., Jobs, Layouts). This helps group related APIs together.
    2. Base URI: Define the base path for the APIs in this module (e.g., /card). This prefix will appear in all API endpoints created under this module.
    3. Authentication Type: Select the authentication type.
      1. OAuth: Secure the API with OAuth scopes or global tokens for the organization.
      2. API Key: Token-based authentication.
    4. Description: Add a brief description of the module or the purpose of the APIs it contains.
  4. Click Create.

      


Once the module is created, a configuration window will open to define the API endpoint details.

 

Configure the API Endpoint     

In the open configuration window, you can enter the details directly if this is your first Inbound Resource. To add more later, click New Inbound Resource at the top-right corner of the page and fill in the following details to set up your API.
  • Name: Provide a name for the API endpoint.
  • URL: Define the endpoint path (e.g., /create). This will be appended to the module’s base URI.
  • Preview: The system auto-generates the complete URL based on the base URI and endpoint path.
    Example: https://qntrl.com/webservice/668909960/card/create
  • Method: Select the HTTP method — GET, POST, PUT, DELETE, OPTIONS, or PATCH.
  • Resource Type: Choose the type of handler to execute when this API is called.
    • Function: Use a function script to process the request.
      • Select an existing REST-type function or create a new one.
      • If creating a new function, write the script in the editor. The function will automatically be added to the Functions module with a generated name (you can rename it later).
      • Inside the function script, you can define how the incoming request should be handled and what response should be returned.
    • Circuit: Trigger a predefined Circuit when the API is hit. Circuits do not support file handling or response configuration (like success/error messages).
  • Resource: Select the specific function or circuit to associate with the endpoint.
      

 

Function vs Circuit: How Resource Execution Works     

Function Resource

When a function is selected as the resource:
  • The script can access and process request parameters, headers, body content, and file uploads.
  • You can define and return custom success or error responses with messages and HTTP status codes.
  • Files sent in the request can be handled as binary inputs.
  • This is ideal for use cases that require input validation, dynamic processing, or data manipulation.
 

Circuit Resource

When a circuit is selected as the resource:
  • The API triggers a predefined Qntrl Circuit.
  • The circuit receives the request parameters as input data, but cannot manipulate the request or perform validations.
  • File handling is not supported.
  • Response customization (e.g., HTTP status codes, custom messages) is not available.
 

Configure Request Components     

You can define inputs and validations for requests to this endpoint.
  • Request Params: Define the parameters to be passed as query or path values.
    • Param Name: Name of the input parameter.
    • Type: Select the data type (e.g., String, Number).
    • Allowed Regex: Set restrictions for the parameter values.
    • Min Length: Define the minimum length of the input.
    • Max Length: Define the maximum length of the input.
    • Default Value: Fallback value if input is not provided.
    • Mandatory: Specify whether the parameter is mandatory. If a mandatory parameter is missing, an error will occur.
      
  • Request Headers: Define custom headers for additional validation:
    • Configuration options are the same as request parameters.
  • Request Body: Choose the body format that best suits your API:
    • None: No request body.
    • Raw: Free-form data (e.g., JSON, XML).
      • Supports only Min/Max length and Mandatory validation.
    • x-www-form-urlencoded: Key-value body format (like parameters inside the body).
    • File: Allows binary file uploads (supported only when the resource type is Function.)
  • Select Policy: Control the number of allowed requests using a rate-limiting policy.
    • Select the rate limit policy: Choose an existing policy or click Add New Policy.
    • To add a new policy:
      • Policy Name: Label for the policy.
      • Request Allowed: Max number of requests allowed.
      • Minutes: Time window for rate limit (e.g., 100 per 1 minute).
      • Per IP:
        • Checked: Limit applies per IP address.
        • Unchecked: Limit applies globally.
      • Error Code: Code returned when the limit is exceeded.
      • Message: Define the error message to be sent to the user if the defined limit is reached.
      • Click Save. A new policy will be created.

      

    

Save and Publish     

Once the API endpoint and request components are configured,
  • Click Save to create the endpoint.
  • It will appear on the left side under Resources, where you can edit or delete it anytime.
  • The endpoint is now ready to receive API requests and run the linked function or circuit.
      

Notes
  • If any validation fails for request params, headers, or body, Qntrl will reject the request.

  • Warnings and errors can be handled and returned only when using Function as the resource.

  • Circuits provide only basic automation triggers without detailed input/output control.






Next:


    • Related Articles

    • REST API

      Access Privilege API key can be generated only by the Organization Owner. An API key provides a one-time authentication for triggering API calls in Qntrl. Only the standalone custom functions can be invoked using the API key. Navigate to and select ...
    • Create and configure an Outbound REST API

      Outbound REST Web Services enables users to interact with external web services by sending HTTP requests to retrieve, create, update, or delete data on REST-compliant servers. This functionality is designed to integrate seamlessly with external APIs ...
    • Manage Custom Functions

      Custom functions allow users to develop and execute user-defined functions using Deluge. You can execute simple program snippets to automate processes, or integrate with third-party or Zoho applications. Business Uses for Custom Functions Use Custom ...
    • Configure an Inbound SOAP Web Service

      Inbound SOAP Web Services allow you to create endpoints that external systems can call to interact with your Qntrl instance. When a SOAP request is sent from an external system, Qntrl processes the request and sends back a response based on ...
    • Troubleshooting Outbound REST Web Services

      1. Cannot execute API Make sure all required fields are filled in correctly — this includes the URL, query parameters, headers, and request body. Missing or incorrect values can prevent the API from executing successfully. 2. Unauthorized or ...

    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.