REST Connector

This connector enables communication with external web services using HTTP REST ("Representational State Transfer") protocol.

Settings


Name

Refers to the unique identifier.

Type
Restrictions

input Text

  • must consist of letters (A-Z or a-z), digits (0-9), underscores (_), or dollar signs ($). However, a class name cannot start with a digit and dollar sign ($)

  • Unique per folder

  • Mandatory

  • Min length: 1

  • Max length: 255


Base URL

Refers to the fundamental endpoint that serves as the starting point for all API requests made through that connector. This base URL typically represents the root URL of the RESTful API you are connecting to.

Type: global variable

Example:

https://api.example.com/users/{id}/address

Base URL: https://api.example.com

Base URL should be defined as global variables. This enables the redefinition of values for new deployments.

Global variables allow the definition of different values for development, test, pre-production, and production environments.


Description

Provides additional information about the connector itself. This description is often used to document the purpose, functionality, usage instructions, or any other relevant details about the connector.


Services

Facilitates interaction with RESTful APIs. This service abstracts away the complexities of HTTP communication and provides a simplified interface for making requests to remote APIs and handling responses.

Settings

URL

Refers to a URL that is specified relative to a connector base URL. When making requests to a RESTful API, the relative URL is appended to the base URL to form the complete endpoint for the API request.

Type: input text - string

Example:

https://api.example.com/users/{id}/address

URL: /users/{id}/address


Method

Defines the action to be performed on a resource identified by a URL. These methods are part of the HTTP protocol and provide a standardized way for clients to interact with resources on a server. HTTP methods in RESTful services are:

  1. GET: The GET method is used to retrieve data from the server. It should be idempotent, meaning that making the same request multiple times should have the same effect as making it once.

  2. POST: The POST method is used to send data to the server to create a new resource. It is not idempotent, meaning that making the same request multiple times may result in different resources being created.

  3. PUT: The PUT method is used to update an existing resource on the server. It should be idempotent, meaning that making the same request multiple times should have the same effect as making it once.

  4. DELETE: The DELETE method is used to delete a resource from the server. It should be idempotent, meaning that making the same request multiple times should have the same effect as making it once.

  5. PATCH: The PATCH method is used to apply partial modifications to a resource. It is typically used when only a subset of the resource's properties need to be updated.

  6. HEAD: The HEAD method is similar to GET but is used to retrieve only the headers of a response, without the body. It is often used to check the status of a resource without downloading its entire content.

  7. OPTIONS: The OPTIONS method is used to retrieve information about the communication options available for a resource, such as supported HTTP methods and headers.

Type: select


Request

Refers to the format and content of the data that a client sends to the server when making a request. The request structure typically consists of various properties or components that convey information about the client's intent, the desired operation, and any data associated with the request.

  1. Use EmptyRequest structure for the empty payload

  2. Use FormData structure for multipart/form-data request

  3. Use File structure for application/octet-stream

  4. Use String structure for text/plain and other text/*

Type: structure selector


Response

Refers to the format and content of the data that the server sends back to the client in response to a request. The response structure typically consists of various properties or components that convey information about the outcome of the request, the requested resource, and any additional metadata.

  1. Use EmptyResponse structure for the empty response

  2. Use FormData structure for multipart/form-data request

  3. Use File structure for application/octet-stream

  4. Use String structure for text/plain and other text/*

  5. Custom structures for application/json

Use JsonObject structure for generic responses

Type: structure selector


Error response

Refers a standardized structure to convey information about encountered errors or exceptions during the processing of a request. This structure typically includes various properties or components that provide details about the error, enabling the client to understand the nature of the problem and take appropriate action.

The error response contains information only if the HTTP status is not 'OK'. (HTTP status: 2XX)

Use JsonObject structure for generic responses

Type: structure selector


Path parameters

Path parameters are dynamic segments within the URL endpoint that are used to identify and retrieve specific resources. They are part of the URL path and are specified by placing them within curly braces {}. Path parameters provide a way to pass variable values to the server in the URL itself, allowing clients to interact with resources in a flexible and expressive manner.

Each parameter has two properties:

Example:

https://api.example.com/users/{id}/address

Parameter: id

  • name - id

  • type - Integer


Request parameters

Refer to the data sent by the client to the server as part of an HTTP request. These parameters are used to provide additional information to the server, such as specifying the operation to perform, filtering data, or providing input for processing.

Each parameter has two properties:

Example:

https://api.example.com/users/{id}/address?limit={limitValue}&orderBy={orderValue}

Parameter: limit

  • name - limitValue

  • type - Integer

Parameter: orderBy

  • name - orderValue

  • type - String


Headers and cookies

Headers and cookies should be defined as properties of the REST Service Executor node.

Last updated