POST api/Jokes

Adds a new joke to the database. Requires a special permission.

Request Information

URI Parameters

None.

Body Parameters

JokeQnaBaseModel
NameDescriptionTypeAdditional information
Question

The question of the joke (first part).

string

Required

Max length: 425

Answer

The answer to the question of the joke (second part).

string

Required

Max length: 425

Request Formats

application/json, text/json

Sample:
{
  "Question": "sample string 1",
  "Answer": "sample string 2"
}

text/xml

Sample:
<JokeQnaBaseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VeryPunny.Models">
  <Answer>sample string 2</Answer>
  <Question>sample string 1</Question>
</JokeQnaBaseModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns error or success.

IHttpActionResult

None.

Response Formats

application/json, text/json, text/xml

Sample:

Sample not available.