After upgrading to 1.5.5 I still have problems adding repositories
remotely. The request body is as follows (content-type is set to
application/json):
{"path": "http://10.10.16.117/scm/git/wifi.git";, "tool": "Git", "name": "wifi"}
While the response is 400 Bad Request with data:
{"fields": {"path": ["This field is required"], "tool": ["This field
is required"], "{\"path\": \"http://10.10.16.117/scm/git/wifi.git\";,
\"tool\": \"Git\", \"name\": \"wifi\"}": ["Field is not supported"],
"name": ["This field is required"]}, "stat": "fail", "err": {"msg":
"One or more fields had errors", "code": 105}}

Then I tried with simple GET to api/repostories passing
{"counts-only": true} as data, but got the list of all repositories
instead of repository count.

I'm not sure if there's something wrong with how simplejson encodes
data or httplib passing data in request. But checking the request with
wireshark it does seem to be valid.

--
Maciek Borzecki



On Wed, Jul 13, 2011 at 8:10 PM, Christian Hammond <chip...@chipx86.com> wrote:
> What version are you using, and are you logged into the API as an
> administrator?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
> On Wed, Jul 13, 2011 at 9:54 AM, maciek borzecki <maciek.borze...@gmail.com>
> wrote:
>>
>> I'm trying to add ~50 repositories programmatically using web API.
>> However, for some reason, even if I pass a valid rbsessionid in
>> cookie, I get 405 Method Not Allowed. I'm doing POST on /review/api/
>> repositories with repository described as follows: {"path": "http://
>> 10.10.16.11/scm/git/wific.git", "tool": "Git", "name": "wific"}.
>>
>> When listing links property as got in GET on /review/api/repositories,
>> I see:
>> {'self': {'href': 'http://10.10.16.117/review/api/repositories/',
>> 'method': 'GET'}}.
>> I think that as "create" is missing, I won't be able to do the actual
>> POST.
>> Is there something I'm missing from rb configuration?
>>
>> Thanks,
>> Maciek
>>
>> --
>> Want to help the Review Board project? Donate today at
>> http://www.reviewboard.org/donate/
>> Happy user? Let us know at http://www.reviewboard.org/users/
>> -~----------~----~----~----~------~----~------~--~---
>> To unsubscribe from this group, send email to
>> reviewboard+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/reviewboard?hl=en
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to