Create Status
Creates a new state for the eSource in a specific channel.
Note: Planner, Azure DevOps, and Jira source cannot be used to the newly generated status until it is mapped to the corresponding state from the source.
POST odata/status
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
--data-raw: {StatusObject}
URL Endpoint
odata/status
Method
POST.
Parameters
Do not supply OData Filter syntax.
Request
Header
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
Body
In the request body, supply a JSON representation of Status object.
Response
If successful, this method returns 201 Created response code and status object in the response body.
Error
Code: 400 Bad Request.
{
"code": "Status already existed.",
"message": "Status already existed."
}
Example
Request
Here is an example of the request.
curl --location --request POST 'https://teams.appvity.com/odata/status' \
--header 'x-appvity-channelId:
19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--header 'x-appvity-teamid: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2'
\
--header 'Cookie:
graphNodeCookie=s%3AMpKXEvYTIRehispfYing8S-UZDmeZUac.eiaEBf3drVuQEY3UqTZv7nQ8Qmz4egC2HRzPxbwwmuc'
\
--data-raw '{
"name": "B",
"color": "#f3ff7f",
"category": "Active",
"description": "thuy",
"primary": false,
"order": 5,
"value": 5,
"type": "Task"
}'
Response
Here is an example of the response.
{
"@odata.context":
"https://schema.appvity.com/odata/$metadata#status/$entity",
"@odata.editLink":
"https://schema.appvity.com/odata/status('5f6d53734d596392f5910bfb')",
"@odata.id":
"https://schema.appvity.com/odata/status('5f6d53734d596392f5910bfb')",
"name": "B",
"color": "#f3ff7f",
"category": "Active",
"description": "thuy",
"primary": false,
"order": 5,
"value": 5,
"type": "Task",
"createdAt": "2020-09-25T02:18:27.642Z",
"updatedAt": "2020-09-25T02:18:27.642Z",
"_id": "5f6d53734d596392f5910bfb"
}