DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

REST management upload file gives 400 reply

  • 1.  REST management upload file gives 400 reply

    Posted 10 days ago

    A rest management file upload request for a new file using POST fails with a 400 "bad request" response
    The same request using PUT succeeds with a 200 "file was created" response. 

    I don't understand this was working a few weeks ago. Any suggestions would be great (otherwise I'll contact support)

    curl --tlsv1.2 -k -u admin --request POST  -d '{"file":{"name":"test-file","content":"aGVsbG8gd29ybGQ="}}' https://adc01-gateway03.sysmgmt.pp-prd.nl:5554/mgmt/filestore/garbage/local/test-file
    {"_links":{"self":{"href":"/mgmt/filestore/garbage/local/test-file"}},"error":[
                        "Bad request."]}
    curl --tlsv1.2 -k -u admin --request PUT  -d '{"file":{"name":"test-file","content":"aGVsbG8gd29ybGQ="}}' https://adc01-gateway03.sysmgmt.pp-prd.nl:5554/mgmt/filestore/garbage/local/test-file
    {_links" : {
            "self" : {"href" : "/mgmt/filestore/garbage/local/test-file"},
            "doc" : {"href" : "/mgmt/docs/filestore"}},
            "result" : "File was created."}
    System log:
    PM mpgw error 777903 error 172.23.226.22 0x00d30003 
    mpgw (rest-mgmt): Rejected by filter; SOAP fault sent


    ------------------------------
    John Gouw
    ------------------------------