当前位置: 首页 > 工具软件 > Crucible > 使用案例 >

java中怎么审阅图片_java – Crucible REST API:无法添加审阅者

阴高寒
2023-12-01

我正在尝试使用Crucible REST API将审阅者添加到我刚创建的评论中(也使用REST).根据Atlassian文档,我应该发布一个POST:

/rest-service/reviews-v1/{id}/reviewers

什么?文档未显示添加审阅者的有效请求.当你点击“展开”它没有显示任何内容时,它只是说“逗号分隔的评论者”似乎不起作用.

我试过了:

user1,user2

{"user1","user2"}

{reviewers:[reviewer:{"userName":"user1"},reviewer:{"userName":"user2"}]}

所有这些导致以下响应:

{"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)

...

堆栈跟踪一直持续……

user1和user2是有效名称,因为当我对同一URL进行GET时,我可以在其他评论中看到它们.

有人有主意吗?

谢谢!

 类似资料: