Online Docs

Make a discussion

Create a new discussion in the specified channel from a bug in the ebug.

1
2
3
4
POST /api/bugs/{bug-id}/messages
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]

URL Endpoint

api/bugs/{bug-id}/messages.

Method

POST.

Parameters

Do not support OData Filter syntax.

Request

Header

1
2
3
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]

Body

This endpoint is not supply request body.

Response

Success

Code: 200 OK

If successful, this method returns a 200 OK response code and the discussion object in the response body.

Error

The code will return 500 Internal Server Error with the message: Discussion has been initialized. if a bug has a previously discussion.

Example

Request

1
2
3
4
curl --silent --location --request POST 'https://teams.appvity.com/api/bug/{bug-id}/messages' \
--header 'Cookie: graphNodeCookie=s%3An__UHMo8vb1jQlmNEV4LZjYgqcjaV68u.b49DG4G8a8yGuckWuzbebPPECVYJHKo05kMU8TJt7aM' \
--header 'x-appvity-teamid: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--header 'x-appvity-channelId: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2'

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#teams('f87faa71-57a8-4c14-91f0-517f54645106')/channels('19%3A15c258785b4040699180e7a8ad6c6014%40thread.tacv2')/messages/$entity",
"id": "1601608596892",
"replyToId": null,
"etag": "1601608596892",
"messageType": "message",
"createdDateTime": "2020-10-02T03:16:36.892Z",
"lastModifiedDateTime": "2020-10-02T03:16:36.892Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": "Clone - Clone - Get comment of VSTS bug Discussion",
"summary": null,
"chatId": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/19%3A15c258785b4040699180e7a8ad6c6014%40thread.tacv2/1601608596892?groupId=f87faa71-57a8-4c14-91f0-517f54645106&tenantId=df7abg9c-c05a-4fc9-b958-64faered911d&createdTime=1601608596892&parentMessageId=1601608596892",
"policyViolation": null,
"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "5083cb81-35f4-4abd-ba2d-e7b9965c1f89",
"displayName": "Oliver Neal",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "html",
"content": "ebug has created this <attachment id=\"35d05000d4014dcb82cac9a97eeab1f9\"></attachment>"
},
"channelIdentity": {
"teamId": "f87faa71-57a8-4c14-91f0-517f54645106",
"channelId": "19:15c258785b4040699180e7a8ad6c6014@thread.tacv2"
},
"attachments": [
{
"id": "35d05000d4014dcb82cac9a97eeab1f9",
"contentType": "application/vnd.microsoft.teams.card.o365connector",
"contentUrl": null,
"content": "{\r\n \"summary\": \"33 - Clone - Clone - Get comment of VSTS bug\",\r\n \"text\": \"\",\r\n \"title\": \"33 - Clone - Clone - Get comment of VSTS bug\",\r\n \"themeColor\": \"#74060E\",\r\n \"sections\": [\r\n {\r\n \"text\": \"<p>sdfsdd</p>\",\r\n \"facts\": [\r\n {\r\n \"name\": \"Status\",\r\n \"value\": \"<p>Not Started</p>\"\r\n },\r\n {\r\n \"name\": \"Priority\",\r\n \"value\": \"<p>Normal</p>\"\r\n }\r\n ],\r\n \"title\": \"<p>Assigned to</p>\",\r\n \"activityTitle\": \"<p>Oliver Neal</p>\",\r\n \"activitySubtitle\": \"<p>Visual Studio</p>\",\r\n \"activityText\": \"\",\r\n \"activityImage\": \"https://teams.appvity.com/app/img/avatar/Microsoft.Vsts/oliver@anadea.com.png\",\r\n \"activityImageType\": \"avatar\",\r\n \"markdown\": true\r\n }\r\n ],\r\n \"potentialAction\": [\r\n {\r\n \"name\": \"Open bug\",\r\n \"targets\": [\r\n {\r\n \"os\": \"default\",\r\n \"uri\": \"https://teams.microsoft.com/l/entity/67f87bbc-1ca5-40db-a33a-0b070611ba0c/ebug.30c4d651-af40-4739-f9a1-5da75d4fbb4b?webUrl=https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a&label=Clone%20-%20Clone%20-%20Get%20comment%20of%20VSTS%20bug&context=%7B%22subEntityId%22:%22bug_5f769a6b4d596392f5d7a55a%22,%22canvasUrl%22:%22https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a%22,%22channelId%22:%2219:15c258785b4040699180e7a8ad6c6014@thread.tacv2%22%7D\"\r\n },\r\n {\r\n \"os\": \"iOS\",\r\n \"uri\": \"https://teams.microsoft.com/l/entity/67f87bbc-1ca5-40db-a33a-0b070611ba0c/ebug.30c4d651-af40-4739-f9a1-5da75d4fbb4b?webUrl=https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a&label=Clone%20-%20Clone%20-%20Get%20comment%20of%20VSTS%20bug&context=%7B%22subEntityId%22:%22bug_5f769a6b4d596392f5d7a55a%22,%22canvasUrl%22:%22https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a%22,%22channelId%22:%2219:15c258785b4040699180e7a8ad6c6014@thread.tacv2%22%7D\"\r\n },\r\n {\r\n \"os\": \"android\",\r\n \"uri\": \"https://teams.microsoft.com/l/entity/67f87bbc-1ca5-40db-a33a-0b070611ba0c/ebug.30c4d651-af40-4739-f9a1-5da75d4fbb4b?webUrl=https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a&label=Clone%20-%20Clone%20-%20Get%20comment%20of%20VSTS%20bug&context=%7B%22subEntityId%22:%22bug_5f769a6b4d596392f5d7a55a%22,%22canvasUrl%22:%22https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a%22,%22channelId%22:%2219:15c258785b4040699180e7a8ad6c6014@thread.tacv2%22%7D\"\r\n },\r\n {\r\n \"os\": \"windows\",\r\n \"uri\": \"https://teams.microsoft.com/l/entity/67f87bbc-1ca5-40db-a33a-0b070611ba0c/ebug.30c4d651-af40-4739-f9a1-5da75d4fbb4b?webUrl=https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a&label=Clone%20-%20Clone%20-%20Get%20comment%20of%20VSTS%20bug&context=%7B%22subEntityId%22:%22bug_5f769a6b4d596392f5d7a55a%22,%22canvasUrl%22:%22https://teams.appvity.com/app/web/bugs/5f769a6b4d596392f5d7a55a%22,%22channelId%22:%2219:15c258785b4040699180e7a8ad6c6014@thread.tacv2%22%7D\"\r\n }\r\n ],\r\n \"@type\": \"OpenUri\",\r\n \"@id\": \"bug.card.open-uri.5f769a6b4d596392f5d7a55a\"\r\n }\r\n ]\r\n}",
"name": "ebugCard-bug-5f769a6b4d596392f5d7a55a",
"thumbnailUrl": null
}
],
"mentions": [],
"reactions": []
}

Comment

Was this article helpful?
Thanks For Your Feedback