Thanks. I did get this to work using your suggestion. However, I am unable to do a PUT using Java now. I tried to create a new topic for this in good reviewboard-dev groups but I don't think it went through.
On Mon, Oct 1, 2012 at 1:54 PM, Andy Paladino <
Andy.P...@citrix.com<mailto:
Andy.P...@citrix.com>> wrote:
Ah, I see. Should this work then?
curl -k -H "Authorization: Basic YXBhbGFkaW5vOkNpdHJpeDExBHy=" -X POST "<review board url>/api/review-requests/?repository=1&changenum=678516"
Andy P
From: Christian Hammond <
chi...@chipx86.com<mailto:
chi...@chipx86.com><mailto:
chi...@chipx86.com<mailto:
chi...@chipx86.com>>>
Date: Monday, October 1, 2012 1:34 PM
To: Microsoft Office User <
Andy.P...@citrix.com<mailto:
Andy.P...@citrix.com><mailto:
Andy.P...@citrix.com<mailto:
Andy.P...@citrix.com>>>
Cc: "
reviewb...@googlegroups.com<mailto:
reviewb...@googlegroups.com><mailto:
reviewb...@googlegroups.com<mailto:
reviewb...@googlegroups.com>>" <
reviewb...@googlegroups.com<mailto:
reviewb...@googlegroups.com><mailto:
reviewb...@googlegroups.com<mailto:
reviewb...@googlegroups.com>>>
Subject: Re: REST API call to create a new review request
Oh, you're uploading as JSON data. We require HTTP POST data. That's your biggest problem.
Christian
--
Christian Hammond -
chi...@chipx86.com<mailto:
chi...@chipx86.com><mailto:
chi...@chipx86.com<mailto:
chi...@chipx86.com>>
On Mon, Oct 1, 2012 at 1:16 PM, Andy Paladino <
Andy.P...@citrix.com<mailto:
Andy.P...@citrix.com><mailto:
Andy.P...@citrix.com<mailto:
Andy.P...@citrix.com>>> wrote:
Hi. Thanks for the response. I did update the url used to use review-requests and I'm getting a different error. To recap, I am trying to generate a new review request via REST using a post. Can someone tell me what I am doing wrong? I am new to reviewboard. Thanks.
apaladino$ curl -k -H "Authorization: Basic YXBhbGFkaW5vOkNpdHJpeDExBHy=" -X POST "<review board url>/api/review-requests/" -d "{ \"repository\": 1, \"changenum\": 678516 }"
{"fields": {"{ \"repository\": 1, \"changenum\": 678516 }": ["Field is not supported"], "repository": ["This field is required"]}, "stat": "fail", "err": {"msg": "One or more fields had errors", "code": 105}}
Andy P
curl -k -H "Authorization: Basic YXBhbGFkaW5vOkNpdHJpeDExMTc=" -X POST "https://<reviewboard address>/api/reviewrequests/" -d "{ \"repository_path\": "
perforce.ad.corp.expertcity.com<
http://perforce.ad.corp.expertcity.com><
http://perforce.ad.corp.expertcity.com>", \"changenum\": \"678516\" }"
________________________________
This message was sent to
andy.p...@citrix.com<mailto:
andy.p...@citrix.com><mailto:
andy.p...@citrix.com<mailto:
andy.p...@citrix.com>><mailto:
andy.p...@citrix.com<mailto:
andy.p...@citrix.com><mailto:
andy.p...@citrix.com<mailto:
andy.p...@citrix.com>>> in reference to Case #: 203.
[[d50dabb981a4fc3e77aae01b4c30420076c1ff85-64945104]]