POST v2/tasks/search

Searches for tasks using the search filters passed in request body

Request Information

URI Parameters

None.

Body Parameters

TaskSearchParams
NameDescriptionTypeAdditional information
Title

Task Title

string

None.

Customer

Customer associated with the Task. If provided, tasks will be filtered based on the customer Id or Number or Name. If all of them are provided, Id takes the first precedence, then the Number and then the Name.

CustomerRef

None.

Type

Collection of Taks Type

Collection of integer

None.

Status

Collection of Task Status

Collection of integer

None.

AssignedTo

Tasks will be filtered based on the assigned to Id or Name. If both of them are provided, Id takes the first precedence.

TaskAssignment

None.

RequestedBy

Tasks will be filtered based on the requested by Id or Name. If both of them are provided, Id takes the first precedence.

TaskRequestedBy

None.

Project

Project associated with the Task. If provided, tasks will be filtered based on the project Id or Name. If both of them are provided, Id takes the first precedence.

IdNamePair

None.

StatusChange

Filters tasks based on Changed Status Id and Status Changed Date.

StatusUpdateRange

None.

DateCreatedRange

Filters tasks based on created date.

DateOffsetRange

None.

LastUpdatedDateRange

Filters tasks based on last updated date.

DateOffsetRange

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:
{
  "title": "sample string 1",
  "customer": {
    "id": 1,
    "number": "sample string 2",
    "name": "sample string 3"
  },
  "type": [
    1,
    2
  ],
  "status": [
    1,
    2
  ],
  "assignedTo": {
    "id": 1,
    "name": "sample string 2",
    "type": "sample string 3"
  },
  "requestedBy": {
    "id": 1,
    "name": "sample string 2",
    "type": "sample string 3"
  },
  "project": {
    "id": 1,
    "name": "sample string 2"
  },
  "statusChange": {
    "statusId": 1,
    "from": "2022-07-01T04:41:29-04:00",
    "to": "2022-07-01T04:41:29-04:00"
  },
  "dateCreatedRange": null,
  "lastUpdatedDateRange": null,
  "pageIndex": 2,
  "pageSize": 3,
  "sortExpression": "sample string 4",
  "sortOrder": 5
}

application/xml, text/xml

Sample:
<TaskSearchParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.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>
  <AssignedTo>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <Type>sample string 3</Type>
  </AssignedTo>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:Id>1</d2p1:Id>
    <d2p1:Name>sample string 3</d2p1:Name>
    <d2p1:Number>sample string 2</d2p1:Number>
  </Customer>
  <DateCreatedRange xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core" i:nil="true" />
  <LastUpdatedDateRange xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core" i:nil="true" />
  <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>
  <RequestedBy>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <Type>sample string 3</Type>
  </RequestedBy>
  <Status xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Status>
  <StatusChange xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.V2.Core">
    <d2p1:From xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2022-07-01T20:41:29.0738037Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </d2p1:From>
    <d2p1:StatusId>1</d2p1:StatusId>
    <d2p1:To xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2022-07-01T20:41:29.0738037Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </d2p1:To>
  </StatusChange>
  <Title>sample string 1</Title>
  <Type xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Type>
</TaskSearchParams>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Tasks

SearchResultOfTaskResult
NameDescriptionTypeAdditional information
TotalCount

integer

None.

Data

Collection of TaskResult

None.

Response Formats

application/json, text/json

Sample:
{
  "totalCount": 1,
  "data": [
    {
      "id": 1,
      "title": "sample string 2",
      "customer": {
        "id": 1,
        "number": "sample string 2",
        "name": "sample string 3"
      },
      "type": {
        "id": 1,
        "name": "sample string 2"
      },
      "status": {
        "id": 1,
        "name": "sample string 2"
      },
      "dateCreated": "2022-07-01T04:41:29-04:00",
      "lastUpdatedDate": "2022-07-01T04:41:29-04:00"
    },
    {
      "id": 1,
      "title": "sample string 2",
      "customer": {
        "id": 1,
        "number": "sample string 2",
        "name": "sample string 3"
      },
      "type": {
        "id": 1,
        "name": "sample string 2"
      },
      "status": {
        "id": 1,
        "name": "sample string 2"
      },
      "dateCreated": "2022-07-01T04:41:29-04:00",
      "lastUpdatedDate": "2022-07-01T04:41:29-04:00"
    }
  ]
}

application/xml, text/xml

Sample:
<SearchResultOfTaskResultbgj2_StyI 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.V2.Tasks">
    <d2p1:TaskResult>
      <d2p1:Customer xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:Id>1</d4p1:Id>
        <d4p1:Name>sample string 3</d4p1:Name>
        <d4p1:Number>sample string 2</d4p1:Number>
      </d2p1:Customer>
      <d2p1:DateCreated xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>2022-07-01T20:41:29.0894107Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
      </d2p1:DateCreated>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastUpdatedDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>2022-07-01T20:41:29.0894107Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
      </d2p1:LastUpdatedDate>
      <d2p1:Status xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:Status>
      <d2p1:Title>sample string 2</d2p1:Title>
      <d2p1:Type xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:Type>
    </d2p1:TaskResult>
    <d2p1:TaskResult>
      <d2p1:Customer xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:Id>1</d4p1:Id>
        <d4p1:Name>sample string 3</d4p1:Name>
        <d4p1:Number>sample string 2</d4p1:Number>
      </d2p1:Customer>
      <d2p1:DateCreated xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>2022-07-01T20:41:29.0894107Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
      </d2p1:DateCreated>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastUpdatedDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>2022-07-01T20:41:29.0894107Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
      </d2p1:LastUpdatedDate>
      <d2p1:Status xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:Status>
      <d2p1:Title>sample string 2</d2p1:Title>
      <d2p1:Type xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:Type>
    </d2p1:TaskResult>
  </Data>
  <TotalCount>1</TotalCount>
</SearchResultOfTaskResultbgj2_StyI>