POST api/AccessSheet

Создание листа допуска по выбранному списку ресрусов

Request Information

URI Parameters

None.

Body Parameters

AccessSheetInCreateViewModel
NameDescriptionTypeAdditional information
AccessUserIds

Идентификаторы пользователей, которым нужен доступ

Collection of integer

None.

ApproverIds

Идентификаторы согласующих(пользователей)

Collection of integer

None.

TreeNodes

Ресурсы доступа

Collection of SheetTreeNodeInViewModel

None.

Request Formats

application/json, text/json

Sample:
{
  "AccessUserIds": [
    1,
    2
  ],
  "ApproverIds": [
    1,
    2
  ],
  "TreeNodes": [
    {
      "Id": 1,
      "TreeNodeCustomFields": [
        {
          "CustomFieldTypeId": 1,
          "CustomFieldId": 2,
          "Value": "sample string 3"
        },
        {
          "CustomFieldTypeId": 1,
          "CustomFieldId": 2,
          "Value": "sample string 3"
        }
      ]
    },
    {
      "Id": 1,
      "TreeNodeCustomFields": [
        {
          "CustomFieldTypeId": 1,
          "CustomFieldId": 2,
          "Value": "sample string 3"
        },
        {
          "CustomFieldTypeId": 1,
          "CustomFieldId": 2,
          "Value": "sample string 3"
        }
      ]
    }
  ]
}

text/html, multipart/form-data

Sample:
{"AccessUserIds":[1,2],"ApproverIds":[1,2],"TreeNodes":[{"Id":1,"TreeNodeCustomFields":[{"CustomFieldTypeId":1,"CustomFieldId":2,"Value":"sample string 3"},{"CustomFieldTypeId":1,"CustomFieldId":2,"Value":"sample string 3"}]},{"Id":1,"TreeNodeCustomFields":[{"CustomFieldTypeId":1,"CustomFieldId":2,"Value":"sample string 3"},{"CustomFieldTypeId":1,"CustomFieldId":2,"Value":"sample string 3"}]}]}

application/xml, text/xml

Sample:
<AccessSheetInCreateViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.AccessSheet">
  <AccessUserIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </AccessUserIds>
  <ApproverIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </ApproverIds>
  <TreeNodes>
    <SheetTreeNodeInViewModel>
      <Id>1</Id>
      <TreeNodeCustomFields>
        <SheetTreeNodeCustomFieldInViewModel>
          <CustomFieldId>2</CustomFieldId>
          <CustomFieldTypeId>1</CustomFieldTypeId>
          <Value>sample string 3</Value>
        </SheetTreeNodeCustomFieldInViewModel>
        <SheetTreeNodeCustomFieldInViewModel>
          <CustomFieldId>2</CustomFieldId>
          <CustomFieldTypeId>1</CustomFieldTypeId>
          <Value>sample string 3</Value>
        </SheetTreeNodeCustomFieldInViewModel>
      </TreeNodeCustomFields>
    </SheetTreeNodeInViewModel>
    <SheetTreeNodeInViewModel>
      <Id>1</Id>
      <TreeNodeCustomFields>
        <SheetTreeNodeCustomFieldInViewModel>
          <CustomFieldId>2</CustomFieldId>
          <CustomFieldTypeId>1</CustomFieldTypeId>
          <Value>sample string 3</Value>
        </SheetTreeNodeCustomFieldInViewModel>
        <SheetTreeNodeCustomFieldInViewModel>
          <CustomFieldId>2</CustomFieldId>
          <CustomFieldTypeId>1</CustomFieldTypeId>
          <Value>sample string 3</Value>
        </SheetTreeNodeCustomFieldInViewModel>
      </TreeNodeCustomFields>
    </SheetTreeNodeInViewModel>
  </TreeNodes>
</AccessSheetInCreateViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Success Resource Description

Возвращает лист допуска

AccessSheetOutViewModel
NameDescriptionTypeAdditional information
Id

Уникальный идентификатор листа допуска

integer

None.

CreateDate

Дата создания

date

None.

Initiator

Инициатор

UserNameViewModel

None.

Status

Статус листа допуска

AccessSheetStatus

None.

CanRateRequests

Можно оценить заявки

boolean

None.

TreeNodes

Ресурсы доступа

Collection of SheetTreeNodeOutViewModel

None.

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

OperationResult
NameDescriptionTypeAdditional information
Target

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

Object

None.

Status

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

ResultStatus

None.

Error

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

