I am trying to use the Crucible REST API to add reviewers to a review that I've just created (also using REST).According to the Atlassian docs, I should a POST to:
/rest-service/reviews-v1/{id}/reviewers
with what? The docs don't show a valid request for adding reviewers. When you click on 'expand' it doesn't show anything, it just says "Comma separated reviewers" which doesn't seem to work.
I've tried:
user1,user2
{"user1","user2"}
{reviewers:[reviewer:{"userName":"user1"},reviewer:{"userName":"user2"}]}
All of these result in the following response:
{"code":"NotFound","message":"The user named '{\"user1\"' is not a Crucible user.","stacktrace":"com.atlassian.crucible.spi.services.NotFoundException: The user named '{\"user1\"' is not a Crucible user.
at com.atlassian.crucible.spi.impl.DefaultReviewService.getUser(DefaultReviewService.java:2011)
at com.atlassian.crucible.spi.impl.DefaultReviewService.access$3500(DefaultReviewService.java:95)
at com.atlassian.crucible.spi.impl.DefaultReviewService$32.doInTransaction(DefaultReviewService.java:1973)
at com.atlassian.crucible.spi.impl.DefaultReviewService$32.doInTransaction(DefaultReviewService.java:1965)
at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:123)
at sun.reflect.GeneratedMethodAccessor1317.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
...
That stacktrace goes on and on and on....
user1
and user2
are valid names because I can see them on other reviews when I do a GET to the same URL.
Anyone have any ideas?
Thanks!