REST (Representational State Transfer) is an architectural style for designing distributed systems. It provides a simple and lightweight way to access and manipulate resources over the internet by using a set of well-defined operations such as GET, POST, PUT, and DELETE. To use REST to access resources, ensure that appropriate network access is available by configuring the firewall or network settings.
Provide relevant connection details, such as the endpoint URL, port number, and authentication credentials, to access RESTful web services. Additionally, SSL or other security settings may need to be specified for secure connections. Once the connection is established, the RESTful API can be used to perform various operations on the resources, such as retrieving, creating, updating, or deleting them.
The base URL is the starting point or root of the API endpoint URLs. It typically includes the domain or IP address of the server hosting the API.
The health path is a specific endpoint used to check the health or availability of the API. It provides information about the status of the API service.
Credentials used for authentication to access protected resources in the API. The username and password are usually sent as part of the request, typically using HTTP Basic Authentication.
An endpoint specifically designed to generate a web token (such as JWT - JSON Web Token) used for authentication and authorization purposes. Clients send a request to this endpoint with the necessary credentials, and the server responds with a generated web token.
The request body is the data sent to the web token generation endpoint when requesting a web token. It typically includes the authentication credentials required for token generation.
The key or property in the response from the web token generation endpoint that contains the generated web token. Clients extract this value from the response to obtain the token for subsequent API requests.
When making subsequent API requests that require authentication, the web token is typically included in the request header. The API request token header key is the specific key used in the header to hold the web token value.
The endpoint URL represents a specific resource or action within the API. It is constructed by appending the endpoint path to the base URL.
The HTTP method specifies the type of operation or action to be performed on the resource. Common methods include GET, POST, PUT, and DELETE.
Headers contain additional information about the request or response. They can include metadata, authentication details, or instructions for the server or client. Headers are sent as part of the HTTP request or response.
The request timeout is the maximum time the client will wait for a response from the server. If a response is not received within the specified timeout duration, the client may consider the request unsuccessful.
The request body contains the data sent by the client to the server in the API request. It can include parameters, JSON payloads, or other relevant data required by the API to process the request.
A template is a predefined structure or format for an API request. It serves as a blueprint or example that developers can use as a reference when constructing their own requests, ensuring consistency and correctness in the API calls.
To successfully establish a connection with a REST API, the following parameters must be filled accurately:
| Parameter | Description | Data Type |
|---|---|---|
| BaseURL | Base URL | String |
| UserName (Optional) | Username to connect to server | String |
| Password (Optional) | Password to connect to server | String |
| HealthPath | URL to check health of the server | String |
| Header (Optional) | Header key-value pairs to add to request headers | String |
| WebToken (Optional) | Information to retrieve authentication tokens for requests | Web Token |
| FlattenModeledValues | Whether to flatten modeled values | Bool |
| Inputs | Connection inputs | List |
| Outputs | Connection outputs | List |
| Parameter | Description | Data Type |
|---|---|---|
| Endpoint | URL endpoint to retrieve Web Token | String |
| Body | Request body for Web Token request | String |
| TokenKey | The key to extract token from response body | String |
| HeaderKey | The key of the response header which contains the token (e.g. Authorization) | String |
Once the connection with the REST API source has been established successfully, use the "input" page to define the data or dataset. This step involves specifying the necessary details related to the data or dataset, such as its location, type, and structure. Ensure all relevant information is accurately entered on the "input" page to properly define the data or dataset for successful transfer to a REST API endpoint.
| Parameter | Description | Data Type |
|---|---|---|
| EndpointURL | Endpoint to send request to | String |
| HTTPMethod | HTTP Method (e.g., GET, POST) | String |
| RequestBody (Optional) | Request Body | String |
| Header (Optional) | Header key-value pairs to add to request | String |
| RequestTimeoutMs (Optional) | Request timeout in milliseconds | Int |
To transfer the data package created by the user to a REST API endpoint, define an output. This includes specifying the URL of the API endpoint and the corresponding request method, such as POST or PUT. If the API endpoint requires authentication, provide the necessary authentication credentials or tokens.
Before sending the data package, ensure it conforms to the expected data format and structure of the API endpoint. This includes specifying the required fields and data types, as well as any constraints or validation rules on the data. In some cases, map the data from the input format to the output format expected by the API endpoint.
To verify the successful transfer of data, check the response from the API endpoint. This may include status codes, error messages, or confirmation messages indicating that the data has been successfully received and processed. Handle any errors or exceptions that may occur during the data transfer process to ensure reliable and consistent data transfer.
| Parameter | Description | Data Type |
|---|---|---|
| EndpointURL | Endpoint to send request to | String |
| Template (Optional) | Template | String |
| RequestBody (Optional) | Request Body | String |
| Header (Optional) | Header key-value pairs to add to request | String |
| RequestTimeoutMs (Optional) | Request timeout in milliseconds | Int |
| HTTPMethod | HTTP Method (e.g., POST, PUT) | String |
To establish a connection with a REST API, follow these steps: