POST api/Comments/Create

Request Information

URI Parameters

None.

Body Parameters

NewComment
NameDescriptionTypeAdditional information
UserText

string

None.

Content

string

None.

CommentType

CommentType

None.

PostId

integer

None.

ResponseIds

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "UserText": "sample string 1",
  "Content": "sample string 2",
  "CommentType": 0,
  "PostId": 3,
  "ResponseIds": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<NewComment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ethos.Models">
  <CommentType>TEXT</CommentType>
  <Content>sample string 2</Content>
  <PostId>3</PostId>
  <ResponseIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </ResponseIds>
  <UserText>sample string 1</UserText>
</NewComment>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CommentResult
NameDescriptionTypeAdditional information
token

string

None.

status

string

None.

message

string

None.

CommentId

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "token": "sample string 1",
  "status": "sample string 2",
  "message": "sample string 3",
  "CommentId": 4
}

application/xml, text/xml

Sample:
<Status.CommentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ethos.Models">
  <CommentId>4</CommentId>
  <message>sample string 3</message>
  <status>sample string 2</status>
  <token>sample string 1</token>
</Status.CommentResult>