POST api/Tasks/Filter

Фильтрация задач с постраничным выводом и с учетом сортировки

Request Information

URI Parameters

None.

Body Parameters

Модель фильтрации задач

TaskFindModel
NameDescriptionTypeAdditional information
Filtering

Фильтр

TaskFilterModel

None.

Page

Номер страницы

integer

None.

Size

Размер страницы

integer

None.

Sorting

Тип сортировки

TaskSortField

None.

Descending

Направление сортировки (false - asc, true - desc)

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Filtering": {
    "Initiators": [
      1,
      2
    ],
    "Contractors": [
      1,
      2
    ],
    "Statuses": [
      0,
      0
    ],
    "Priority": [
      0,
      0
    ],
    "HashTags": [
      "sample string 1",
      "sample string 2"
    ],
    "Observer": 1,
    "Approver": 1,
    "ActiveApprover": 1,
    "BeginCreateDate": "2022-08-17T04:11:26+03:00",
    "EndCreateDate": "2022-08-17T04:11:26+03:00",
    "BeginCompleteDate": "2022-08-17T04:11:26+03:00",
    "EndCompleteDate": "2022-08-17T04:11:26+03:00",
    "Rating": 1,
    "Description": "sample string 1",
    "Subject": "sample string 2"
  },
  "Page": 1,
  "Size": 2,
  "Sorting": 0,
  "Descending": true
}

text/html, multipart/form-data

Sample:
{"Filtering":{"Initiators":[1,2],"Contractors":[1,2],"Statuses":[0,0],"Priority":[0,0],"HashTags":["sample string 1","sample string 2"],"Observer":1,"Approver":1,"ActiveApprover":1,"BeginCreateDate":"2022-08-17T04:11:26+03:00","EndCreateDate":"2022-08-17T04:11:26+03:00","BeginCompleteDate":"2022-08-17T04:11:26+03:00","EndCompleteDate":"2022-08-17T04:11:26+03:00","Rating":1,"Description":"sample string 1","Subject":"sample string 2"},"Page":1,"Size":2,"Sorting":0,"Descending":true}

application/xml, text/xml

Sample:
<TaskFindModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Requests">
  <Descending>true</Descending>
  <Filtering>
    <ActiveApprover>1</ActiveApprover>
    <Approver>1</Approver>
    <BeginCompleteDate>2022-08-17T04:11:26.1692372+03:00</BeginCompleteDate>
    <BeginCreateDate>2022-08-17T04:11:26.1692372+03:00</BeginCreateDate>
    <Contractors xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Contractors>
    <Description>sample string 1</Description>
    <EndCompleteDate>2022-08-17T04:11:26.1692372+03:00</EndCompleteDate>
    <EndCreateDate>2022-08-17T04:11:26.1692372+03:00</EndCreateDate>
    <HashTags xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </HashTags>
    <Initiators xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Initiators>
    <Observer>1</Observer>
    <Priority xmlns:d3p1="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Tasks">
      <d3p1:TaskPriority>None</d3p1:TaskPriority>
      <d3p1:TaskPriority>None</d3p1:TaskPriority>
    </Priority>
    <Rating>1</Rating>
    <Statuses xmlns:d3p1="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Tasks">
      <d3p1:TaskStatus>None</d3p1:TaskStatus>
      <d3p1:TaskStatus>None</d3p1:TaskStatus>
    </Statuses>
    <Subject>sample string 2</Subject>
  </Filtering>
  <Page>1</Page>
  <Size>2</Size>
  <Sorting>Id</Sorting>
</TaskFindModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Success Resource Description

Список задач

TaskListViewModel
NameDescriptionTypeAdditional information
Total

Общее Кол-во задач

integer

None.

Page

Текущая страница

integer

None.

PageSize

Зарисей на странице

integer

None.

Tasks

Порция данных - перечень задач

Collection of TaskBasicViewModel

None.

Folders

Папки и ид задач

Collection of TaskFolder

None.

Error Resource Description (Реализовано не везде)

OperationResult
NameDescriptionTypeAdditional information
Target

Возвращаемый объект

Object

None.

Status

Статус операции

ResultStatus

None.

Error

Детализация ошибки

Error

None.

Response Formats

application/json, text/json

Sample:
{
  "Total": 1,
  "Page": 2,
  "PageSize": 3,
  "Tasks": [
    {
      "LastModifiedDate": "2022-08-17T04:11:26+03:00",
      "Id": 1,
      "Priority": 0,
      "Status": 0,
      "Subject": "sample string 2",
      "Description": "sample string 3",
      "RequiredStartDate": "2022-08-17T04:11:26+03:00",
      "RequiredCompletionDate": "2022-08-17T04:11:26+03:00",
      "Initiator": {
        "Id": 1,
        "Login": "sample string 2",
        "FirstName": "sample string 3",
        "LastName": "sample string 4",
        "RegionId": 5,
        "Appoint": "sample string 6",
        "Organization": "sample string 7"
      },
      "CreateDate": "2022-08-17T04:11:26+03:00",
      "IsExpiredFactTimeExecution": true
    },
    {
      "LastModifiedDate": "2022-08-17T04:11:26+03:00",
      "Id": 1,
      "Priority": 0,
      "Status": 0,
      "Subject": "sample string 2",
      "Description": "sample string 3",
      "RequiredStartDate": "2022-08-17T04:11:26+03:00",
      "RequiredCompletionDate": "2022-08-17T04:11:26+03:00",
      "Initiator": {
        "Id": 1,
        "Login": "sample string 2",
        "FirstName": "sample string 3",
        "LastName": "sample string 4",
        "RegionId": 5,
        "Appoint": "sample string 6",
        "Organization": "sample string 7"
      },
      "CreateDate": "2022-08-17T04:11:26+03:00",
      "IsExpiredFactTimeExecution": true
    }
  ],
  "Folders": [
    {
      "Name": "sample string 1",
      "Ids": [
        1,
        2
      ]
    },
    {
      "Name": "sample string 1",
      "Ids": [
        1,
        2
      ]
    }
  ]
}

