Category


Category

You can specify a category by passing a category parameter.

Some of the categories that we have include:

  • Linux
  • DevOps
  • Networking
  • Programming (PHP, JS, Pythong and etc.)
  • Cloud
  • Docker
  • Kubernetes
  • And lots more

{info} This is NOT a required parameter

Example

The request that you would use would look something like this:

curl https://quizapi.io/api/v1/questions -G \
-d apiKey=YOUR_API_KEY \
-d category=Linux

This returns a JSON object with the results in an array we can iterate over.


[
  {
    "id": 1,
    "question": "How to delete a directory in Linux?",
    "description": "delete folder",
    "answers": {
      "answer_a": "ls",
      "answer_b": "delete",
      "answer_c": "remove",
      "answer_d": "rmdir",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "true",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "explanation": "rmdir deletes an empty directory",
    "tip": null,
    "tags": [],
    "category": "linux",
    "difficulty": "Easy"
  }
]
...