POST api/Comments/PostComment

Request Information

URI Parameters

None.

Body Parameters

Comment
NameDescriptionTypeAdditional information
CommentId

integer

None.

EmployeId

integer

None.

PostId

integer

None.

CommentTitle

string

None.

CommentText

string

None.

LastChanged

date

None.

PublishedDate

date

None.

LastChange_AuthorId

integer

None.

IsViewed

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "CommentId": 1,
  "EmployeId": 2,
  "PostId": 3,
  "CommentTitle": "sample string 4",
  "CommentText": "sample string 5",
  "LastChanged": "2025-08-14T03:12:15.779574+00:00",
  "PublishedDate": "2025-08-14T03:12:15.779574+00:00",
  "LastChange_AuthorId": 1,
  "IsViewed": true
}

application/xml, text/xml

Sample:
<Comment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ELO_IdentityAPI_Eloapp.net.Models">
  <CommentId>1</CommentId>
  <CommentText>sample string 5</CommentText>
  <CommentTitle>sample string 4</CommentTitle>
  <EmployeId>2</EmployeId>
  <IsViewed>true</IsViewed>
  <LastChange_AuthorId>1</LastChange_AuthorId>
  <LastChanged>2025-08-14T03:12:15.779574+00:00</LastChanged>
  <PostId>3</PostId>
  <PublishedDate>2025-08-14T03:12:15.779574+00:00</PublishedDate>
</Comment>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Comment'.

Response Information

Resource Description

Comment
NameDescriptionTypeAdditional information
CommentId

integer

None.

EmployeId

integer

None.

PostId

integer

None.

CommentTitle

string

None.

CommentText

string

None.

LastChanged

date

None.

PublishedDate

date

None.

LastChange_AuthorId

integer

None.

IsViewed

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "CommentId": 1,
  "EmployeId": 2,
  "PostId": 3,
  "CommentTitle": "sample string 4",
  "CommentText": "sample string 5",
  "LastChanged": "2025-08-14T03:12:15.7952015+00:00",
  "PublishedDate": "2025-08-14T03:12:15.7952015+00:00",
  "LastChange_AuthorId": 1,
  "IsViewed": true
}

application/xml, text/xml

Sample:
<Comment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ELO_IdentityAPI_Eloapp.net.Models">
  <CommentId>1</CommentId>
  <CommentText>sample string 5</CommentText>
  <CommentTitle>sample string 4</CommentTitle>
  <EmployeId>2</EmployeId>
  <IsViewed>true</IsViewed>
  <LastChange_AuthorId>1</LastChange_AuthorId>
  <LastChanged>2025-08-14T03:12:15.7952015+00:00</LastChanged>
  <PostId>3</PostId>
  <PublishedDate>2025-08-14T03:12:15.7952015+00:00</PublishedDate>
</Comment>