Authorization is performed by JWT token - currently one time issued on request - further automation can be addressed if necessary. You can read more on JWT https://jwt.io/introduction/
Each app token is valid for 365 days and can be revoked which terminates its validity immediately.
Example
Authorization: Bearer $TOKEN
Additionally there is a need to provide a header specifying user for given action.
Example
ws-user-id: U12345
Example of curl usage of both TOKEN and ws-user-id header
curl -H 'ws-user-id: U12345' -H 'Authorization: Bearer $TOKEN' https://rest.workstreams.ai/api/users/me
Workstreams.ai provides staging environment which will not mess up your production tasks and statistics.
These 2 environments have completely independent storages.
! HOWEVER THEY SHARE SAME SLACK WORKSPACE AND MEMBERSHIP IN THE CHANNELS !
That means that there are few possible approaches for developing against staging:
1. Select channels to play with which don’t interfere with your main communication and work
2. Create different Slack workspace purely for testing purposes and don’t interfere on Slack main workspace at all
If you decide for 2 let us know Slack Workspace domain or ID and we’ll provide you with correct tokens for that workspace
https://rest.workstreams.ai
https://api-dev.workstreams.ai
Example of Task object
{
"title": "Example Workstreams task",
"labels": [
"b7459e8d-3410-4ab3-b000-5265538c699a",
"9616b58d-8510-4b83-bfc0-24e152183321"
],
"checklist": [
{
"text": "aaa",
"checked": false
},
{
"text": "vvv",
"checked": false
}
],
"assignee": "U4VCC0CLF",
"description": "Includes description",
"teamId": "T4U1FJD89",
"channelId": "CG5K4EJFM",
"streamId": "T4U1FJD89-CG5K4EJFM",
"createdBy": "U4VCC0CLF",
"updatedBy": "U4VCC0CLF",
"humanTaskId": "BKT-1",
"taskId": "d0e548c9-aa3a-4b78-8b3a-4105a64f5bda",
"createDate": 1560333658779,
"updateDate": 1560333658779,
"priority": 1560333658779,
"statusId": "planned",
"stepId": "new"
}
CREATE NEW TASK
POST /api/tasks/team/:teamId/channel/:channelId,
Example
POST /api/tasks/team/T3T7BFHGV/channel/C3T7D66J1
Request Body:
{
"title": "test task",
"labels": [
"init-labelid123"
],
"dueDate": "2018-03-07T11:46:17Z",
"assignee": "U3T716H3N",
"checklist": [
{
"text": "aaa",
"checked": false
},
{
"text": "vvv",
"checked": false
}
]
}
Response Body:
{
"title": "test task",
"labels": [
"init-labelid123"
],
"dueDate": 1520459999999,
"assignee": "U3T716H3N",
"teamId": "T3T7BFHGV",
"channelId": "C3T7D66J1",
"streamId": "T3T7BFHGV-C3T7D66J1",
"createdBy": "U3T716H3N",
"updatedBy": "U3T716H3N",
"humanTaskId": null,
"taskId": "d62fbf1d-cddb-40fe-b597-cc2305a7cc4b",
"createDate": 1560262622686,
"updateDate": 1560262622686,
"priority": 1560262622686,
"statusId": "planned",
"stepId": "new",
"timeOffset": 120
}
UPDATE EXISTING TASK
PATCH /api/tasks/:taskId
Example
PATCH /api/tasks/d62fbf1d-cddb-40fe-b597-cc2305a7cc4b
Request Body:
{
"title": "DESERT DWELLER",
"labels": [
"init-labelid123",
"3283db48-ed5e-4f0a-89fb-590f7b01fa1b",
"e14b015f-cf50-4cc3-9d38-5771318395c4",
"fd114a0f-71f2-4f80-b601-8d76267e0f7a"
],
}
Response Body:
{
"updateDate": 1560262623972,
"taskId": "d62fbf1d-cddb-40fe-b597-cc2305a7cc4b",
"dueDate": 1520459999999,
"assignee": "U3T716H3N",
"priority": 1560262622686,
"updatedBy": "U3T716H3N",
"teamId": "T3T7BFHGV",
"createdBy": "U3T716H3N",
"timeOffset": 120,
"statusId": "planned",
"createDate": 1560262622686,
"channelId": "C3T7D66J1",
"labels": [
"init-labelid123",
"3283db48-ed5e-4f0a-89fb-590f7b01fa1b",
"e14b015f-cf50-4cc3-9d38-5771318395c4",
"fd114a0f-71f2-4f80-b601-8d76267e0f7a"
],
"stepId": "new",
"humanTaskId": null,
"streamId": "T3T7BFHGV-C3T7D66J1",
"title": "DESERT DWELLER",
}
GET SINGLE EXISTING TASK
GET /api/tasks/:taskId
Example
GET /api/tasks/d62fbf1d-cddb-40fe-b597-cc2305a7cc4b
Response Body:
{
"updateDate": 1560262627156,
"_meta": {
"version": {
"threads": 1560262627156,
"updateDate": 1560262627156,
"attachedFiles": 1560262623972,
"title": 1560262623972,
"labels": 1560262623972
}
},
"taskId": "d62fbf1d-cddb-40fe-b597-cc2305a7cc4b",
"dueDate": 1520459999999,
"assignee": "U3T716H3N",
"priority": 1560262622686,
"threads": {
"C3T7D66J1": "1560262626.004100"
},
"updatedBy": "U3T716H3N",
"teamId": "T3T7BFHGV",
"createdBy": "U3T716H3N",
"timeOffset": 120,
"statusId": "planned",
"createDate": 1560262622686,
"channelId": "C3T7D66J1",
"labels": [
"3283db48-ed5e-4f0a-89fb-590f7b01fa1b",
"e14b015f-cf50-4cc3-9d38-5771318395c4",
"fd114a0f-71f2-4f80-b601-8d76267e0f7a",
"init-labelid123"
],
"stepId": "new",
"humanTaskId": null,
"streamId": "T3T7BFHGV-C3T7D66J1",
"title": "DESERT DWELLER"
}
GET ALL TASKS OF SINGLE USER
GET /api/tasks/team/:teamId/user/:userId
Example
GET /api/tasks/team/T4U1FJD89/user/U4VCC0CLF
Response Body:
[
{
"updateDate": 1545083651903,
"_meta": {
"version": {
"threads": 1545083651903,
"updateDate": 1545083651903
}
},
"taskId": "c311f406-05cd-4845-ab3e-6143e2694cc3",
"assignee": "U4VCC0CLF",
"priority": 67579.6875,
"threads": {
"CEWCX5ASZ": "1545083651.000700"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1545083648301,
"archived": false,
"channelId": "CEWCX5ASZ",
"trelloId": "5ba7ff032eee2b5593fe7ad0",
"labels": [
"12faf5ba-d254-447b-86db-5ca4c6c19668",
"babf3ba1-44b8-4854-8aca-9ecfd480da2c"
],
"description": "here comes description",
"stepId": "5b9f91b7f369d66bffa59c35",
"humanTaskId": null,
"streamId": "T4U1FJD89-CEWCX5ASZ",
"title": "Prevent syncing if given taskboard is already connected - provide option to disconect"
},
{
"updateDate": 1545084376053,
"_meta": {
"version": {
"stepId": 1545084376053,
"threads": 1545084333721,
"description": 1545084368525,
"updateDate": 1545084376053,
"statusId": 1545084376053
}
},
"taskId": "1083e990-309b-401a-a5a6-5df64bdb3b88",
"dueDate": null,
"assignee": "U4VCC0CLF",
"priority": 67579.6875,
"threads": {
"CEVF2NED6": "1545084333.000900"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "progress",
"createDate": 1545084329567,
"archived": false,
"channelId": "CEVF2NED6",
"trelloId": "5ba7ff032eee2b5593fe7ad0",
"labels": [
"12faf5ba-d254-447b-86db-5ca4c6c19668",
"babf3ba1-44b8-4854-8aca-9ecfd480da2c"
],
"description": "here comes description - changed",
"stepId": "5ba39cbf2daa6449739cbcb1",
"humanTaskId": null,
"streamId": "T4U1FJD89-CEVF2NED6",
"title": "Prevent syncing if given taskboard is already connected - provide option to disconect"
},
{
"updateDate": 1545126412126,
"_meta": {
"version": {
"threads": 1545126412126,
"updateDate": 1545126412126
}
},
"taskId": "294065fa-d59e-4a0a-b1f8-d6a3c97a2f08",
"assignee": "U4VCC0CLF",
"priority": 67579.6875,
"threads": {
"CEW0C6PFT": "1545126411.000700"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1545126408616,
"archived": false,
"channelId": "CEW0C6PFT",
"trelloId": "5ba7ff032eee2b5593fe7ad0",
"labels": [
"12faf5ba-d254-447b-86db-5ca4c6c19668",
"babf3ba1-44b8-4854-8aca-9ecfd480da2c"
],
"description": "here comes description",
"stepId": "5b9f91b7f369d66bffa59c35",
"humanTaskId": null,
"streamId": "T4U1FJD89-CEW0C6PFT"
}
]
GET ALL TASKS OF MULTIPLE USERS
GET /api/tasks/team/:teamId/users/:userIds
Example
GET /api/tasks/team/T4U1FJD89/users/U7K9N5B0B,U4VCC0CLF
Response Body:
[
{
"updateDate": 1550588567160,
"_meta": {
"version": {
"stepId": 1550588567160,
"threads": 1550054634363,
"updateDate": 1550588567160,
"statusId": 1550588567160,
"priority": 1550588567160
}
},
"taskId": "7ce12318-3e8d-4893-bd4c-e64058f156b2",
"assignee": "U4VCC0CLF",
"priority": 1550054707975,
"threads": {
"CG5K4EJFM": "1550054634.000600"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1550054633052,
"channelId": "CG5K4EJFM",
"description": "Don't you think?",
"stepId": "new",
"humanTaskId": null,
"streamId": "T4U1FJD89-CG5K4EJFM",
"title": "Block kit will be awesome"
},
{
"updateDate": 1550054753320,
"_meta": {
"version": {
"threads": 1550054726191,
"updateDate": 1550054753319,
"assignee": 1550054731429,
"dueDate": 1550054753319
}
},
"taskId": "70ce7ee1-23c9-4311-a411-0c262851e810",
"dueDate": 1550185199999,
"assignee": "U4VCC0CLF",
"priority": 1550054724234,
"threads": {
"CG5K4EJFM": "1550054725.001900"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1550054724234,
"channelId": "CG5K4EJFM",
"description": "old school was cool befofere new school became uncool",
"stepId": "new",
"humanTaskId": null,
"streamId": "T4U1FJD89-CG5K4EJFM",
"title": "Full view is old schoool"
},
{
"updateDate": 1550703300573,
"_meta": {
"version": {
"threads": 1550589164749,
"updateDate": 1550703300573,
"labels": 1550703300573
}
},
"taskId": "f244e8af-f6e9-4142-a437-1ac275e2f490",
"assignee": "U4VCC0CLF",
"priority": 1550061636496,
"threads": {
"CG5K4EJFM": "1550589164.005500"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "progress",
"createDate": 1550589163543,
"channelId": "CG5K4EJFM",
"labels": [
"12faf5ba-d254-447b-86db-5ca4c6c19668"
],
"stepId": "in_work",
"humanTaskId": null,
"streamId": "T4U1FJD89-CG5K4EJFM",
"title": "DUPLICATE ME"
}
]
GET ALL TASKS BY LABEL
GET /api/tasks/team/:teamId/labels/:labelId
Example
GET /api/tasks/team/T4U1FJD89/labels/my-label-1
Response body:
[
{
"_meta": {
"version": {
"threads": 1558997053082,
"updateDate": 1558997053082
}
},
"labels":["my-label-1"],
"updateDate": 1558997053082,
"taskId": "822e71ac-de79-461d-a02a-df7e276af181",
"threads": {
"CGQ37Q4PJ": "1558997052.000400"
},
"priority": 1558997050361,
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1558997050361,
"channelId": "CGQ37Q4PJ",
"stepId": "new",
"humanTaskId": null,
"streamId": "T4U1FJD89-CGQ37Q4PJ",
"title": "another ribs session"
},
GET ALL TASKS WITHIN MULTIPLE CHANNELS
GET /api/tasks/team/:teamId/channels/:channelIds
Example
GET /api/tasks/team/T4U1FJD89/channels/CGQ37Q4PJ,G8V9TQDHU
Response Body:
[
{
"_meta": {
"version": {
"threads": 1558997053082,
"updateDate": 1558997053082
}
},
"updateDate": 1558997053082,
"taskId": "822e71ac-de79-461d-a02a-df7e276af181",
"threads": {
"CGQ37Q4PJ": "1558997052.000400"
},
"priority": 1558997050361,
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1558997050361,
"channelId": "CGQ37Q4PJ",
"stepId": "new",
"humanTaskId": null,
"streamId": "T4U1FJD89-CGQ37Q4PJ",
"title": "another ribs session"
},
{
"_meta": {
"version": {
"threads": 1558997057017,
"updateDate": 1558997057017
}
},
"updateDate": 1558997057017,
"taskId": "663baafa-bc77-44c1-91ac-a9fc1268f78e",
"threads": {
"CGQ37Q4PJ": "1558997056.000700"
},
"priority": 1558997054942,
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1558997054942,
"channelId": "CGQ37Q4PJ",
"stepId": "new",
"humanTaskId": null,
"streamId": "T4U1FJD89-CGQ37Q4PJ",
"title": "one other task"
},
{
"_meta": {
"version": {
"threads": 1558997065307,
"updateDate": 1558997065307
}
},
"updateDate": 1558997065307,
"taskId": "80a99d84-8c80-4c63-a8cb-214966a07f8b",
"threads": {
"CGQ37Q4PJ": "1558997065.001000"
},
"priority": 1558997063381,
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1558997063381,
"channelId": "CGQ37Q4PJ",
"stepId": "new",
"humanTaskId": null,
"streamId": "T4U1FJD89-CGQ37Q4PJ",
"title": "lets get some shit done"
},
{
"_meta": {
"version": {
"threads": 1516220399924,
"updateDate": 1560331030835,
"assignee": 1560331030835
}
},
"updateDate": 1560331030835,
"taskId": "c84fb6c6-08ce-492a-874a-06f798c7be4d",
"assignee": "U7K9N5B0B",
"priority": 1516220398582,
"threads": {
"G8V9TQDHU": "1516220400.000186"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "planned",
"createDate": 1516220398582,
"channelId": "G8V9TQDHU",
"stepId": "new",
"streamId": "T4U1FJD89-G8V9TQDHU",
"title": "ss"
}
]
GET ALL TASKS IN MULTIPLE CHANNELS WHICH CHANGED SINCE GIVEN TIMESTAMP
GET /api/tasks/team/:teamId/channels/:channelIds/after/:since
Example
GET /api/tasks/team/T4U1FJD89/channels/CG5K4EJFM/after/1560331680949
GET ALL ARCHIVED TASKS WITHIN MULTIPLE CHANNELS
GET /api/tasks/team/:teamId/channels/:channelIds/archived
Example
GET /api/tasks/team/T4U1FJD89/channels/D4U1G5VK3/archived
ARCHIVE MULTIPLE TASKS
PATCH /api/batch/tasks/archive
Example
PATCH /api/batch/tasks/archive
Request Body:
{
"taskIds": [
"90fedeb8-0be2-497e-8d21-41c0b788593d",
"82053725-48da-4434-bd09-2b8eaab45802",
"26338825-8bf0-4b56-8708-2a4d5f8b984d"
]
}
Response Body:
[
{
"updateDate": 1560332900316,
"_meta": {
"version": {
"archived": 1560332900316,
"updateDate": 1560332900316,
"attachedFiles": 1550868485584,
"statusId": 1552146645094,
"dueDate": 1552147646263,
"stepId": 1552146645094,
"threads": 1550868421474,
"description": 1552146622445,
"assignee": 1552146582753,
"title": 1552146622445,
"labels": 1552147635263
}
},
"taskId": "90fedeb8-0be2-497e-8d21-41c0b788593d",
"dueDate": 1552431599999,
"assignee": "U4UQ22X8D",
"priority": 1550868419999,
"threads": {
"CG5K4EJFM": "1550868421.000400"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "completed",
"createDate": 1550868419999,
"channelId": "CG5K4EJFM",
"archived": true,
"labels": [
"0b5bc042-3ec5-425b-882f-e89003a0804c"
],
"description": null,
"stepId": "deployed",
"humanTaskId": null,
"streamId": "T4U1FJD89-CG5K4EJFM",
"title": "BASEL is cloudy today",
},
{
"updateDate": 1560332900323,
"_meta": {
"version": {
"stepId": 1560332884013,
"threads": 1550589195766,
"updateDate": 1560332900323,
"priority": 1560332884013,
"statusId": 1560332884013,
"labels": 1550703300624,
"archived": 1560332900323
}
},
"taskId": "82053725-48da-4434-bd09-2b8eaab45802",
"assignee": "U4VCC0CLF",
"priority": 1550868420000,
"threads": {
"CG5K4EJFM": "1550589195.007300"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "completed",
"createDate": 1550589194168,
"channelId": "CG5K4EJFM",
"labels": [
"12faf5ba-d254-447b-86db-5ca4c6c19668"
],
"stepId": "deployed",
"humanTaskId": null,
"streamId": "T4U1FJD89-CG5K4EJFM",
"title": "DUPLICATE ME",
"archived": true
},
{
"updateDate": 1560332901138,
"_meta": {
"version": {
"stepId": 1560332886270,
"threads": 1550054693113,
"description": 1550674145244,
"updateDate": 1560332901138,
"priority": 1560332886270,
"statusId": 1560332886270,
"archived": 1560332901138
}
},
"taskId": "26338825-8bf0-4b56-8708-2a4d5f8b984d",
"priority": 1550868420001,
"threads": {
"CG5K4EJFM": "1550054692.001300"
},
"updatedBy": "U4VCC0CLF",
"teamId": "T4U1FJD89",
"createdBy": "U4VCC0CLF",
"statusId": "completed",
"createDate": 1550054691716,
"channelId": "CG5K4EJFM",
"description": "Here's descrtiption for task",
"stepId": "deployed",
"humanTaskId": null,
"streamId": "T4U1FJD89-CG5K4EJFM",
"title": "another task with Block kit",
"archived": true
}
]
RESTORE MULTIPLE TASKS FROM ARCHIVE
PATCH /api/batch/tasks/restore
Example
PATCH /api/batch/tasks/restore
Request Body:
{
"taskIds": [
"26338825-8bf0-4b56-8708-2a4d5f8b984d",
"82053725-48da-4434-bd09-2b8eaab45802",
"90fedeb8-0be2-497e-8d21-41c0b788593d"
]
}
Example of Label object
{
"color": "#a2e",
"textValue": "release 23",
"kind": "default",
"teamId": "T3T7BFHGV",
"labelId": "a90936a9-826f-42a6-a803-157202dcefc8"
}
CREATE NEW LABEL
POST /api/labels/team/:teamId
Example
POST /api/labels/team/T3T7BFHGV
Request Body:
{
"color": "#a2e",
"textValue": "release 23",
"kind": "default",
"teamId": "T3T7BFHGV"
}
Response Body:
{
"color": "#a2e",
"textValue": "release 23",
"kind": "default",
"teamId": "T3T7BFHGV",
"labelId": "a90936a9-826f-42a6-a803-157202dcefc8"
}
FETCH ONE LABEL
GET /api/labels/:labelId
Example
GET /api/labels/a90936a9-826f-42a6-a803-157202dcefc8
Response Body:
{
"textValue": "release 23",
"labelId": "a90936a9-826f-42a6-a803-157202dcefc8",
"teamId": "T3T7BFHGV",
"kind": "default",
"color": "#a2e"
}
FETCH ALL TEAM LABELS
GET /api/labels/team/:teamId
Example
GET /api/labels/team/T3T7BFHGV
Response Body:
[
{
"textValue": "892e31e7-084d-4c4a-9123",
"labelId": "2abd21b5-d4ca-4224-b791-4a03c567834a",
"teamId": "T3T7BFHGV",
"kind": "default",
"color": "#70C23C"
},
{
"textValue": "3d8da1f8-142b-4163-9123",
"labelId": "8ca8a505-3bc3-4a82-820b-bdfeb072981a",
"teamId": "T3T7BFHGV",
"kind": "default",
"color": "#49DC31"
},
{
"textValue": "a304531e-acd1-4daa-8123",
"labelId": "f176f42b-e962-4cab-87f1-b7f38fdb45a2",
"teamId": "T3T7BFHGV",
"kind": "default",
"color": "#EB03D4"
},
{
"textValue": "92e360ed-4063-4736-8123",
"labelId": "c0f2fbb3-87a5-4c77-b76a-df3dd113fd69",
"teamId": "T3T7BFHGV",
"kind": "default",
"color": "#DE2CD6"
},
{
"textValue": "985bbf64-ab9e-43d8-b123",
"labelId": "1dfd9ff1-f0bb-4146-87b2-f72035f34351",
"teamId": "T3T7BFHGV",
"kind": "default",
"color": "#889A37"
},
]
UPDATE EXISTING LABEL
PATCH /api/labels/:labelId
Example
PATCH /api/labels/a90936a9-826f-42a6-a803-157202dcefc8
Request Body:
{
"color": "#ccc",
"textValue": "another title"
}
Response Body:
{
"textValue": "another title",
"labelId": "a90936a9-826f-42a6-a803-157202dcefc8",
"teamId": "T3T7BFHGV",
"kind": "release",
"color": "#ccc"
}
** Deleting labels**
DELETE /api/labels/:labelId
Example
DELETE /api/labels/a90936a9-826f-42a6-a803-157202dcefc8
Response: 204
Example of Goal object
{
"updateDate": 1527758181493,
"createDate": 1508339045140,
"taskCriteria": {
"labels": ["ffee7248-50b0-4524-9a25-28d0e7e338e4"]
},
"mainChannel": "C4UNJPMJQ",
"dueDate": null,
"priority": 1508339045140,
"updatedBy": "U7K9N5B0B",
"teamId": "T4U1FJD89",
"description": null,
"goalId": "d8615d41-14de-4105-bdc1-4a3d7528e809",
"createdBy": "U7K9N5B0B",
"title": "new goal with slack dialog",
"relatedChannels": ["C7LEDMD1D"],
"currentStatus": {
"planned": 6,
"progress": 4,
"completed": 8
}
}
CREATE NEW GOAL
POST /api/team/:teamId/goals
Example
POST /api/team/T3T7BFHGV/goals
Request Body:
{
"title": "test goal",
"description": "lets do it !",
"dueDate": 1560262601251,
"mainChannel": "C3T7D66J1",
"taskCriteria": {
"labels": [
"L12345"
]
}
}
Response Body:
{
"title": "test goal",
"description": "lets do it !",
"dueDate": 1560290399999,
"mainChannel": "C3T7D66J1",
"taskCriteria": {
"labels": [
"L12345"
]
},
"teamId": "T3T7BFHGV",
"priority": 1560262601257,
"timeOffset": 120,
"createDate": 1560262601263,
"createdBy": "U3T716H3N",
"goalId": "309d6a60-3f27-40f9-9355-c737b51c0116",
"relatedChannels": [],
"currentStatus": {
"planned": 0,
"progress": 0,
"completed": 0
}
}
GET ALL GOALS VISIBLE TO THE USER
GET /api/team/:teamId/goals
Example
GET /api/team/T3T7BFHGV/goals
Response Body:
[
{
"createDate": 1560262601263,
"taskCriteria": {
"labels": [
"L12345"
]
},
"mainChannel": "C3T7D66J1",
"dueDate": 1560290399999,
"priority": 1560262601257,
"teamId": "T3T7BFHGV",
"description": "lets do it !",
"goalId": "309d6a60-3f27-40f9-9355-c737b51c0116",
"createdBy": "U3T716H3N",
"timeOffset": 120,
"title": "test goal",
"relatedChannels": [],
"currentStatus": {
"planned": 0,
"progress": 0,
"completed": 0
}
},
]
UPDATE EXISTING GOAL
PATCH /api/team/:teamId/goals/:goalId
Example
PATCH /api/team/T3T7BFHGV/goals/309d6a60-3f27-40f9-9355-c737b51c0116
Request Body:
{
"title": "some new title for goal",
"dueDate": 1262304000000
}
Response Body:
{
"createDate": 1560262601263,
"taskCriteria": {
"labels": [
"L12345"
]
},
"mainChannel": "C3T7D66J1",
"dueDate": 1262383199999,
"priority": 1560262601257,
"goalId": "309d6a60-3f27-40f9-9355-c737b51c0116",
"teamId": "T3T7BFHGV",
"description": "lets do it !",
"createdBy": "U3T716H3N",
"timeOffset": 120,
"title": "some new title for goal",
"updateDate": 1560262603686,
"updatedBy": "U3T716H3N",
"relatedChannels": [],
"currentStatus": {
"planned": 0,
"progress": 0,
"completed": 0
}
}
ARCHIVE EXISTING GOAL
PATCH /api/team/:teamId/goals/:goalId
Example
PATCH /api/team/T3T7BFHGV/goals/309d6a60-3f27-40f9-9355-c737b51c0116
Request Body:
{
"archived": true
}
Response Body:
{
"archived": true,
"createDate": 1560262601263,
"taskCriteria": {
"labels": [
"L12345"
]
},
"mainChannel": "C3T7D66J1",
"dueDate": 1262383199999,
"priority": 1560262601257,
"goalId": "309d6a60-3f27-40f9-9355-c737b51c0116",
"teamId": "T3T7BFHGV",
"description": "lets do it !",
"createdBy": "U3T716H3N",
"timeOffset": 120,
"title": "some new title for goal",
"updateDate": 1560262603686,
"updatedBy": "U3T716H3N",
"relatedChannels": [],
"currentStatus": {
"planned": 0,
"progress": 0,
"completed": 0
}
}