"rallydev: unable to create defect. server says "cannot parse input ..."" Code Answer


If you are using v2.0 of WS API, the token is required for update and create requests, so you are correct by including it in your post request url.

The invalid key error will come up if a token is not appended to the request or if the token is invalid for a specific session. When hitting the endpoints directly we have to maintain an http session with a cookie, otherwise the post happens in the context of a new session - different from the one in which we got the token.

Please see this post. It is not specific to Python, but conceptually it's the same.

I noticed Rank in the payload. Do you have a Rank custom field? There is no such built-in field in v2.0 in Rally. There is a DragAndDropRank, which is not numeric, and setting it by supplying a value of 120 will not work.Also, did you try double quotes instead of single quotes in the payload?

There is a pyral - Rally Python toolkit that provide convenience methods so you do not have to hit endpoints directly. Currently it works with 1.43 of WS API. The toolkit is not officially supported, but I expect that it will be updated to work with v2.0 of WS API before June 2014, when 1.43 is no longer supported (per this schedule). Security token was introduced in v2.0. This extra authentication layer for post requests does not exist in 1.43 of WS API, and you do not have to deal with the token if using pyral.

By Phyxx on April 9 2022

Answers related to “rallydev: unable to create defect. server says "cannot parse input ..."”

Only authorized users can answer the Search term. Please sign in first, or register a free account.