3

Experts,

I need to upload files using Talend tREST component to Zephyr/JIRA. I do not know the format/syntax to give in httpbody section like the curl's ( -F "file=@myfile.txt" )

URL
 https://localhost:4000/jira/rest/zapi/latest/attachment?  
 entityId=4783&entityType=TestStepResult

BODY
 D:/TestResults/QPJ-707_Count_Mismatch.xls

I gave the full path and file name in body section. When I run, I am getting ERROR_CODE = 500.

Please help on how to give filepath/filename in the body section in tREST.

I do not get enough information in Zephyr/Zapi API website.

thanks in Advance - PK

Now, I tried with tFileFetch with the parameters as shown in the pics.. but I still get "Method failed: HTTP/1.1 500 Internal Server Error". Could someone help on this please?

Pic1

Pic2

Prakash Raj
  • 149
  • 3
  • 13

2 Answers2

3

You can use the tFileFetch component that allows you to download files, however in its advanced settings you can enable the "upload files" which then uploads the files. As a bonus it does it in a multi-part http post.

See more: https://help.talend.com/display/TalendComponentsReferenceGuide61EN/tFileFetch

Balazs Gunics
  • 2,017
  • 2
  • 17
  • 24
  • I tried tFileFetch, but I am getting "Method failed: HTTP/1.1 500 Internal Server Error" I have edited my question with more information. Please help.. – Prakash Raj Jul 09 '16 at 14:33
1

In case if tFileFetch is not working for you, you can use tRest component to upload file to a rest api. An example is given here

Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164