Chuyển tới nội dung chính

Get my tasks

Retrieve the list of tasks in all channels which the user is logged in as a member and is assigned to.

| GET api/me/tasks
--x-appvity-entityId: [EntityId]
--Cookie: graphNodeCookie=[ID] |

URL Endpoint

api/me/tasks.

Method

GET.

Parameters

This method supports the $select, $filter and $orderby OData query parameters to help customize the response.

Request Header

--x-appvity-entityId: [EntityId]
--Cookie: graphNodeCookie=[ID]

Body

This method does not supply the request body.

Response

If successful, this method returns a 200 OK response code and the list of task objects in the response body.

Error

Code: 401 UNAUTHORIZED, 500 ERROR EXCEPTION. Content: {error: "error message”}.

Example

Request

curl --location --request GET 'https://teams.appvity.com/api/me/task' \

--header 'x-appvity-entityId: appvity.etask.mytask' \

--header 'Cookie:
graphNodeCookie=s%3AY_JF9CZQ9zNzJBFtczaMPEDH0z6q-GIu.gVlQqDR9nhJHdn%2BU083X4PuboTi6JCnSnz6vCGcs9qU'

Response

{

"@odata.context": "https://schema.appvity.com/odata/$metadata#tasks",

"@odata.count": 1,

"value": [

{

"bucket": [],

"assignedTo": [

{

"_id": "5e12ca9d85c88e43cb3881c1",

"source": "Microsoft.Vsts",

"sourceId": "oliver@anadea.com",

"displayName": "Oliver Neal",

"username": "oliver@anadea.com"

}

],

"attachments": [],

"_id": "5f730bad3daec4a3b093622f",

"channelId": "19:ad272f12fcf24d6c892222de0587d00e@thread.skype",

"sourceId": "45536",

"teamId": "19:711c68b56d894b2697368214024dc89f@thread.skype",

"body": "<p>sdfsdd</p>",

"bucketName": "null" ,

"createdAt": "2020-09-15T03:00:38.050Z",

"createdBy": {

"source": "Microsoft.Vsts",

"email": "kylachan@anadea.com",

"name": "Cora Rowland",

"sourceId": "kylachan@anadea.com",

"entityId": "eTask.87238db1-8f81-468d-74b1-61d3c23cb341",

"groupId": "2aee63b0-a616-4d52-b22b-84c971ba0d25",

"internalId": 1615,

"name": "Get comment of VSTS task",

"phase": "Z Anadea Project\Sprint 3",

"phaseName": "Z Anadea Project\Sprint 3",

"priority": "Normal",

"source": "Microsoft.Vsts",

"status": "Not Started",

"statusId": {

"_id": "5f1a8fe07d91fb91eca911af",

"category": "New"

},

"statusValue": 0,

"sync": {

"status": null ,

"at": "2020-09-29T10:36:49.755Z"

},

"updatedAt": "2020-09-16T02:52:47.740Z",

"updatedBy": {

"displayName": "Cora Rowland",

"url":
"https://spsprodeau1.vssps.visualstudio.com/A81a8ce47-94e1-4c05-8134-5db3bd24682a/_apis/Identities/7533a36b-eb2b-4c23-8b0d-47a49b8d903e",

"_links": {

"avatar": {

"href":
"https://anadea.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.YjVjMTQxNzQtM2ZmOC03ODZkLTg3NWItNTVlMzU1MzUzZDk1"

}

},

"id": "7533a36b-eb2b-4c23-8b0d-47a49b8d903e",

"uniqueName": "kylachan@anadea.com",

"imageUrl":
"https://anadea.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.YjVjMTQxNzQtM2ZmOC03ODZkLTg3NWItNTVlMzU1MzUzZDk1",

"descriptor": "aad.YjVjMTQxNzQtM2ZmOC03ODZkLTg3NWItNTVlMzU1MzUzZDk1"

},

"projectId": {

"_id": "5f224b72c1baf49f24e4042f",

"projectName": "Z Anadea Project",

"sourceId": "1db34929-5779-4a21-b986-b9846ab1f4b4",

"displayName": "BD"

},

"teamName": "Team Playground V2",

"channelName": "BT Channel"

},

}

]