REST V1

Know the component and how to use it.

Erick Rubiales avatar
Written by Erick Rubiales
Updated over a week ago

IMPORTANT: This documentation has been discontinued. Read the updated REST V1 documentation on our new documentation portal.

REST V2 makes calls to REST endpoints from a pipeline.


Take a look at the configuration parameters of the component: 

  • URL: URL to be called - it may contain parameters following the {:param1} pattern, which will be replaced by the corresponding input message property.

  • Content Type: configures the Content Type and encoding.

  • Verb: REST call type (GET, POST and PUT).

  • Account: account to be used by the component.

  • Connection Timeout: connection expiration time (in milliseconds).

  • Reading Timeout: maximum time for reading (in milliseconds).

  • Stop On Client Error: if activated, the option will generate an error and suspend the pipeline execution.

  • Stop On Server Error: if activated, the option will generate an error and suspend the pipeline execution.

  • Advanced Settings: advanced configurations.

  • Inject JWT: if activated, the option inserts the present JWT into the pipeline call (whether generated by the JWT component or not) in the Authorization header of the REST call.

  • Read JWT: if activated, the option puts as return the JWT that is in the internal header Authorization, if it exists.

  • Raw Mode: if activated, the option receives or passes a payload without being JSON.

  • Allow Insecure Calls To HTTPS Endpoints: when activated, the option allows non-reliable calls to HTTPS endpoints to be made.

  • Enable Retries: when activated, the option allows new tries.

  • Maximum Number Of Retries Before Giving Up: maximum number of retries before giving up the call.

  • Time To Wait Before Each Retry: maximum time between retries (in milliseconds).

  • Compress Body With GZIP: when activated, the option allows the body to be compressed with GZIP.

Path Parameter

Example

    

Query Parameter

Example

Messages flow

Input

application/x-www-form-urlencoded

{
header: {
"headerA":"valueA",
"headerB":"valueB"
},
url: {
"urlParam1": "paramValue"
},
formData: {
"field1": "value1",
"field2": "value2"
}
}

multipart/form-data

{
header: {
"headerA":"valueA",
"headerB":"valueB"
},
url: {

},
multiPartData: {
"files": {
"file_formName" "filename",
"files_formName[]" ["filename1","filename2"]
}, "fields": {
"field1" : "value1",
"field2" : "value2",
}
}
}

The component waits for a message in the following format:

{
header: {
"headerA":"valueA",
"headerB":"valueB"
},
url: {
"urlParam1": "paramValue"
},
body: {
// message to be sent to the endpoint
}
}

      

Output

  • successful

{
status: XXX,
body: {
},
headers: {
}
}

    

  • with error

{
error: "error message",
code: XXX,
body: {
},
headers: {
}
 }

     
IMPORTANT: in case of some errors, the body and headers will not be available.

Did this answer your question?