GET /++quiz_search

The GET /++quiz_search endpoint allows users to search for quiz-related content based on provided filters and returns the search results in JSON format. The search can be filtered by subjects and/or text.

Request Parameters

  • subjects (optional): A comma-separated string or list of subjects to filter the search results. Example: Year 1, Year 10.
  • SearchableText (optional): A text string to search within the content. Example: How to add fractions.

Response

The response is a JSON object containing the search results or an error message if the request is invalid or fails.

Response Codes

  • 200 OK: The request was successful, and the search results are returned.
  • 400 Bad Request: Missing filters. Either subjects or SearchableText must be provided.
  • 401 Unauthorized: The subscription is not valid.
  • 500 Internal Server Error: An unknown error occurred during processing.

Example

  • Request:
    • https://go-math-science.com/++quiz_search?registration_id=<registration id>&subscription_method=referer&subjects=Year+11
  • Response
{
"@id": "https://go-math-science.com/++quiz_search?registration_id=<registration id>&subscription_method=referer&subjects=Year+11",
"items_total": 2,
"items": [
{
"@id": "https://go-math-science.com/physics/gravity/keplers-third-law",
"description": "Kepler's third law states the relationship between a planet's average distance from the sun and the time required for the planet to complete one orbit",
"review_state": "published",
"@type": "quizproductfolder",
"title": "Kepler's Third Law"
},
{
"@id": "https://go-math-science.com/computing/advanced-topics/big-data/introduction/definitions",
"description": "Basic Big Data Definitions",
"review_state": "published",
"@type": "quizproductfolder",
"title": "Definitions"
},
]
}
  1. Error Responses

    • 400 Bad Request

      {
        "error": "Missing filters. You need to pass subjects or text to search with"
      }
      
    • 401 Unauthorized

      {
        "error": "Invalid subscription. Please check your subscription status."
      }
      
    • 500 Internal Server Error

      {
      "error"
      : "Unknown error: <detailed error message>" }

Document Actions