rajag1
Not applicable

REST ATTACHMENT POST

Hi Friends,

  I am having issues to execute a POST method with attachment (PDF) using SOAPUI/POSTMAN. I tried with multipart option but still not working. I am getting an error like - "403 forbidden error / The request is legal request but server is refused to respond".

  All your thoughts will help me to resolve this issue.

Thanks In Advance,

Raja

Labels (2)
Tags (2)
0 Kudos
5 Replies
8 Krypton

Re: REST ATTACHMENT POST

Hi Raja,

Atmos uses an HMAC-SHA1 signature of the request headers to authenticate the requests.  Therefore, you won't be able to use POSTMAN to execute REST requests.  You will need to use one of our SDKs to access data on Atmos.  See the Atmos column under "API" on this page: Getting Started with ECS SDKs  it says ECS but it's still accurate for Atmos.

Alternatively, there's a simple BASH script to sign/execute a request with curl: Uploading a file to Atmos with Bash and Curl (and a little Python)

0 Kudos
rajag1
Not applicable

Re: REST ATTACHMENT POST

Hi Jason,   Thanks for your response. I actually tried with SOAPUI and this is giving different error like as below. However i tried to find the answer but not able to find proper solution for this issue. {   "status": 400,   "code": "E_CREATE_OBJECT_MISSING_ATTRS",   "message": "The object creation failed because one or more attributes cannot be empty.",   "details": "(DM_SYSOBJECT_E_MUST_HAVE_NAME) [DM_SYSOBJECT_E_MUST_HAVE_NAME]error:  \"A Folder/Cabinet must have an object_name.\"" } Thanks, Raja

0 Kudos
pradeep14
Not applicable

Re: REST ATTACHMENT POST

Hi Jason,

Thanks for the script.

While using, I am getting the following error.

HTTP/1.1 403 Forbidden

Date: Mon, 23 May 2016 11:04:12 GMT

Server: Apache

Content-Length: 195

Connection: close

Content-Type: text/xml

<?xml version='1.0' encoding='UTF-8'?>

<Error>

        <Code>1032</Code>

        <Message>There was a mismatch between the signature in the request and the signature computed by the server.</Message>

</Error>

Any idea why?

Thanks

Pradeep

0 Kudos
8 Krypton

Re: REST ATTACHMENT POST

Were there any uppercase or special characters in the upload path?  The Bash script is pretty simplistic and can't handle all cases.

0 Kudos
Highlighted
rajag1
Not applicable

Re: REST ATTACHMENT POST

The same path is working for GET .

Please review my POST JSON request here -  http://localhost/dctm-rest/repositories/predev/cabinets/

{

        "title": "test1234",

         "updated": "2016-04-27T13:29:19.000-07:00",

         "summary": "dm_cabinet",

        

         "author": [         {

            "name": "orest"

         

         }],

            "content":         {

            "type": "parcel_jacket_doc",

             "properties":   {

              "object_name": "TEST_Subject11_20160212.pdf"

             }

         }

       

        

      },

Thanks,

Govinda Sama

0 Kudos