如何使用 Rest API 检索故事对话?我努力了
/rest-1.oauth.v1/数据/消息
但它不会返回任何对话。
有两个与对话功能相关的资产:Conversation
和Expression
. 您可以将 aConversation
视为一个线程,并将 anExpression
视为该线程的帖子。与大多数查询一样,您需要从要返回的资产开始。我假设Expression
在这种情况下。
如果您只想要提及特定资产的帖子,那么您可以这样做(添加空格以提高可读性):
<Server Base URI>/rest-1.v1/Data/Expression
?where=Mentions:Story.Number='B-01001'
&sel=Content,Author,AuthoredAt
&sort=-AuthoredAt
&page=10,0
但是,这与您在 Web 应用程序中看到的不同。VersionOne 应用程序将向您显示任何帖子中提到资产的所有线程。这使得查询更加复杂:
<Server Base URI>/rest-1.v1/Data/Expression
?where=BelongsTo.ContainedExpressions.Mentions:Story.Number='B-01001'
&sel=Content,Author,AuthoredAt,BelongsTo.ChangeDate
&sort=-BelongsTo.ChangeDate
&page=10,0