I would like to get a detailed list of a member’s Conversations in a space.
The following tutorial uses the query.v1 endpoint to obtain Conversation/Expressions data. While there are other approaches, query.v1 is the preferred approach that returns results efficiently in a single query.
The query.v1 endpoint was introduced in Release 13.2, Summer 2013. Please check Support Center -> About to see if you are on this release or later.
You can view Conversations on any asset by an author. For this example, we want to find out our own conversations from a space. However, you can build a similar query for Conversations for an asset, Conversations in a Team room etc
For our query, the
Expression. This means the primary query is about
If our query only has a
from parameter, we get a default set of attributes. To return only selected attributes, add a
select parameter to your query.
To select attributes, you will need to find the system name for the attribute you want to return. Attribute names can be found by querying meta, or meta.v1. To see the attributes available for
Expression, run the following query by pasting it into your browser address bar and pressing
<Server Base URI>/meta.v1/Expression?xsl=api.xsl
The result will resemble the following, except with many more attributes.
Expression * Author : Relation to Member — reciprocal of Expressions * AuthoredAt : Date * Content : Text BelongsTo : Relation to Conversation — reciprocal of ContainedExpressions InReplyTo : Relation to Expression — reciprocal of Replies Mentions : Multi-Relation to BaseAsset — reciprocal of MentionedInExpressions AssetState : State AssetType : AssetType ChangeComment : Text ChangeDate : Date ChangeDateUTC : Date ChangedBy : Relation to Member ChangeReason : Text CreateComment : Text
We can use any of the attributes directly in the
select. Let's add
Author and Content, Mentions, Replies and Replies Mentions.
from: Expression select: - Author.Name - Content - Mentions.ID - Replies.Content - Replies.Author.Name - Replies.Mentions.Name
where or filter
If our query does not have a
filter parameter, the results will include every
Conversation or Expression. Since I want Conversations authored by a particular member in a space, I want to filter by
ExpressionSpace.Name. And, I do not want to see the replies by this author in the results as an individual conversation. I am filtering the conversations which are having a value in
from: Expression select: - Author.Name - Content - Mentions.ID - Replies.Content - Replies.Author.Name - Replies.Mentions.Name - BelongsTo.ExpressionSpace.Name where: BelongsTo.ExpressionSpace.Name: <Space Name> Author.Name: <Member Name> InReplyTo: NULL