Change assign to
Use this API to update assigned user to a task.
POST api/tasks/assign/{source-code}/{task-id}
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
--data-raw
{
"taskId": TaskID,
"user": UserObject
}
URL Endpoint
api/tasks/assign/{source-code}/{task-id}
Method
POST
Parameters
Do not support OData Filter syntax.
Request
Header
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
Body
{% codeblock lang:json %}
{
"taskId": "5f5ee4929669798c31909601",
"user": [
{
"_id": "5bce7df753b66e19aaa3e862",
"sourceId": "e5d147a2-3780-4187-b97f-5b9a1bbfe243",
"displayName": "Nina Lowery",
"email": "nina.lowery@anadea",
"source": "Microsoft.Graph.User",
"username": "ninalowery@anadea.com",
"mapping": [],
"svgIcon": "ic_source_graph_24px",
"title": "Microsoft Graph"
}
]
}
{% endcodeblock %}
Response
Success
Code: 200 OK
If successful, this method returns a 200 OK response code and the user object in the response body.
Error
If the --Cookie: graphNodeCookie=[ID]
expires, returns
This method returns 404 Not Found
and Must run inside Microsoft Teams.
message when missing --x-appvity-channelId
or --x-appvity-teamid
Example
Request
curl --location --request GET 'https://teams.appvity.com/api/tasks?t=1600055978590&$count=true&$top=16&$orderby=internalId%20desc' \
--header 'x-appvity-groupId: f87faa71-57a8-4c14-91f0-517f54645106' \
--header 'x-appvity-channelId: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--header 'Content-Type: application/json' \
--header 'Cookie: graphNodeCookie=s%3A7fny8dhq1t5QO4Z9UNMYylwYpS0WfpRC.8vknvG34SrmKol3FvYAzcKdzPa28mDQIxt48qc0LrBE'
Response
{% codeblock lang:json %}
{
"taskId": "5f5ee4929669798c31909601",
"user": [
{
"_id": "5bce7df753b66e19aaa3e862",
"sourceId": "e5d147a2-3780-4187-b97f-5b9a1bbfe243",
"displayName": "Nina Lowery",
"email": "nina.lowery@anadea",
"source": "Microsoft.Graph.User",
"username": "ninalowery@anadea.com",
"mapping": [],
"svgIcon": "ic_source_graph_24px",
"title": "Microsoft Graph"
}
]
}
{% endcodeblock %}