Update In restFul WebService getting Data from Database

Eight Stars

Update In restFul WebService getting Data from Database

Hi All,

 

I have a requirement to update a column in Restful webService with a Value which is coming from Database. I have tried with trestClient. I have provided the following parameters like client_id and secretid as authentication(authentication done successfully).Now as Per the WebService Documentation we need to provide 3 new arguments such as primary Key(id),attribute_name and value where value needs to be a json string. Here attribute_name and value is coming from Database. Please find Sample json string as below. as per the json string below the primary key is fid and update key will be familyStatus.

 

:

 "results": {

      "family": {

        "familyStatus": "true",

        "id": "341380",

        "familyID": "family1",

        "familyCreationDate": "2015-06-22 18:14:53 +0000"

      }

              "fid": "123456",

             "lastLogin": "2015-06-22 18:14:53 +0000",

      "created": "2015-06-22 18:14:53.663406 +0000"

              }

As per the webservice documentation below curl command should do the update.we need to replicate below in Talend.

curl -X POST \

    -H "Authorization: Basic aW1fYV...NfbXk=" \

    --data-urlencode type_name=user \

    --data-urlencode fid=12345 \

    --data-urlencode attributes='{"familyStatus": "true"}' \

    https://my-app.samplewebwervice.com/entity.update

@rhall_2_0@TRF@TRF1@xdshi@vboppudi@manodwhb can u please help. 

Eight Stars

Re: Update In restFul WebService getting Data from Database

Eight Stars

Re: Update In restFul WebService getting Data from Database

Can anyone help with this
Sixteen Stars

Re: Update In restFul WebService getting Data from Database

Can you post a link to the web service documentation? I'm not sure if what you have sent is your interpretation of what is required (the JSON) or an example. You also need to show what you have tried