GET api/Tasks?type={type}&page={page}&size={size}&sort={sort}&descending={descending}&status={status}

Задачи в системе с учетом фильтра, сортировки с постраничным выводом

Request Information

URI Parameters

NameDescriptionTypeAdditional information
type

observer - задачи, в которых пользователь является обозревателем

assignforme - задачи, в которых пользователь является исполнителем

my - задачи, которых пользователь является инициатором

allagreements - заявки, в которых пользователь является согласующим (все согласования)

activeagreements - заявки, в которых пользователь является согласующим (активные согласования)

subordinates - заявки подчиненных пользователя

all - все задачи

string

Required

page

Текущая страница списка задач

integer

Required

size

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

integer

Required

sort

Поля для сортировки

string

Required

descending

Направление сортировки - убывание

boolean

Default value is False

status

Фильтр: Статус задачи

TaskStatus

Default value is None

Body Parameters

None.

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-17T05:04:31+03:00",
      "Id": 1,
      "Priority": 0,
      "Status": 0,
      "Subject": "sample string 2",
      "Description": "sample string 3",
      "RequiredStartDate": "2022-08-17T05:04:31+03:00",
      "RequiredCompletionDate": "2022-08-17T05:04:31+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-17T05:04:31+03:00",
      "IsExpiredFactTimeExecution": true
    },
    {
      "LastModifiedDate": "2022-08-17T05:04:31+03:00",
      "Id": 1,
      "Priority": 0,
      "Status": 0,
      "Subject": "sample string 2",
      "Description": "sample string 3",
      "RequiredStartDate": "2022-08-17T05:04:31+03:00",
      "RequiredCompletionDate": "2022-08-17T05:04:31+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-17T05:04:31+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-17T05:04:31+03:00","Id":1,"Priority":0,"Status":0,"Subject":"sample string 2","Description":"sample string 3","RequiredStartDate":"2022-08-17T05:04:31+03:00","RequiredCompletionDate":"2022-08-17T05:04:31+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-17T05:04:31+03:00","IsExpiredFactTimeExecution":true},{"LastModifiedDate":"2022-08-17T05:04:31+03:00","Id":1,"Priority":0,"Status":0,"Subject":"sample string 2","Description":"sample string 3","RequiredStartDate":"2022-08-17T05:04:31+03:00","RequiredCompletionDate":"2022-08-17T05:04:31+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-17T05:04:31+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-17T05:04:31.0687487+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-17T05:04:31.0687487+03:00</d2p1:LastModifiedDate>
      <d2p1:Priority>None</d2p1:Priority>
      <d2p1:RequiredCompletionDate>2022-08-17T05:04:31.0687487+03:00</d2p1:RequiredCompletionDate>
      <d2p1:RequiredStartDate>2022-08-17T05:04:31.0687487+03:00</d2p1:RequiredStartDate>
      <d2p1:Status>None</d2p1:Status>
      <d2p1:Subject>sample string 2</d2p1:Subject>
    </d2p1:TaskBasicViewModel>
    <d2p1:TaskBasicViewModel>
      <d2p1:CreateDate>2022-08-17T05:04:31.0687487+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-17T05:04:31.0687487+03:00</d2p1:LastModifiedDate>
      <d2p1:Priority>None</d2p1:Priority>
      <d2p1:RequiredCompletionDate>2022-08-17T05:04:31.0687487+03:00</d2p1:RequiredCompletionDate>
      <d2p1:RequiredStartDate>2022-08-17T05:04:31.0687487+03:00</d2p1:RequiredStartDate>
      <d2p1:Status>None</d2p1:Status>
      <d2p1:Subject>sample string 2</d2p1:Subject>
    </d2p1:TaskBasicViewModel>
  </Tasks>
  <Total>1</Total>
</TaskListViewModel>