I am trying to use the Crucible REST API to add reviewers to the review I just created (also using REST). According to the Atlassian docs, I have to send a POST:
/rest-service/reviews-v1/{id}/reviewers
with what? Documents do not display a valid request for adding reviewers. When you click expand, it doesn’t show anything, it just says “Comma Separated Replicators” that don't seem to work.
I tried:
user1,user2 {"user1","user2"} {reviewers:[reviewer:{"userName":"user1"},reviewer:{"userName":"user2"}]}
All this leads to the following answer:
{"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) ...
This stacktrace function continues and continues ...
user1 and user2 are valid names because I can see them in other reviews when I do a GET with the same url.
Does anyone have any ideas?
Thanks!
source share