FAQ Site Questions

Authentication

LibraryH3lp supports cookie-based authentication. To learn more, you can read the details on authentication.

HTTP and HTTPS

Requests are served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

FAQ Question Instance Resource

An FAQ question instance resource represents a single FAQ question contained within a FAQ site resource.

Resource URI

/2013-07-21/faqs/{FAQId}/questions/{questionId}

Resource Properties

A FAQ question resource is represented by the following properties:

Property Description
id Unique integer identifier for a FAQ question.
question String containing the question.
answer String containing the answer.
topics Array of topic strings. Questions can be tagged with one or more FAQ topics.
revisions Array of revision objects. The last 10 revisions made to a question's answer are retained.

HTTP GET

Retrieve the details of a FAQ question.

Response

Returns a JSON response containing a representation of a FAQ question, including the properties above.

Example

GET /2013-07-21/faqs/2817/questions/9884

{
  "id": 9884,
  "question": "example question",
  "answer": "example answer",
  "topics": ["example topic"],
  "revisions": [{
    "revision": 1,
    "created": "2015-05-18T13:58:14.808-04:00",
    "editor": "ashelton"
  }]
}

HTTP POST

Not supported.

HTTP PATCH, PUT

Modify the properties of an existing FAQ question.

Optional PATCH, PUT data

You may include, as JSON PUT data, any of the following properties.

Property Description
question String containing the question.
answer String containing the answer.
topics Array of topic strings. Questions can be tagged with one or more FAQ topics.
likes Integer representing the number of upvotes.
dislikes Integer representing the number of downvotes.
views Integer representing the number of views of this question.

Response

Returns a JSON response representing the updated question resource.

Example

PUT /2013-07-21/faqs/2817/questions/9884
{
  "question": "Is this a question?"
  "answer": "This is an answer."
}

{
  "id": 9884,
  "question": "Is this a question?",
  "answer": "This is an answer.",
  "topics": ["example topic"],
  "revisions": [{
    "revision": 1,
    "created": "2015-05-18T13:58:14.808-04:00",
    "editor": "ashelton"
  }, {
    "revision": 2,
    "created": "2015-05-19T10:11:25.170-04:00",
    "editor": "ashelton"
  }]
}

HTTP DELETE

Delete a FAQ question.

Response

Returns an empty response.

Example

DELETE /2013-07-21/faqs/2817/questions/9884

FAQ Questions List Resource

The FAQ Questions list resource represents all the FAQ questions for a FAQ site.

Resource URI

/2013-07-21/faqs/3060/questions

HTTP GET

Returns all the FAQ questions for a FAQ site.

Response

Returns a JSON response containing a list of FAQ question resources.

Example - list all FAQ questions

GET /2013-07-21/faqs/3060/questions

[
  {
    "id": 9884
    "question": "example question",
    "views": 4,
    "likes": 1,
    "dislikes": 1,
    "updatedAt": "2015-05-19T10:11:25.200-04:00",
    "topics": ["example topic"]
  }
]

HTTP POST

Create a new FAQ question.

Required POST data

You must include, as JSON POST data, all of the following properties.

Property Description
question String containing the question text.
answer String containing the answer text.

Optional POST data

You may include, as JSON POST data, any of the following properties.

Property Description
topics Array of topic strings. Questions can be tagged with one or more FAQ topics.

Response

If successful, returns a JSON response containing the resource representation of the newly created FAQ question.

Example - successful creation of a FAQ question

POST /2013-07-21/faqs/3060/questions

{
  "id": 9885,
  "question": "my new question",
  "answer": "my new answer",
  "topics": ["my topic"],
  "revisions": [{
    "revision": 1,
    "created": "2015-05-19T10:49:48.858-04:00",
    "editor": "ashelton"
  }
}

HTTP PATCH, PUT

Not supported.

HTTP DELETE

Not supported.