Fetch To-Dos assigned to a user

POST /api/sync/v1/todos/assignedTasks

Operation id: fetchAssignedTodos

Description

The API will provide a list of to-do's assigned to 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: 1)fromDate: It should be in UTC format. 2)page 3)pageSize

The following parameters are optional:

  1. toDate: It should be in UTC format.
  2. statusId: Values can be [8 for NEW,10 for READ, 10 for COMPLETED(Assignments), 12 for EXPIRED, 18 for COMPLETED LATE]. Multiple values are accepted. If empty[] is passed, by default only NEW and READ status assignments are shown.
  3. priorityId: Values can be [1 for URGENT, 2 for HIGH, 3 for MEDIUM, 4 for LOW]. Multiple values are accepted.If empty [] is passed, it considers all priority.
  4. taskTypeIds: Values can be [1 for STANDARD to-dos or 4 for CHECKLIST to-dos]. Multiple values accepted. If empty [] is passed; it considers both.
  5. sortBy: Values can be PRIORITY, DUE_DATE or CREATED_AT. Default is by PRIORITY
  6. sortDir: Values can be ASC or DESC. Default is ASC
  7. 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.
  8. filterSiteIdList : Array of siteIds in case siteFilterEnum is set to FILTER_SITES

Permission Required:

  1. Should be a recipient in the created to-dos to see the list of assignments assigned

Tags: To-Do Execution APIs

Security

  • Bearer (http / bearer)
    • enter the client service token value.

Responses

200 — ToDo List

Content type: application/json

400 — Bad Request

401 — Unauthorised Access

500 — Internal Server Error

Request body

Required: Yes

application/json

Schema

PropertyTypeRequiredDescription
fromDatestring (date-time)YesFrom Date(must be between visible and expire dates)
toDatestring (date-time)NoTo Date(must be between visible and expire dates)
statusIdarrayNoStatus ID's
priorityIdarrayNoPriority ID array
pageinteger (int32)Yespage Number
pageSizeinteger (int32)Yesno of records per page
sortBystringNofield on which sorting needs to be applied
sortDirstringNodirection of Sort
taskTypeIdsarrayNotask type ids on which we need to apply filter
allFilterFlagstringNoTo Do DropDown Filter Flag
searchTitlestringNoSearch Title Heading
filterSiteIdListarrayNoList of sites to filter tasks when siteFilterEnum is FILTER_SITES
siteFilterEnumstringNoFilter Site Options
pageableobjectNo
statusEnumSetarrayNo
{
  "type": "object",
  "required": [
    "fromDate",
    "page",
    "pageSize"
  ],
  "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",
        "DEFAULT"
      ],
      "example": "DEFAULT"
    },
    "sortDir": {
      "type": "string",
      "description": "direction of Sort",
      "enum": [
        "ASC",
        "DESC"
      ],
      "example": "ASC"
    },
    "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"
      }
    },
    "allFilterFlag": {
      "type": "string",
      "description": "To Do DropDown Filter Flag",
      "enum": [
        "ALL",
        "TODAY",
        "TOMORROW",
        "NEXT_7_DAYS",
        "NEXT_30_DAYS",
        "OVERDUE",
        "Overdue",
        "All",
        "Today",
        "Tomorrow"
      ],
      "example": "ALL"
    },
    "searchTitle": {
      "type": "string",
      "description": "Search Title Heading"
    },
    "filterSiteIdList": {
      "type": "array",
      "description": "List of sites to filter tasks when siteFilterEnum is FILTER_SITES",
      "example": "[SiteA, SiteB, SiteC]",
      "items": {
        "type": "string",
        "description": "List of sites to filter tasks when siteFilterEnum is FILTER_SITES",
        "example": "[SiteA, SiteB, SiteC]"
      }
    },
    "siteFilterEnum": {
      "type": "string",
      "description": "Filter Site Options",
      "enum": [
        "ALL_SITES",
        "CURRENT_SITE",
        "FILTER_SITES"
      ],
      "example": "ALL_SITES"
    },
    "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"
        }
      }
    },
    "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"
        ]
      }
    }
  }
}

Response models

200 — ToDo List

Content type: application/json

Schema

PropertyTypeRequiredDescription
messagestringNo
statusstringNo
statusCodeinteger (int32)No
debugErrorMessagestringNo
messageCodestringNo
messageParamsarrayNo
paginationMapobjectNo
tasksarrayNo
dataobjectNo
{
  "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"
    }
  }
}