GET api/TimeSheet/User?userId={userId}&date={date}&dateTo={dateTo}

Вернуть табель пользователя за указанную дату или интервал дат

Request Information

URI Parameters

NameDescriptionTypeAdditional information
userId

Идентификатор пользователя

integer

Required

date

Дата начала периода табеля

date

Required

dateTo

Дата окончания периода табеля (не обязательно)

date

None.

Body Parameters

None.

Response Information

Success Resource Description

Collection of TimeSheetRowDaysViewModel
NameDescriptionTypeAdditional information
UserId

Идентификатор пользователя

integer

None.

UserFullName

Полное имя пользователя

string

None.

Period

Период дней пользователя

Collection of TimeSheetDayViewModel

None.

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

OperationResult
NameDescriptionTypeAdditional information
Target

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

Object

None.

Status

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

ResultStatus

None.

Error

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

Error

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "UserId": 1,
    "UserFullName": "sample string 2",
    "Period": [
      {
        "Date": "2022-08-17T03:20:52+03:00",
        "TimeBegin": 2,
        "TimeEnd": 3,
        "TimeSheetDayType": 1
      },
      {
        "Date": "2022-08-17T03:20:52+03:00",
        "TimeBegin": 2,
        "TimeEnd": 3,
        "TimeSheetDayType": 1
      }
    ]
  },
  {
    "UserId": 1,
    "UserFullName": "sample string 2",
    "Period": [
      {
        "Date": "2022-08-17T03:20:52+03:00",
        "TimeBegin": 2,
        "TimeEnd": 3,
        "TimeSheetDayType": 1
      },
      {
        "Date": "2022-08-17T03:20:52+03:00",
        "TimeBegin": 2,
        "TimeEnd": 3,
        "TimeSheetDayType": 1
      }
    ]
  }
]

text/html, multipart/form-data

Sample:
[{"UserId":1,"UserFullName":"sample string 2","Period":[{"Date":"2022-08-17T03:20:52+03:00","TimeBegin":2,"TimeEnd":3,"TimeSheetDayType":1},{"Date":"2022-08-17T03:20:52+03:00","TimeBegin":2,"TimeEnd":3,"TimeSheetDayType":1}]},{"UserId":1,"UserFullName":"sample string 2","Period":[{"Date":"2022-08-17T03:20:52+03:00","TimeBegin":2,"TimeEnd":3,"TimeSheetDayType":1},{"Date":"2022-08-17T03:20:52+03:00","TimeBegin":2,"TimeEnd":3,"TimeSheetDayType":1}]}]

application/xml, text/xml

Sample:
<ArrayOfTimeSheetRowDaysViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.TimeSheet">
  <TimeSheetRowDaysViewModel>
    <Period>
      <TimeSheetDayViewModel>
        <Date>2022-08-17T03:20:52.7331878+03:00</Date>
        <TimeBegin>2</TimeBegin>
        <TimeEnd>3</TimeEnd>
        <TimeSheetDayType>Holiday</TimeSheetDayType>
      </TimeSheetDayViewModel>
      <TimeSheetDayViewModel>
        <Date>2022-08-17T03:20:52.7331878+03:00</Date>
        <TimeBegin>2</TimeBegin>
        <TimeEnd>3</TimeEnd>
        <TimeSheetDayType>Holiday</TimeSheetDayType>
      </TimeSheetDayViewModel>
    </Period>
    <UserFullName>sample string 2</UserFullName>
    <UserId>1</UserId>
  </TimeSheetRowDaysViewModel>
  <TimeSheetRowDaysViewModel>
    <Period>
      <TimeSheetDayViewModel>
        <Date>2022-08-17T03:20:52.7331878+03:00</Date>
        <TimeBegin>2</TimeBegin>
        <TimeEnd>3</TimeEnd>
        <TimeSheetDayType>Holiday</TimeSheetDayType>
      </TimeSheetDayViewModel>
      <TimeSheetDayViewModel>
        <Date>2022-08-17T03:20:52.7331878+03:00</Date>
        <TimeBegin>2</TimeBegin>
        <TimeEnd>3</TimeEnd>
        <TimeSheetDayType>Holiday</TimeSheetDayType>
      </TimeSheetDayViewModel>
    </Period>
    <UserFullName>sample string 2</UserFullName>
    <UserId>1</UserId>
  </TimeSheetRowDaysViewModel>
</ArrayOfTimeSheetRowDaysViewModel>