We assume that you have already learned what is described in:
If you want to find the right Reader for your purposes, see Readers Comparison.
RESTConnector sends HTTP requests to a web server and receives responses
Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs1) | Java | CTL |
---|---|---|---|---|---|---|---|
RESTConnector | - | no | 0-1 | 0-2 | - | no | no |
1) Component sends each data record to all connected output ports.
RESTConnector sends HTTP requests to a web server and receives responses. Request is written in a file or in the graph itself or it is received through a single input port. The response can be sent to an output port, stored to a specified file or stored to a temporary file. Path to the file can then be sent to a specified output port.
Port type | Number | Required | Description | Metadata |
---|---|---|---|---|
Input | 0 | no | For setting various attributes of the component | Any |
Output | 0 | No | For response content, response file path, status code, component attributes... | Any |
Output | 1 | No | For error details | Any |
Attribute | Req | Description | Possible values |
---|---|---|---|
Basic | |||
Authentication method | Specify the API authentication method. | None | Basic HTTP | |
Username | NO | Specify username for HTTP basic authentication | |
Password | NO | Specify password for HTTP basic authentication | |
Request URL | YES | Specifies the request URL | |
Request method | YES | Specifies the request method. | GET (default) | POST |
Request body | NO | Specifies the API call payload. It is mandatory for POST requests. | JSON object |
Request handling functions | YES | Specifies the handling functions. You can use it for pagination in responses etc. | |
Request handling functions URL | NO | Specifies the URL of request handling functions code | |
Charset | NO | Request charset | UTF-8 (default) |
Advanced | |||
Delay between requests (sec) | NO | Specifies the time delay between each HTTP request in seconds | Default is 0 |
Max. retry attempts | NO | Maximum attempts on HTTP request | Default is 5 |
Paused between retries | NO | Paused between each HTTP request | 1,2,4,8,..sec |
Max. pages limit | NO | Limit of pages for API call. | 10000 (Default) |