Error

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "CreateDate": "2022-08-17T05:10:10+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"
  },
  "Status": null,
  "CanRateRequests": true,
  "TreeNodes": [
    {
      "Id": 1,
      "Name": "sample string 2",
      "Approvers": [
        {
          "Id": 1,
          "Login": "sample string 2",
          "FirstName": "sample string 3",
          "LastName": "sample string 4",
          "RegionId": 5,
          "Appoint": "sample string 6",
          "Organization": "sample string 7"
        },
        {
          "Id": 1,
          "Login": "sample string 2",
          "FirstName": "sample string 3",
          "LastName": "sample string 4",
          "RegionId": 5,
          "Appoint": "sample string 6",
          "Organization": "sample string 7"
        }
      ],
      "AccessRequests": [
        {
          "RequestId": 1,
          "AccessUserName": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "Contractor": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "PlanTimeExecutionTime": 2,
          "FactTimeExecution": 3,
          "RequestCustomFields": [
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            },
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            }
          ]
        },
        {
          "RequestId": 1,
          "AccessUserName": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "Contractor": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "PlanTimeExecutionTime": 2,
          "FactTimeExecution": 3,
          "RequestCustomFields": [
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            },
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            }
          ]
        }
      ],
      "WorkNormativeId": 1,
      "TreeNodeCustomFields": [
        {
          "CustomFieldId": 1,
          "CustomFieldName": "sample string 2",
          "CustomFieldTypeId": 3
        },
        {
          "CustomFieldId": 1,
          "CustomFieldName": "sample string 2",
          "CustomFieldTypeId": 3
        }
      ]
    },
    {
      "Id": 1,
      "Name": "sample string 2",
      "Approvers": [
        {
          "Id": 1,
          "Login": "sample string 2",
          "FirstName": "sample string 3",
          "LastName": "sample string 4",
          "RegionId": 5,
          "Appoint": "sample string 6",
          "Organization": "sample string 7"
        },
        {
          "Id": 1,
          "Login": "sample string 2",
          "FirstName": "sample string 3",
          "LastName": "sample string 4",
          "RegionId": 5,
          "Appoint": "sample string 6",
          "Organization": "sample string 7"
        }
      ],
      "AccessRequests": [
        {
          "RequestId": 1,
          "AccessUserName": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "Contractor": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "PlanTimeExecutionTime": 2,
          "FactTimeExecution": 3,
          "RequestCustomFields": [
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            },
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            }
          ]
        },
        {
          "RequestId": 1,
          "AccessUserName": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "Contractor": {
            "Id": 1,
            "Login": "sample string 2",
            "FirstName": "sample string 3",
            "LastName": "sample string 4",
            "RegionId": 5,
            "Appoint": "sample string 6",
            "Organization": "sample string 7"
          },
          "PlanTimeExecutionTime": 2,
          "FactTimeExecution": 3,
          "RequestCustomFields": [
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            },
            {
              "CustomFieldId": 1,
              "CustomFieldValue": "sample string 2"
            }
          ]
        }
      ],
      "WorkNormativeId": 1,
      "TreeNodeCustomFields": [
        {
          "CustomFieldId": 1,
          "CustomFieldName": "sample string 2",
          "CustomFieldTypeId": 3
        },
        {
          "CustomFieldId": 1,
          "CustomFieldName": "sample string 2",
          "CustomFieldTypeId": 3
        }
      ]
    }
  ]
}

text/html, multipart/form-data

Sample:
{"Id":1,"CreateDate":"2022-08-17T05:10:10+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"},"Status":null,"CanRateRequests":true,"TreeNodes":[{"Id":1,"Name":"sample string 2","Approvers":[{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"}],"AccessRequests":[{"RequestId":1,"AccessUserName":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"Contractor":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"PlanTimeExecutionTime":2,"FactTimeExecution":3,"RequestCustomFields":[{"CustomFieldId":1,"CustomFieldValue":"sample string 2"},{"CustomFieldId":1,"CustomFieldValue":"sample string 2"}]},{"RequestId":1,"AccessUserName":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"Contractor":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"PlanTimeExecutionTime":2,"FactTimeExecution":3,"RequestCustomFields":[{"CustomFieldId":1,"CustomFieldValue":"sample string 2"},{"CustomFieldId":1,"CustomFieldValue":"sample string 2"}]}],"WorkNormativeId":1,"TreeNodeCustomFields":[{"CustomFieldId":1,"CustomFieldName":"sample string 2","CustomFieldTypeId":3},{"CustomFieldId":1,"CustomFieldName":"sample string 2","CustomFieldTypeId":3}]},{"Id":1,"Name":"sample string 2","Approvers":[{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"}],"AccessRequests":[{"RequestId":1,"AccessUserName":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"Contractor":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"PlanTimeExecutionTime":2,"FactTimeExecution":3,"RequestCustomFields":[{"CustomFieldId":1,"CustomFieldValue":"sample string 2"},{"CustomFieldId":1,"CustomFieldValue":"sample string 2"}]},{"RequestId":1,"AccessUserName":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"Contractor":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"PlanTimeExecutionTime":2,"FactTimeExecution":3,"RequestCustomFields":[{"CustomFieldId":1,"CustomFieldValue":"sample string 2"},{"CustomFieldId":1,"CustomFieldValue":"sample string 2"}]}],"WorkNormativeId":1,"TreeNodeCustomFields":[{"CustomFieldId":1,"CustomFieldName":"sample string 2","CustomFieldTypeId":3},{"CustomFieldId":1,"CustomFieldName":"sample string 2","CustomFieldTypeId":3}]}]}

application/xml

Sample:

Sample not available.

text/xml

Sample:

Sample not available.