Hey guys, I'm getting a bad request error when I try to POST to
/api/repositories/ to create a repo. It says I'm missing the "path", "tool"
and "name" fields, but as far as I can tell, they are being passed
correctly. I've tried to set them as form fields in the request payload, or
as request parameters. I am able to do a successful GET call to list all
repositories.
Here are my request and response headers:
General
1. Request URL:
http://172.22.29.107:8080/reviewboard/api/repositories/
2. Request Method:
POST
3. Status Code:
400 BAD REQUEST
4. Remote Address:
172.22.29.107:8080
1. Response Headers
1. Cache-Control:
max-age=0
2. Connection:
close
3. Content-Language:
en
4. Content-Length:
198
5. Content-Type:
application/vnd.reviewboard.org.error+json
6. Date:
Fri, 11 Mar 2016 19:02:33 GMT
7. Expires:
Fri, 11 Mar 2016 19:02:33 GMT
8. Last-Modified:
Fri, 11 Mar 2016 19:02:33 GMT
9. Server:
Apache
10. Vary:
Accept,Cookie,Accept-Language
11. X-Content-Type-Options:
nosniff
12. X-Frame-Options:
SAMEORIGIN
2. Request Headersview source
1. Accept:
application/json
2. Accept-Encoding:
gzip, deflate
3. Accept-Language:
en-US,en;q=0.8
4. Connection:
keep-alive
5. Content-Length:
170
6. Content-Type:
application/json
7. Cookie:
rbsessionid=rw0w838654762qnmr03v2notw4le8agc; collapsediffs=True;
csrftoken=mH2j5X1ieFzSx8cIJFbdp2gcDK5JbRLX
8. Host:
172.22.29.107:8080
9. Origin:
chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo
10. User-Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
3. Request Payload
1.
mirror_path=ssh%3A%2F%2Fgit%40stash.mycompany.net%3A7999%2Flibs%2Fmy-repo.git&name=my-repo&path=%2Fhome%2Fusername%2Freviewboard-2.5.3-1%2Frepos%2Fmy-repo%2F.git&tool=Git
4. Response
{
"fields": {
"path": ["This field is required"],
"tool": ["This field is required"],
"name": ["This field is required"]
},
"stat": "fail",
"err": {
"msg": "One or more fields had errors",
"code": 105
}
}
--
Supercharge your Review Board with Power Pack:
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons:
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.