I am receiving the following error during a Rally curl POST:  exceptionClass: org.springframework.security.web.firewall.RequestRejectedException
search cancel

I am receiving the following error during a Rally curl POST:  exceptionClass: org.springframework.security.web.firewall.RequestRejectedException

book

Article ID: 277498

calendar_today

Updated On:

Products

CA Agile Central SaaS (Rally)

Issue/Introduction

I am receiving the following error during an curl POST:

unhandledException: { [-]
       exceptionClass: org.springframework.security.web.firewall.RequestRejectedException
       exceptionMessage: The request was rejected because the parameter name "

Here is the curl command I was using:

curl -i -X POST  -H "ZSESSIONID:<APIKey>"  -d '{
 "Defect": {
  "Workspace": {
   "_ref": "/workspace/<Workspace_OID>"
  },
    "Project": {
   "_ref": "/project/<Project_OID>"
  },
  "Name": "test for Security Token take 11",
  "ScheduleState": "Defined",
  "State": "Submitted"
 }
}' 'https://rally1.rallydev.com/slm/webservice/v2.0/defect/create'

Cause

This was caused by not having a Content-Type = application/json in the Header of a curl Post

Resolution

Change the curl command to the following:

curl -i -X POST -H "ZSESSIONID:<APIKey>" -H "Content-Type: application/json" -d '{ "Defect": { "Workspace": { "_ref": "/workspace/<Workspace_OID>" }, "Project": { "_ref": "/project/<Project_OID>" }, "Name": "test for Security Token take 11", "ScheduleState": "Defined", "State": "Submitted" } }' 'https://rally1.rallydev.com/slm/webservice/v2.0/defect/create'