POST api/Works/AddNewWork

Метод для внесения новой работы

Request Information

URI Parameters

None.

Body Parameters

WorkAdd
NameDescriptionTypeAdditional information
Asset

Id типа работы

integer

None.

Date

Дата на когда (2008-12-18)

string

None.

Description

Описание работы

string

None.

Employee

Id Сотрудника который вносит работу

integer

None.

Entrance

Номер подьезда

integer

None.

Floor

Номер этажа

integer

None.

House

Id Дома

integer

None.

Time

Время на когда создается работа (09:00:00)

time interval

None.

Request Formats

application/json, text/json

Sample:
{
  "Asset": 1,
  "Date": "sample string 2",
  "Description": "sample string 3",
  "Employee": 4,
  "Entrance": 5,
  "Floor": 6,
  "House": 7,
  "Time": "00:00:00.1234567"
}

application/xml, text/xml

Sample:
<WorkAdd xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Data.Models.dto">
  <Asset>1</Asset>
  <Date>sample string 2</Date>
  <Description>sample string 3</Description>
  <Employee>4</Employee>
  <Entrance>5</Entrance>
  <Floor>6</Floor>
  <House>7</House>
  <Time>PT0.1234567S</Time>
</WorkAdd>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Возвращает Id внесенной работы

AddNewWorkResult
NameDescriptionTypeAdditional information
Data

Id работы

integer

None.

Result

Результат обработки запроса

boolean

None.

Message

Сообщение

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Data": 1,
  "Result": true,
  "Message": "sample string 3"
}

application/xml, text/xml

Sample:
<AddNewWorkResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ServiceApi.Models">
  <Message>sample string 3</Message>
  <Result>true</Result>
  <Data>1</Data>
</AddNewWorkResult>