Search code examples
etlpentahokettlepentaho-spoonpentaho-data-integration

Can't change Application Type RESTClient Pentaho Data Integration


Picture of my RESTClient on Pentaho Data Integration

I'm trying to call data from a REST API, so I use RESTClient on Pentaho Data Integration version 9.4, but somehow I can't change or declare the application type into something that I want, it greyed out and I can't selected it.

Please Help

I've found that if I change the HTTP Method to something else, I can change the application type, but I need the HTTP Method to be GET Method so I can't change it to be anything else other than GET, but then because of that, I can't change the Application Type.


Solution

  • The GET method refers to a HyperText Transfer Protocol (HTTP) method that is applied while requesting information from a particular source. It is also used to get a specific variable derived from a group.

    When you select the HTTP Method = GET in Pentaho, it expects to receive data from the REST API server. It is not meant to send data to the server in a particular format, so the Application Type section is disabled. In the REST Client Step, the Application Type is linked with the Body Field as an indication of what type of body/data is sent to the REST API server. In the case of HTTP Method = POST / PUT /..., the API server expects the body data and hence it is enabled. This is not an issue in the Pentaho step.

    Alternatively, If you are expecting to receive the data from the REST server in a particular format using the GET method, you can always add it as an additional argument/filter as below:

    http://<rest API server>/getData?name=XYZ&xml=Y
    

    The above call uses the GET method to fetch the data and expects the format to be in XML. However, it also depends on the way your API server is sending back the request. I would suggest looking into your API server for documentation reference on using GET requests.

    Official Pentaho REST Client documentation for reference.