Difference between revisions of "Calling REST based Web services"

From Toolsverse Knowledge Base
Jump to: navigation, search
Line 1: Line 1:
 
The ETL Framework natively supports REST based Web services. You don't need to do anything special, just make sure your source connection is set to the one linked to the GET endpoint and destinations - to the PUT or POST endpoint.  
 
The ETL Framework natively supports REST based Web services. You don't need to do anything special, just make sure your source connection is set to the one linked to the GET endpoint and destinations - to the PUT or POST endpoint.  
  
You can use POST, PUT, GET and DELETE HTTP methods. Read more [How to customize HTTP connection].  
+
You can use POST, PUT, GET and DELETE HTTP methods. Read more [[How to customize HTTP connection]].  
  
 
Use JSON, XML or text to serialize datasets and objects.
 
Use JSON, XML or text to serialize datasets and objects.

Revision as of 00:43, 10 February 2015

The ETL Framework natively supports REST based Web services. You don't need to do anything special, just make sure your source connection is set to the one linked to the GET endpoint and destinations - to the PUT or POST endpoint.

You can use POST, PUT, GET and DELETE HTTP methods. Read more How to customize HTTP connection.

Use JSON, XML or text to serialize datasets and objects.

You can customize URL using {token}.

For example connection below points to the GET REST endpoint which requires access token:

<connection alias="Some REST endpoint">
  <url>https://host/rest/v1/data/?filter=123&access_token={access_token}</url>
  <connector>com.toolsverse.etl.connector.json.JsonConnector</connector>
  <transport>com.toolsverse.io.HttpProcessor</transport>
</connection>

You will need to set access_token as a system property. Please see examples below:

Example of the GET request

Example of the POST request