Launchpad logo and name.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index ][Thread Index ]

Re: [Launchpad-users] Updating bugs with the API

On 19 March 2011 19:20, Matt Barringer <mbarringer@xxxxxxx> wrote:
> Hi,
> I'm trying to update bugs in Launchpad using the API, but every time I issue
> a PATCH call on, it returns either a "400 Bad
> Request", or a "401 Bad Request".
> I'm not using the Python library, but rather direct HTTP calls.  Here's an
> example:
> -----------------------------------------------------------------
> $ openssl s_client -connect
> CONNECTED(00000003)
> [openssl stuff snipped]
> PATCH /1.0/entomologist2/+bug/733006 HTTP/1.0
> Host:
> Authentication: OAuth [oauth snipped but the tokens are valid]
> Content-Type: application/json
> Accept-Language: en-US,*
> User-Agent: Mozilla/5.0
> Content-Length: 27
> { "status" : "Incomplete" }
> This happens if I use openssl to connect to the server directly, or if I use
> QNetworkAccessManager to issue a PATCH call directly.  What am I doing wrong
> here?  A GET call returns the information as the documentation says it
> should.

At a guess - I can't check right now - this is because you're issuing
the PATCH on the Bug, not on one of its bug_tasks. status, importance,
assignee, and milestone are all properties on BugTask rather than Bug:

Hope that helps,


Graham Binns | PGP Key: EC66FA7D

This is the launchpad-users mailing list archive — see also the general help for mailing lists.

(Formatted by MHonArc.)