API v2 returns http 422 when I update a card

Follow

Comments

5 comments

  • Avatar
    Jay Mitchell

    Nial, I took a quick look at this and don't see anything obviously incorrect with this. If you log a support request, our support team will be happy to help figure out the problem.

  • Avatar
    Nial Darbey

    Hi Jay,


    thanks for that, but we are a not-for-profit org with no support for our free Mingle license! :(


    Nial

  • Avatar
    Jay Mitchell

    Nial, I believe our sales team has sold support packages at reduced rates to non-profits and academic institutions in the past.

    One thing to try, as a temporary fix, is using the "v1" rather than the "v2" API. I don't recommend this as a long-term solution.

    Can you post the log message you get when the call fails? The log file is generally located in log/mingle.log.

  • Avatar
    Nial Darbey

    Thanks for that Jay. We are looking into the licensing at the moment. I've put up the mingle.log output. Perhaps I should switch to DEBUG. As you can see it shows a 200 OK.

  • Avatar
    Jay Mitchell

    DEBUG will just be a bit more verbose. 200 is great. As far as Mingle is concerned, this is a valid request.


    My guess is that HttpClient is attempting to do some object mapping, with the result. That mapping fails, so HttpClient shows the response as a 422.


    Have you attempted an update by using a simple command line tool like curl?


    curl -v -X PUT -d "card[name]=renamed" http://<login>:<password>@<instance>/api/v2/projects/<project>/cards/<card_number>.xml

    Since this requires passing your password, you may want to try this on a local instance - generally, a good idea when testing PUT APIs anyway.

Please sign in to leave a comment.