v1

latestOpenAPI 3.0.0Apache 2.02026-07-17417.2 KB
developers

searches jokes

By passing in the appropriate options, you can search for available jokes

get/joke

Query parameters

searchStringstring

pass an optional search string for looking up inventory

numberofJokesinteger

number of jokes to return

categorystring

category of jokes to return

sortBystring

Allowed: thumbsUp, thumbsDown, dateAdded.

sortOrderstring

Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.

Response

search results matching criteria

idstring required

The id of the Joke. Assigned when added.

jokestring required

The lead-in to the joke.

punchlinestring required

This bit should make you laugh :).

categorystring required

the category of the joke.

thumbsUpinteger required

Count of upvotes for the joke.

thumbsDowninteger required

Count of down votes for the joke.

dateAddedstring date-time required

Example response

[
  {
    "id": "ce0b9fbe-7ad8-11eb-9439-0242ac130002",
    "joke": "Why did the chicken cross the road?",
    "punchline": "To get to the other side.",
    "category": "Classic",
    "thumbsUp": 2,
    "thumbsDown": 4,
    "dateAdded": "2016-08-29T09:12:33.001Z"
  }
]