This endpoint essentially provides a more specialized version of the
GET /pages endpoint. It provides a maximum of
five matching pages, and only lists the ID, title, and path for each, making it ideal
for an autocomplete function showing several pages that a user might mean, given
the string of what she has typed so far.
Request
Body Parameters
Query Parameters
Value
fragment
The endpoint will return any pages that use this substring in their titles.
path
The endpoint will return any pages that begins with this string. This will
usually match a page and its descendants, as well as any other pages that happen to
share the first several characters of their string (e.g., /anim will
match /animalia and all of its children, as well as /animism
and all of its children).
type
A page type to limit the search to. If provided, the endpoint will only return pages
that also match the given type.
Examples
Response
The endpoint should always respond with a 200 HTTP status and a JSON object.
The object has two properties: found and pages, with found
being a number equal to the length of the array in pages. When the criteria
provided don’t match anything, found equals zero, and pages
offers an empty array.