Create a new task in a specified space. The task can include uploaded file(s). To upload a file with a task:
- Get the upload URL from /api/files/getuploadurl and note the fileKey value from the response.
- Use the fileKey from step one as the fileId in the request body.
URL Parameters
Name | Description | Location | Required | Default Value |
---|
spaceId | Unique identifier of the space. | path | Yes | |
notify | Boolean value that determines whether assigned users are notified. | query | No | true |
Body Parameters
Name | Description | JSON type | Required | Default Value |
---|
content | Object with task properties.- bodyText: (string) message text to send
- data: (array) array of objects representing attached files
- fileId: (string) fileKey from /files/getuploadurl
- fileSize: (int) size of file in bytes
- fileType: (string) 'image', 'video', 'audio', or (default) 'document'
- name: (string) file name
- provider: (string) 'native'
- providerFileType: (string) MIME type
- thumbnailFile: (string) fileKey of thumbnail from /files/getuploadurl
- description: (string) optional description.
- status: status of the task: 'pending' or 'completed'..
| object | Yes | |
assignees | UserIds of task members. | array | Yes | |
dueDate | Date the task is to be completed. | string | Yes | |
status | Status of the task: 0 or 1. | integer | Yes | |
Authentication
JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator
Authorization
PERM_TOPIC_UPDATE
Example Request
URL
POST https://spacesapis.avayacloud.com/api/spaces/{spaceId}/tasks
Headers
Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"
Or
Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"
Body
{
"status": 0,
"content": {
"bodyText": "task + file",
"description": "this is a task , enclosed a file",
"data": [
{
"fileId": "80b65d25-d960-4356-ab4d-8b09590efcd0",
"fileSize": 3239,
"fileType": "document",
"icon": "",
"name": "env2 (1)",
"provider": "native",
"providerFileType": ""
}
],
"assignees": [],
"dueDate": "",
"status": "pending"
}
}
Example Response
{
"data": [
{
"sender": {
"_id": "5efc5417aa4a347af96de290",
"type": "user",
"username": "testavimas1899@gmail.com",
"displayname": "test test",
"picture_url": "https://storage.googleapis.com/onesna/pictures/pfpic_testavimas1899_29bef4a8-99b0-4901-86c7-567a64d9dcbb"
},
"content": {
"endTime": null,
"mediaMode": "audio",
"virtualEndTime": null,
"meetingStatus": "active",
"bodyText": "task + file",
"description": "this is a task , enclosed a file",
"data": [
{
"metaData": {
"paging": 0,
"prvwProvd": "gcs",
"stgeProvd": "gcs"
},
"keywords": [],
"convertStatus": 0,
"convertStart": null,
"nextSchedule": null,
"pages": 0,
"recordingId": null,
"type": null,
"provider": "native",
"providerFileType": "",
"fileType": "document",
"name": "env2 (1)",
"fileId": "80b65d25-d960-4356-ab4d-8b09590efcd0",
"icon": "",
"thumbnail": "",
"description": "",
"previewFile": "",
"fileSize": 3239,
"thumbnailFile": "",
"path": "https://storage.googleapis.com/spaces2020/logan%2F80b65d25-d960-4356-ab4d-8b09590efcd0?GoogleAccessId=spaces2020@spaces-2018.iam.gserviceaccount.com&Expires=1596728522&Signature=eKSZ66%2BSCkXVCX8mUaIBx%2FsIKwWcCXuxECFpFmuw1X3P8WuLzfJLi4G%2F0U4RFDvrtu3NCeBz5YVJKagb%2FgeJGCwb7Y63SmbypcKi5sd2NPfJVvHJmw0QLWjtBUi43D%2B1IZkP0n3dkpxl9QjiXd0ntsLQVF8Nm2wdyfUnpFPsjCnHhKF30Q1J62GETwEDb7Gv6cN8ZkOJpW2MEawCkeqcY2Mdz4%2Bji5IdWN4Cc1ShvuxscWgyTxZVsjzAcq4Tis0Sv3DOeWOdneLg7O4MQG%2FumTLIw5DsYitk4SAoidYrU6gyAqp3m7oGzXgoMEnR17VlbM0wEbLYloXv3vEbsCUgnw%3D%3D&response-content-disposition=attachment%3B%20filename%3D%22env2%20(1)%22"
}
],
"assignees": [],
"dueDate": "2020-08-06T14:11:19.979Z",
"status": "pending",
"startTime": "2020-08-06T14:11:19.992Z",
"recordings": []
},
"chatCount": 0,
"likeCount": 0,
"status": 0,
"_id": "5f2c0f8778479f00da0765c7",
"category": "task",
"topicId": "5f2276a8fe5c16664f01c5be",
"created": "2020-08-06T14:11:19.974Z",
"modified": "2020-08-06T14:11:19.974Z"
}
]
}