0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 13:10:14 +01:00
wagtail/docs/advanced_topics/api
Karl Hobley 17f7f70170 Added "find" API view and ability to find pages by HTML path
This implements a new "find" view for all endpoints which can be used
for finding an individual object based on the URL parameters passed to
it.

If an object is found, the view will return a ``302`` redirect to detail
page of that object. If not, the view will return a ``404`` response.

For the pages endpoint, I've added a ``html_path`` parameter to this
view, this allows finding a page by its path on the site.

For example a GET request to ``/api/v2/pages/find/?html_path=/`` will
always generate a 302 response to the detail view of the homepage. This
uses Wagtail's internal routing mechanism so routable pages are
supported as well.

Fixes #4154
2018-04-13 12:08:19 +01:00
..
v2 Added "find" API view and ability to find pages by HTML path 2018-04-13 12:08:19 +01:00
index.rst