POST api/Tasks/{id}/Comments

Добавляет комментарий к задаче с номером id

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Номер задачи

integer

Required

Body Parameters

Добавляемый комментарий

SimpleComment
NameDescriptionTypeAdditional information
ParentCommentId

Идентификатор родительского комментария

integer

None.

Text

Текст комментария

string

None.

Addressees

Адресаты комментария

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ParentCommentId": 1,
  "Text": "sample string 1",
  "Addressees": [
    1,
    2
  ]
}

text/html, multipart/form-data

Sample:
{"ParentCommentId":1,"Text":"sample string 1","Addressees":[1,2]}

application/xml, text/xml

Sample:
<SimpleComment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Comments">
  <Addressees xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Addressees>
  <ParentCommentId>1</ParentCommentId>
  <Text>sample string 1</Text>
</SimpleComment>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Success Resource Description

Сохраненный комментарий

CommentViewModel
NameDescriptionTypeAdditional information
Permissions

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

CommentPermissionSet

None.

Id

Идентифкатор комментария

integer

None.

Author

автор комментария - пользователь

UserNameViewModel

None.

JointAuthors

Соавторы

Collection of UserNameViewModel

None.

Addressees

Адресаты комментария

Collection of CommentAddresseeViewModel

None.

Text

Текст сообщения

string

None.

CreateDate

Дата комментария

date

None.

CommentType

Тип комментария

CommentType

None.

Answers

Перечень ответов

Collection of CommentViewModel

None.

ReadStatus

Состояние прочтения комментария

CommentReadStatus

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,
  "Id": 1,
  "Author": {
    "Id": 1,
    "Login": "sample string 2",
    "FirstName": "sample string 3",
    "LastName": "sample string 4",
    "RegionId": 5,
    "Appoint": "sample string 6",
    "Organization": "sample string 7"
  },
  "JointAuthors": [
    {
      "Id": 1,
      "Login": "sample string 2",
      "FirstName": "sample string 3",
      "LastName": "sample string 4",
      "RegionId": 5,
      "Appoint": "sample string 6",
      "Organization": "sample string 7"
    }
  ],
  "Addressees": [
    {
      "Id": 1,
      "User": {
        "Id": 1,
        "Login": "sample string 2",
        "FirstName": "sample string 3",
        "LastName": "sample string 4",
        "RegionId": 5,
        "Appoint": "sample string 6",
        "Organization": "sample string 7"
      },
      "ReadDate": "2022-08-17T03:40:33+03:00",
      "IsReaded": true
    },
    {
      "Id": 1,
      "User": {
        "Id": 1,
        "Login": "sample string 2",
        "FirstName": "sample string 3",
        "LastName": "sample string 4",
        "RegionId": 5,
        "Appoint": "sample string 6",
        "Organization": "sample string 7"
      },
      "ReadDate": "2022-08-17T03:40:33+03:00",
      "IsReaded": true
    }
  ],
  "Text": "sample string 2",
  "CreateDate": "2022-08-17T03:40:33+03:00",
  "CommentType": 0,
  "Answers": [],
  "ReadStatus": 0
}

text/html, multipart/form-data

Sample:
{"Permissions":0,"Id":1,"Author":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"JointAuthors":[{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"}],"Addressees":[{"Id":1,"User":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"ReadDate":"2022-08-17T03:40:33+03:00","IsReaded":true},{"Id":1,"User":{"Id":1,"Login":"sample string 2","FirstName":"sample string 3","LastName":"sample string 4","RegionId":5,"Appoint":"sample string 6","Organization":"sample string 7"},"ReadDate":"2022-08-17T03:40:33+03:00","IsReaded":true}],"Text":"sample string 2","CreateDate":"2022-08-17T03:40:33+03:00","CommentType":0,"Answers":[],"ReadStatus":0}

application/xml

Sample:

Sample not available.

text/xml

Sample:

Sample not available.