Fetch To-Dos created by user
POST /api/sync/v1/todos/createdTasks
Operation id: createdTodoList
Description
The API will provide a list of to-do's created by the specific user whose bearer service account token is passed in the header. The API returns paginated results based on page and pageSize parameters.
The following parameters are mandatory:
- fromDate: It should be in UTC format.
- sortBy: Values can be PRIORITY, DUE_DATE or CREATED_AT.
- sortDir: Values can be ASC or DESC.
The following parameters are optional:
- toDate: It should be in UTC format.
- statusId: Values can be [1 for DRAFT,4 for LAUNCHED, 13 for COMPLETED, 14 for RECALLED]. Multiple values are accepted. If empty[] is passed, it returns DRAFT and LAUNCHED status to-dos by default.
- priorityId: Values can be [1 for URGENT, 2 for HIGH, 3 for MEDIUM, 4 for LOW]. Multiple values are accepted. If empty [] is passed, all priorities are considered.
- viewFilter: Values can be ["ALL" OR "WATCHING"]. It returns the ALL the to-dos or if WATCHING is passed, it returns only the to-dos which are being watched by the creator. Default is ALL.
- taskTypeIds: Values can be [1 for STANDARD to-dos or 4 for CHECKLIST to-dos]. Multiple values accepted. if empty [] is passed, then both type of to-dos are returned
- page
- pageSize
- siteFilterEnum: Values can be ["CURRENT_SITE" | "ALL_SITES" | FILTER_SITES].
If value is sent as "CURRENT_SITE" then Todos which are created by current user only in current site will be returned. If value is "ALL_SITES" server will fetch all todos created by current user for all sites. If value is "FILTER_SITES" then server expects array of siteId in filterSiteIdList field and only Todos from those sites will be returned. - filterSiteIdList : Array of siteIds in case siteFilterEnum is set to FILTER_SITES
Permission Required:
- Need to be creator of the to-dos to see list of to-dos
Tags: To-Do APIs
Security
- Bearer (http / bearer)
- enter the client service token value.
Responses
200 — Task List
Content type: application/json
400 — Bad Request
401 — Unauthorized Access
403 — Forbidden
422 — Unprocessable Entity
500 — Internal Server Error
Request body
Required: Yes
application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
fromDate | string (date-time) | Yes | From Date(must be between visible and expire dates) |
toDate | string (date-time) | No | To Date(must be between visible and expire dates) |
statusId | array | No | Status ID's |
priorityId | array | No | Priority ID array |
page | integer (int32) | Yes | page Number |
pageSize | integer (int32) | Yes | no of records per page |
sortBy | string | Yes | field on which sorting needs to be applied |
sortDir | string | Yes | direction of Sort |
viewFilter | string | No | view filter that needs to be applied |
taskViewAllPermissions | boolean | No | Task View All Permissions |
taskTypeIds | array | No | task type ids on which we need to apply filter |
calendarView | boolean | No | |
siteFilterEnum | string | No | Filter Site Options |
allFilterFlag | string | No | |
filterSiteIdList | array | No | |
statusEnumSet | array | No | |
pageable | object | No |
{
"type": "object",
"required": [
"fromDate",
"page",
"pageSize",
"sortBy",
"sortDir"
],
"properties": {
"fromDate": {
"type": "string",
"format": "date-time",
"description": "From Date(must be between visible and expire dates)"
},
"toDate": {
"type": "string",
"format": "date-time",
"description": "To Date(must be between visible and expire dates)"
},
"statusId": {
"type": "array",
"description": "Status ID's",
"example": [
1,
2
],
"items": {
"type": "integer",
"format": "int32",
"description": "Status ID's"
}
},
"priorityId": {
"type": "array",
"description": "Priority ID array",
"example": [
1,
2
],
"items": {
"type": "integer",
"format": "int32",
"description": "Priority ID array"
}
},
"page": {
"type": "integer",
"format": "int32",
"description": "page Number",
"example": 1
},
"pageSize": {
"type": "integer",
"format": "int32",
"description": "no of records per page",
"example": 10
},
"sortBy": {
"type": "string",
"description": "field on which sorting needs to be applied",
"enum": [
"DUE_DATE",
"PRIORITY",
"STATUS",
"START_DATE",
"CREATED_AT",
"TITLE",
"UPDATED_AT",
"DEFAULT"
],
"example": "DEFAULT"
},
"sortDir": {
"type": "string",
"description": "direction of Sort",
"enum": [
"ASC",
"DESC"
],
"example": "ASC"
},
"viewFilter": {
"type": "string",
"description": "view filter that needs to be applied",
"enum": [
"ALL",
"WATCHING",
"CREATED_BY_ME",
"SITE_ID"
],
"example": "ALL"
},
"taskViewAllPermissions": {
"type": "boolean",
"description": "Task View All Permissions",
"example": false
},
"taskTypeIds": {
"type": "array",
"description": "task type ids on which we need to apply filter",
"example": [
1,
4
],
"items": {
"type": "integer",
"format": "int32",
"description": "task type ids on which we need to apply filter"
}
},
"calendarView": {
"type": "boolean"
},
"siteFilterEnum": {
"type": "string",
"description": "Filter Site Options",
"enum": [
"ALL_SITES",
"CURRENT_SITE",
"FILTER_SITES"
],
"example": "ALL_SITES"
},
"allFilterFlag": {
"type": "string",
"enum": [
"ALL",
"TODAY",
"TOMORROW",
"NEXT_7_DAYS",
"NEXT_30_DAYS",
"OVERDUE"
]
},
"filterSiteIdList": {
"type": "array",
"items": {
"type": "string"
}
},
"statusEnumSet": {
"type": "array",
"items": {
"type": "string",
"enum": [
"DRAFT",
"PENDING_APPROVAL",
"REJECTED",
"LAUNCHED",
"APPROVED",
"NEW",
"READ",
"COMPLETED",
"OVERDUE",
"EXPIRED",
"RECALLED",
"PENDING_LAUNCH",
"COMPLETED_LATE",
"ONGOING",
"DISCARDED",
"APPLIED"
]
}
},
"pageable": {
"type": "object",
"properties": {
"offset": {
"type": "integer",
"format": "int64"
},
"sort": {
"type": "array",
"items": {
"type": "object",
"properties": {
"direction": {
"type": "string"
},
"nullHandling": {
"type": "string"
},
"ascending": {
"type": "boolean"
},
"property": {
"type": "string"
},
"ignoreCase": {
"type": "boolean"
}
}
}
},
"paged": {
"type": "boolean"
},
"pageSize": {
"type": "integer",
"format": "int32"
},
"pageNumber": {
"type": "integer",
"format": "int32"
},
"unpaged": {
"type": "boolean"
}
}
}
}
}
Response models
200 — Task List
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
message | string | No | |
status | string | No | |
statusCode | integer (int32) | No | |
debugErrorMessage | string | No | |
messageCode | string | No | |
messageParams | array | No | |
paginationMap | object | No | |
tasks | array | No | |
data | object | No |
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"SUCCESS",
"FAIL",
"BAD_REQUEST",
"NO_CONTENT",
"UNAUTHORIZED",
"FORBIDDEN",
"NOT_FOUND",
"INTERNAL_SERVER_ERROR",
"UNSUPPORTED_MEDIA_TYPE",
"UNPROCESSABLE_ENTITY",
"CONFLICT"
]
},
"statusCode": {
"type": "integer",
"format": "int32"
},
"debugErrorMessage": {
"type": "string"
},
"messageCode": {
"type": "string"
},
"messageParams": {
"type": "array",
"items": {
"type": "string"
}
},
"paginationMap": {
"type": "object",
"properties": {
"totalElements": {
"type": "integer",
"format": "int32"
},
"totalPages": {
"type": "integer",
"format": "int32"
},
"last": {
"type": "boolean"
},
"first": {
"type": "boolean"
},
"currentPage": {
"type": "integer",
"format": "int32"
},
"pageSize": {
"type": "integer",
"format": "int32"
}
}
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"taskId": {
"type": "integer",
"format": "int32"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"priority": {
"type": "object",
"properties": {
"priorityId": {
"type": "integer",
"format": "int32",
"description": "priority Id"
},
"value": {
"type": "integer",
"format": "int32",
"description": "priority value"
},
"name": {
"type": "string",
"description": "name of Priority"
},
"displayName": {
"type": "string",
"description": "display Name of Priority"
}
}
},
"dueDate": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "customer status Id"
},
"name": {
"type": "string",
"description": "customer status name"
},
"displayName": {
"type": "string",
"description": "customer status display name"
}
}
},
"assignmentId": {
"type": "integer",
"format": "int32"
},
"approvalAssignmentId": {
"type": "integer",
"format": "int32"
},
"assignmentName": {
"type": "string"
},
"watcher": {
"type": "boolean"
},
"confidential": {
"type": "boolean"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"editedStatus": {
"type": "boolean"
},
"resetStatus": {
"type": "boolean"
},
"taskType": {
"type": "string"
}
}
}
},
"data": {
"type": "object"
}
}
}