GET api/workNormative/CustomFields?departmentId={departmentId}&categoryId={categoryId}&requestTypeId={requestTypeId}&jobTypeId={jobTypeId}&requestId={requestId}

Дополнительные поля норматива

Request Information

URI Parameters

NameDescriptionTypeAdditional information
departmentId

Отдел

integer

Required

categoryId

Категория

integer

Required

requestTypeId

Тип заявки

integer

Required

jobTypeId

Вид работ

integer

Required

requestId

Номер заявки (Определяет обязательность поля на момент создания/последнего редактирования заявки)

integer

Default value is 0

Body Parameters

None.

Response Information

Success Resource Description

Возвращает шаблон списка дополнительных полей норматива

Collection of CustomFieldViewModel
NameDescriptionTypeAdditional information
Permissions

Разрешения на действия с доп. полем

RequestCustomFieldPermissionSet

None.

WorkNormativeId

ссылка на норматив

integer

None.

CustomFieldId

ссылка на доп. поле (CustomFields)

integer

None.

CustomFieldType

Тип доп. поля

CustomFieldTypeViewModel

None.

Name

Наименование доп. поля

string

None.

Order

Порядок доп. поля

integer

None.

Required

Поле, обязательно для заполнения

boolean

None.

CustomFieldRequiredRoleId

Поле, обязательно для заполнения кем

CustomFieldRequiredRoleType

None.

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

OperationResult
NameDescriptionTypeAdditional information
Target

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

Object

None.

Status

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

ResultStatus

None.

Error

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

Error

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Permissions": 0,
    "WorkNormativeId": 1,
    "CustomFieldId": 2,
    "CustomFieldType": {
      "Id": 1,
      "Name": "sample string 2",
      "Kind": 0
    },
    "Name": "sample string 3",
    "Order": 4,
    "Required": true,
    "CustomFieldRequiredRoleId": 0
  },
  {
    "Permissions": 0,
    "WorkNormativeId": 1,
    "CustomFieldId": 2,
    "CustomFieldType": {
      "Id": 1,
      "Name": "sample string 2",
      "Kind": 0
    },
    "Name": "sample string 3",
    "Order": 4,
    "Required": true,
    "CustomFieldRequiredRoleId": 0
  }
]

text/html, multipart/form-data

Sample:
[{"Permissions":0,"WorkNormativeId":1,"CustomFieldId":2,"CustomFieldType":{"Id":1,"Name":"sample string 2","Kind":0},"Name":"sample string 3","Order":4,"Required":true,"CustomFieldRequiredRoleId":0},{"Permissions":0,"WorkNormativeId":1,"CustomFieldId":2,"CustomFieldType":{"Id":1,"Name":"sample string 2","Kind":0},"Name":"sample string 3","Order":4,"Required":true,"CustomFieldRequiredRoleId":0}]

application/xml, text/xml

Sample:
<ArrayOfCustomFieldViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.CustomFields">
  <CustomFieldViewModel>
    <CustomFieldId>2</CustomFieldId>
    <CustomFieldRequiredRoleId>None</CustomFieldRequiredRoleId>
    <CustomFieldType>
      <Id>1</Id>
      <Kind>Dictionary</Kind>
      <Name>sample string 2</Name>
    </CustomFieldType>
    <Name>sample string 3</Name>
    <Order>4</Order>
    <Required>true</Required>
    <WorkNormativeId>1</WorkNormativeId>
  </CustomFieldViewModel>
  <CustomFieldViewModel>
    <CustomFieldId>2</CustomFieldId>
    <CustomFieldRequiredRoleId>None</CustomFieldRequiredRoleId>
    <CustomFieldType>
      <Id>1</Id>
      <Kind>Dictionary</Kind>
      <Name>sample string 2</Name>
    </CustomFieldType>
    <Name>sample string 3</Name>
    <Order>4</Order>
    <Required>true</Required>
    <WorkNormativeId>1</WorkNormativeId>
  </CustomFieldViewModel>
</ArrayOfCustomFieldViewModel>