POST v1/Tasks/Search Deprecated

Searches for tasks using the search filters passed in request body. This endpoint is deprecated. Please use v2 version of endpoint v2/tasks/search

Request Information

URI Parameters

None.

Body Parameters

All available search parameters

TaskSearchParameters
NameDescriptionTypeAdditional information
TaskName

string

None.

TaskType

Collection of Task Type Ids.

Collection of integer

None.

AccountId

integer

None.

DueDateRange

The date and time (in company time zone) when the task was dued.

DateRange

None.

Project

If both Id and Name are provided then Id takes precedence.

IdNamePair

None.

DateCreatedFrom

The date and time (in company time zone) when the task was created.

date

None.

DateCreatedTo

The date and time (in company time zone) when the task was created.

date

None.

StatusChangedTo

If provided, Status Changed To should be one of Task statuses.

integer

None.

StatusChangedDateFrom

The date and time (in company time zone) when the status of task was changed.

date

None.

StatusChangedDateTo

The date and time (in company time zone) when the status of task was changed.

date

None.

LastUpdatedDateFrom

The date and time (in company time zone) when the task was last updated.

date

None.

LastUpdatedDateTo

The date and time (in company time zone) when the task was last updated.

date

None.

PageIndex

zero-based page number

integer

None.

PageSize

Default value is 100

integer

Range: inclusive between 1 and 1000

SortExpression

Specify the field name to sort the result set by. It can be one of the fields returned by the search.

string

None.

SortOrder

Specify Sort Order. Ascending=1, Descending=2. Default value is 1 (Ascending)

integer

Range: inclusive between 1 and 2

Request Formats

application/json, text/json

Sample:
{
  "taskName": "sample string 1",
  "taskType": [
    1,
    2
  ],
  "accountId": 1,
  "dueDateRange": null,
  "project": {
    "id": 1,
    "name": "sample string 2"
  },
  "dateCreatedFrom": "2022-07-01T15:44:25.4839614-04:00",
  "dateCreatedTo": "2022-07-01T15:44:25.4839614-04:00",
  "statusChangedTo": 1,
  "statusChangedDateFrom": "2022-07-01T15:44:25.4839614-04:00",
  "statusChangedDateTo": "2022-07-01T15:44:25.4839614-04:00",
  "lastUpdatedDateFrom": "2022-07-01T15:44:25.4839614-04:00",
  "lastUpdatedDateTo": "2022-07-01T15:44:25.4839614-04:00",
  "pageIndex": 2,
  "pageSize": 3,
  "sortExpression": "sample string 4",
  "sortOrder": 5
}

application/xml, text/xml

Sample:
<TaskSearchParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Tasks">
  <PageIndex xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">2</PageIndex>
  <PageSize xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">3</PageSize>
  <SortExpression xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">sample string 4</SortExpression>
  <SortOrder xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">5</SortOrder>
  <AccountId>1</AccountId>
  <DateCreatedFrom>2022-07-01T15:44:25.4839614-04:00</DateCreatedFrom>
  <DateCreatedTo>2022-07-01T15:44:25.4839614-04:00</DateCreatedTo>
  <DueDateRange xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models" i:nil="true" />
  <LastUpdatedDateFrom>2022-07-01T15:44:25.4839614-04:00</LastUpdatedDateFrom>
  <LastUpdatedDateTo>2022-07-01T15:44:25.4839614-04:00</LastUpdatedDateTo>
  <Project xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Project>
  <StatusChangedDateFrom>2022-07-01T15:44:25.4839614-04:00</StatusChangedDateFrom>
  <StatusChangedDateTo>2022-07-01T15:44:25.4839614-04:00</StatusChangedDateTo>
  <StatusChangedTo>1</StatusChangedTo>
  <TaskName>sample string 1</TaskName>
  <TaskType xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </TaskType>
</TaskSearchParameters>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

SearchResultOfTaskSearchResult
NameDescriptionTypeAdditional information
TotalCount

integer

None.

Data

Collection of TaskSearchResult

None.

Response Formats

application/json, text/json

Sample:
{
  "totalCount": 1,
  "data": [
    {
      "id": 1,
      "taskName": "sample string 2",
      "accountId": 1,
      "accountName": "sample string 3",
      "assignedTo": "sample string 4",
      "dateCreated": "2022-07-01T15:44:25.4995743-04:00",
      "lastUpdatedDate": "2022-07-01T15:44:25.4995743-04:00",
      "status": "sample string 5",
      "statusId": 1,
      "attachmentCount": 1,
      "attachmentLastUploaded": "2022-07-01T15:44:25.4995743-04:00"
    },
    {
      "id": 1,
      "taskName": "sample string 2",
      "accountId": 1,
      "accountName": "sample string 3",
      "assignedTo": "sample string 4",
      "dateCreated": "2022-07-01T15:44:25.4995743-04:00",
      "lastUpdatedDate": "2022-07-01T15:44:25.4995743-04:00",
      "status": "sample string 5",
      "statusId": 1,
      "attachmentCount": 1,
      "attachmentLastUploaded": "2022-07-01T15:44:25.4995743-04:00"
    }
  ]
}

application/xml, text/xml

Sample:
<SearchResultOfTaskSearchResultDuETBkOZ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.Tasks">
    <d2p1:TaskSearchResult>
      <d2p1:AccountId>1</d2p1:AccountId>
      <d2p1:AccountName>sample string 3</d2p1:AccountName>
      <d2p1:AssignedTo>sample string 4</d2p1:AssignedTo>
      <d2p1:AttachmentCount>1</d2p1:AttachmentCount>
      <d2p1:AttachmentLastUploaded>2022-07-01T15:44:25.4995743-04:00</d2p1:AttachmentLastUploaded>
      <d2p1:DateCreated>2022-07-01T15:44:25.4995743-04:00</d2p1:DateCreated>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastUpdatedDate>2022-07-01T15:44:25.4995743-04:00</d2p1:LastUpdatedDate>
      <d2p1:Status>sample string 5</d2p1:Status>
      <d2p1:StatusId>1</d2p1:StatusId>
      <d2p1:TaskName>sample string 2</d2p1:TaskName>
    </d2p1:TaskSearchResult>
    <d2p1:TaskSearchResult>
      <d2p1:AccountId>1</d2p1:AccountId>
      <d2p1:AccountName>sample string 3</d2p1:AccountName>
      <d2p1:AssignedTo>sample string 4</d2p1:AssignedTo>
      <d2p1:AttachmentCount>1</d2p1:AttachmentCount>
      <d2p1:AttachmentLastUploaded>2022-07-01T15:44:25.4995743-04:00</d2p1:AttachmentLastUploaded>
      <d2p1:DateCreated>2022-07-01T15:44:25.4995743-04:00</d2p1:DateCreated>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastUpdatedDate>2022-07-01T15:44:25.4995743-04:00</d2p1:LastUpdatedDate>
      <d2p1:Status>sample string 5</d2p1:Status>
      <d2p1:StatusId>1</d2p1:StatusId>
      <d2p1:TaskName>sample string 2</d2p1:TaskName>
    </d2p1:TaskSearchResult>
  </Data>
  <TotalCount>1</TotalCount>
</SearchResultOfTaskSearchResultDuETBkOZ>