How to: Post conversation entries on Defects using the Agility API

Question

How do we post conversation entries on Defects using the Agility API

Answer

Create a new expression (initiates new conversation with comment) in the workitem:

Step 1: First create new conversation using:

API: rest-1.v1/Data/Conversation
Method: POST
Payload:

<Asset href="/VersionOne.Web/rest-1.v1/New/Conversation" />

Step 2: Now create a expression using the new conversation id retrieved from above API response:

API: rest-1.v1/Data/Expression
Method: POST
Payload:

<?xml version="1.0" encoding="UTF-8"?>
<Asset>
    <Relation name="Author" act="set">
        <Asset idref="Member:1329" />
    </Relation>
    <Attribute name="AuthoredAt" act="set">2021-08-23T16:20:06.974</Attribute>
    <Attribute name="Content" act="set">Testing Comment API</Attribute>
    <Relation name="Mentions" >
        <Asset idref="Defect:484783" act="add" />
    </Relation>
    <Relation name="BelongsTo" act="set">
        <Asset idref="<new_conversation_oid>" />
    </Relation>
</Asset>

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.