Questions tagged [wagtail-apiv2]

The Wagtail API V2 module exposes a public, read-only, JSON-formatted API which can be used by external clients (such as a mobile app) or the site's frontend. The API is built on Django REST Framework and comes on as a dependency of Wagtail.

The Wagtail API V2 module exposes a public, read-only, JSON-formatted API which can be used by external clients (such as a mobile app) or the site's frontend. The API is built on Django REST Framework and comes on as a dependency of Wagtail.

Please consider official document for more details.

26 questions
0
votes
0 answers

How to customize PagesAPIViewsets that it can retrieve data in "http://127.0.0.1:8000/api/v2/pages/?slug=home-page&locale=en" endpoint in wagtail?

By default wagtail.api.v2 retrieves data by id. but i want to modify that it can retrieve data by slug+locale parameters so, i decided to create endpoint "api/v2/pages/?slug=slug" but when i am sending request into this endpoint, it returns me a…
Zekiyev
  • 1
  • 1
0
votes
1 answer

In Wagtail, I want to expose the API but only to internal/authorized services

I followed the Wagtail instructions to set up the API v2 in my Wagtail CMS. The CMS will be used in headed mode, but I still want to enable the API so that another service can query for the raw information directly. However, I don't want to enable…
pyreho
  • 1
0
votes
1 answer

Django/Wagtail Rest API URL Filter with no response

I am using Wagtail and I have an API called 127.0.0.1:8000/api/v2/stories. In the API I am having this JSON response { "count": 81, "results": [ { "id": 122, "title": "Test Blog", "blog_authors":…
0
votes
1 answer

Django REST API Query to return 2 value

I am a beginner who is learning Django using wagtail. I have a custom API model where I need to do 2 queries. I tried to return 2 queries at the same time with this code def get_queryset(self): return…
0
votes
1 answer

Django/Wagtail Rest Framework API Ordering/Pagination

I am using wagtail. I have serialized my API. I want to order them by -first_published_at, when someone hit my API url api/v2/pages they will see an ordered API without filtering it via URL. here is my api.py code: class…
0
votes
2 answers

Add UID or Unique ID in Wagtail/Django

So my question was how I can generate a random UID or slug for my CMS. If I use the default id which is coming from API v2 people can easily guess my next post URL easily. Is there any way to add a unique slug/ID/UUID for my wagtail CMS?
0
votes
1 answer

add the full URL in rich text embed image src in Wagtail API V2

Hope you all are doing well. Is there any way to add the full URL in embed image src in API? Here is the API sample "content": [ { "type": "full_richtext", "value": "
0
votes
2 answers

Wagtail API not exposing custom field

I am enabling wagtail api v2 in my wagtail project. After adding the api.v2 I am getting this json response { "id": 32, "meta": { "type": "blog.AddStory", "detail_url":…
0
votes
1 answer

Non-model based serialization in Wagtail API response

I'm retrieving a list of pages via a custom API endpoint called sitemap. The goal of this endpoint is to return just the URL and last_updated flag so that I can generate a sitemap.xml file for my website. I can't apply a custom serializer to the…
commadelimited
  • 5,656
  • 6
  • 41
  • 77
0
votes
1 answer

Wagtail getting all tags of a specific page type using api

I am trying to find a way to get the tag list of specific page types using wagtail api. class BlogPage(FreeFormPage): #... tags = ClusterTaggableManager(through=BlogPageTag, blank=True) class WorkPage(FreeFormPage): #... …
ratata
  • 1,129
  • 14
  • 42
0
votes
0 answers

Filter Wagtail API response by two fields instead of just one

I'm using the Wagtail API (built on top of Django Rest Framework) to request information from our site. I know that I can filter the response by an APIField using the field name and a…
commadelimited
  • 5,656
  • 6
  • 41
  • 77
1
2