0

How do I retrieve story conversation using the Rest API? I have tried

/rest-1.oauth.v1/Data/Message

but it does not return any conversations.

bhushan154
  • 13
  • 6

1 Answers1

0

There are two assets related to the Conversations feature: Conversation and Expression. You can think of a Conversation as a thread and an Expression as a post to that thread. As with most queries, you need to start with the asset that you want to return. I assume that's Expression in this case.

If you only want the posts that mention a specific asset, then you can do this (spaces added for readability):

<Server Base URI>/rest-1.v1/Data/Expression
  ?where=Mentions:Story.Number='B-01001'
  &sel=Content,Author,AuthoredAt
  &sort=-AuthoredAt
  &page=10,0

However, that will differ from what you see in the web application. The VersionOne application will show you all the threads where an asset was mentioned in any of the posts. That makes for a more complicated query:

<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
ian.buchanan
  • 314
  • 1
  • 10