Skip to main content
Solved

HTTP Caller POST request error

  • March 11, 2019
  • 6 replies
  • 109 views

bhanu_v
Forum|alt.badge.img

Im trying to work with the Cityworks API to create service requests using FME desktop.

Im using the http caller to create a service request.

so far I have made progress to create a service request and extract the requestId .

My next challenge is to upload an attachment to the service request and this is where Im stuck,

The workspace looks like this ,Im trying to upload an image 0684Q00000ArBaqQAF.png

I tried to put in the parameters that worked in postman as much as I could

0684Q00000ArBxzQAF.png

The sample call from postman and its response are attached here.0684Q00000ArBuIQAV.png

The error message I keep on getting is this


HTTPCaller(HTTPFactory): HTTP/FTP Transfer: Failed to open file '20191009243' for resource upload

I have tried changing the parameters from other posts in the blog ,but in vain

 

Best answer by bhanu_v

With help from @nathanatsafe

I figured out the answer to make a successful POST call

using source dataset parameter for value field in the multipart upload section solved the problem

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

friesewoudloper
Participant
Forum|alt.badge.img+1

fme_basename doesn't contain a file extension. So may be the name of your file for upload is incomplete? The response body in your Postman screenshot says the file 20191009243 .GIF was uploaded.


bhanu_v
Forum|alt.badge.img
  • Author
  • March 11, 2019

fme_basename doesn't contain a file extension. So may be the name of your file for upload is incomplete? The response body in your Postman screenshot says the file 20191009243 .GIF was uploaded.

Thank you for your reply @friesewoudloper

I have changed the fme_basename to have the filename extension .GIF

but I still get the same error HTTP/FTP failed to open file 20191009243.GIF


friesewoudloper
Participant
Forum|alt.badge.img+1

Thank you for your reply @friesewoudloper

I have changed the fme_basename to have the filename extension .GIF

but I still get the same error HTTP/FTP failed to open file 20191009243.GIF

Could you please share with us the screenshot from Postman containing the *request* body? It will make it easier to help you. The screenshot you uploaded only contains the response body.


bhanu_v
Forum|alt.badge.img
  • Author
  • March 11, 2019

I made changes to the workspace

deleted the content-type in the header and chose the actula file from the folder instead of fme_basename and was able to amake succesfull call

however,how do i get the file to be uploaded from the workspace reader than pointing to the actual file


bhanu_v
Forum|alt.badge.img
  • Author
  • March 11, 2019

Could you please share with us the screenshot from Postman containing the *request* body? It will make it easier to help you. The screenshot you uploaded only contains the response body.

I made changes to the workspace

deleted the content-type in the header and chose the actual file from the folder instead of fme_basename and was able to make a successful call

however,how do I get the file to be uploaded from the workspace reader than pointing to the actual file


bhanu_v
Forum|alt.badge.img
  • Author
  • Best Answer
  • March 11, 2019

With help from @nathanatsafe

I figured out the answer to make a successful POST call

using source dataset parameter for value field in the multipart upload section solved the problem