text/html, multipart/form-data

Sample:
{"Total":1,"Page":2,"PageSize":3,"Tasks":[{"LastModifiedDate":"2022-08-17T04:11:26+03:00","Id":1,"Priority":0,"Status":0,"Subject":"sample string 2","Description":"sample string 3","RequiredStartDate":"2022-08-17T04:11:26+03:00","RequiredCompletionDate":"2022-08-17T04:11:26+03:00","Initiator":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"CreateDate":"2022-08-17T04:11:26+03:00","IsExpiredFactTimeExecution":true},{"LastModifiedDate":"2022-08-17T04:11:26+03:00","Id":1,"Priority":0,"Status":0,"Subject":"sample string 2","Description":"sample string 3","RequiredStartDate":"2022-08-17T04:11:26+03:00","RequiredCompletionDate":"2022-08-17T04:11:26+03:00","Initiator":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"CreateDate":"2022-08-17T04:11:26+03:00","IsExpiredFactTimeExecution":true}],"Folders":[{"Name":"sample string 1","Ids":[1,2]},{"Name":"sample string 1","Ids":[1,2]}]}

application/xml, text/xml

Sample:
<TaskListViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Requests">
  <Folders>
    <TaskFolder>
      <Ids xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </Ids>
      <Name>sample string 1</Name>
    </TaskFolder>
    <TaskFolder>
      <Ids xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </Ids>
      <Name>sample string 1</Name>
    </TaskFolder>
  </Folders>
  <Page>2</Page>
  <PageSize>3</PageSize>
  <Tasks xmlns:d2p1="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Tasks">
    <d2p1:TaskBasicViewModel>
      <d2p1:CreateDate>2022-08-17T04:11:26.1692372+03:00</d2p1:CreateDate>
      <d2p1:Description>sample string 3</d2p1:Description>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:Initiator xmlns:d4p1="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Users">
        <d4p1:Appoint>sample string 6</d4p1:Appoint>
        <d4p1:FirstName>sample string 3</d4p1:FirstName>
        <d4p1:Id>1</d4p1:Id>
        <d4p1:LastName>sample string 4</d4p1:LastName>
        <d4p1:Login>sample string 2</d4p1:Login>
        <d4p1:Organization>sample string 7</d4p1:Organization>
        <d4p1:RegionId>5</d4p1:RegionId>
      </d2p1:Initiator>
      <d2p1:IsExpiredFactTimeExecution>true</d2p1:IsExpiredFactTimeExecution>
      <d2p1:LastModifiedDate>2022-08-17T04:11:26.1692372+03:00</d2p1:LastModifiedDate>
      <d2p1:Priority>None</d2p1:Priority>
      <d2p1:RequiredCompletionDate>2022-08-17T04:11:26.1692372+03:00</d2p1:RequiredCompletionDate>
      <d2p1:RequiredStartDate>2022-08-17T04:11:26.1692372+03:00</d2p1:RequiredStartDate>
      <d2p1:Status>None</d2p1:Status>
      <d2p1:Subject>sample string 2</d2p1:Subject>
    </d2p1:TaskBasicViewModel>
    <d2p1:TaskBasicViewModel>
      <d2p1:CreateDate>2022-08-17T04:11:26.1692372+03:00</d2p1:CreateDate>
      <d2p1:Description>sample string 3</d2p1:Description>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:Initiator xmlns:d4p1="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Users">
        <d4p1:Appoint>sample string 6</d4p1:Appoint>
        <d4p1:FirstName>sample string 3</d4p1:FirstName>
        <d4p1:Id>1</d4p1:Id>
        <d4p1:LastName>sample string 4</d4p1:LastName>
        <d4p1:Login>sample string 2</d4p1:Login>
        <d4p1:Organization>sample string 7</d4p1:Organization>
        <d4p1:RegionId>5</d4p1:RegionId>
      </d2p1:Initiator>
      <d2p1:IsExpiredFactTimeExecution>true</d2p1:IsExpiredFactTimeExecution>
      <d2p1:LastModifiedDate>2022-08-17T04:11:26.1692372+03:00</d2p1:LastModifiedDate>
      <d2p1:Priority>None</d2p1:Priority>
      <d2p1:RequiredCompletionDate>2022-08-17T04:11:26.1692372+03:00</d2p1:RequiredCompletionDate>
      <d2p1:RequiredStartDate>2022-08-17T04:11:26.1692372+03:00</d2p1:RequiredStartDate>
      <d2p1:Status>None</d2p1:Status>
      <d2p1:Subject>sample string 2</d2p1:Subject>
    </d2p1:TaskBasicViewModel>
  </Tasks>
  <Total>1</Total>
</TaskListViewModel>