0

I have a API, that allows to upload file using the API and a key in the Headers. Can this url be considered as a signed url for the design automation api?

The following is my API request to send the work item.

"result":{
           "verb":"put",
           "url":"https://my-website.com/forgeapi/uploadFile",
           "Headers":{
               "apikey":"ASDFFGHJKLLSDFGFAKEHGKEYHGFGHJ"
           }

Please Note:Here result was declared during creation of activity and consists of the location where I want the file to be uploaded.

I am getting a status as "status": "failedUpload"
And the log says

[06/21/2019 10:22:31] Warning: Request failed with Win32 exception, code = 12030, reason = Error 12030 calling WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, 'The connection with the server was terminated abnormally'..
JPais
  • 115
  • 2
  • 14
  • the URL you showed above doesn't look like signed, and you're passing a header with key... one thing seems strange: the `/` and the end, is it correct? – Augusto Goncalves Jun 21 '19 at 13:50
  • Sorry, yes the / and the end is by mistake, edited it. – JPais Jun 22 '19 at 15:12
  • API keys doesn't provide authentication as far my knowledge, please note design automation just passes given authorization information, apart from form-multipart upload, design automation should upload correctly if your authorization information is working correctly on curl or any other rest clients like postman or insomnia. I recommend you to test with curl/insomnia, try uploading a dummy file. – Madhukar Moogala Jun 24 '19 at 10:18
  • @MadhukarMoogala: The upload API works fine when when I run it separately, but after incorporating it with the forge API like shown in the question, it doesn't work – JPais Jun 26 '19 at 18:43
  • @JPais, can you please let me know the content-type your upload API is accepting?, what was the response when you tested separately. – Madhukar Moogala Jun 27 '19 at 03:55
  • The Content-Type is application/x-www-form-urlencoded, and the response I get is an ID of the file, this ID is used to retrieve the file in another API. – JPais Jun 28 '19 at 09:04

1 Answers1

0

As you're using .NET, I would suggest using the Design Automation v3 nuget package. You can find a tutorial here.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44