Create task
Create a new task in the current channel that user is in. All the inputted fields will be posted.
POST /odata/tasks
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
--data-raw: {Task-Object}
URL Endpoint
odata/tasks.
Method
POST
Parameters
No Support OData Filter syntax.
Request
Header
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
Body
{
"source": "Microsoft.Vsts",
"name": "VSTS",
"owner": "Cora Rowland",
"priority": "Normal",
"status": "Not Started",
"body": "",
"startDate": "2020-03-05T00:00:00Z",
"dueDate": "2020-04-06T00:00:00Z",
"effort": "",
"phase": "Anadea\\Sprint 1",
"phaseName": "Anadea\\Sprint 1",
"bucket": null,
"bucketName": null,
"projectId": "5f486bac2267befa2bb93814",
"assignedTo": [
{
"displayName": "Oliver Neal",
"email": "oliver@anadea.com",
"source": "Microsoft.Graph.User",
"sourceId": "5083cb81-35f4-4abd-ba2d-e7b9965c1f89",
"username": "oliver@anadea.com",
"_id": "5e12cac785c88e43cb38bbaf"
}
],
"attachments": [],
"completedDate": null
}
Response
Success
Code: 201 Created
.
If successful, this method returns a 201 Created
response code and task object in the response body.
Error
Code: 400 Bad Request, 401 Unauthorized, 500 Error Exception.
Content: { error : "error message" }
Example
Request
curl --location --request POST 'https://teams.appvity.com/odata/tasks' \
--header 'x-appvity-channelId: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--header 'x-appvity-teamid: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--header 'Cookie: graphNodeCookie=s%3AlaIrRjrQdBULLxHHgBM0ofupyqfGBmRf.4vy0SDHjNaJ9%2Fa3MeJbeIOQchnkP1NNAQTv9AViLawk' \
--data-binary '
{
"source": "Microsoft.Vsts",
"name": "VSTS",
"owner": "Cora Rowland",
"priority": "Normal",
"status": "Not Started",
"body": "",
"startDate": "2020-03-05T00:00:00Z",
"dueDate": "2020-04-06T00:00:00Z",
"effort": "",
"phase":"Anadea\\Sprint 1",
"phaseName":"Anadea\\Sprint 1",
"bucket": null,
"bucketName": null,
"projectId": "5f486bac2267befa2bb93814",
"assignedTo": [
{
"displayName": "Oliver Neal",
"email": "oliver@anadea.com",
"source": "Microsoft.Graph.User",
"sourceId": "5083cb81-35f4-4abd-ba2d-e7b9965c1f89",
"username": "oliver@anadea.com",
"_id": "5e12cac785c88e43cb38bbaf"
}
],
"attachments": [],
"completedDate": null
}
' \
Response
{
"source": "Microsoft.Vsts",
"name": "VSTS",
"owner": "Cora Rowland",
"priority": "Normal",
"status": "Not Started",
"body": "",
"startDate": "2020-03-05T00:00:00Z",
"dueDate": "2020-04-06T00:00:00Z",
"effort": "",
"phase":"Anadea\\Sprint 1",
"phaseName":"Anadea\\Sprint 1",
"bucket": null,
"bucketName": null,
"projectId": "5f486bac2267befa2bb93814",
"assignedTo": [
{
"displayName": "Oliver Neal",
"email": "oliver@anadea",
"source": "Microsoft.Graph.User",
"sourceId": "5083cb81-35f4-4abd-ba2d-e7b9965c1f89",
"username": "oliver@anadea.com",
"_id": "5e12cac785c88e43cb38bbaf"
}
],
"attachments": [],
"completedDate": null