Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
dura45
Contributor II
Contributor II

Iterate Delete API call with body parameters

Hello, I'm fairly new to the Talend world but I find it very useful for my needs.

I would like to make a DELETE API call that in POSTMAN (where it works) is structured like this: In the body, I pass two parameters in x-www-form-urlencoded format:

  • address_id
  • uid

The goal is to start from an Excel file that has these two columns with a series of rows containing the values ​​of address_id and uid that I need to delete (about 400), and ensure that all rows are iterated.

I can't figure out how to set up the body so that it takes each row from the Excel file.

Here the current schema and Postaman call structureScreenshot_50.png

Screenshot_51.png

 

Anyone can help me?

Labels (5)
2 Replies
Shicong_Hong
Support
Support

Hello 

For your question on using content type form in tRestClient component, once you select the HTTP method to POST, the content type option will appear on the UI. You can then select the Content Type to FORM

2024-03-04_13-44-28.png

In the backend, the content type is set to "application/x-www-form-urlencoded" once the selection is made.

2024-03-04_13-42-14.png

Please try it and let me know if you have any additional questions.

Regards

Shicong

dura45
Contributor II
Contributor II
Author

Hi @Shicong_Hong and thank you for your reply.

I saw the option that you suggest but it appears only if the method is POST and not when the method is DELETE as I want.

I tried to choose POST method, I selected content type FORM and after that I switched to DELETE post and it didn't save the content type.

Screenshot_56.png

Screenshot_57.png

 If there is a solution for this topic the next question is: how can I pass the address_id and uid iterating from excel file? Thanks a lot!