POST

Query Draft Posts


Retrieves a list of up to 100 draft posts, given the provided paging, filtering, and sorting.

Query Draft Posts runs with these defaults, which you can override:

  • editedDate is sorted in DESC order.
  • paging.limit is 50.
  • paging.offset is 0.

For field support for filters and sorting, see Field Support for Filtering and Sorting.

To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Blog
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/blog/v3/draft-posts/query

Body Params
fieldsetsArray <string>maxItems 10

List of additional draft post fields to include in the response. For example, use the URL fieldset to retrieve the url field in the response in addition to the draft post's base fields. Base fields don’t include any of the supported fieldset values. By default only the draft post's base fields are returned.


queryQuery

Query options.

Response Object
draftPostsArray <DraftPost>

List of posts.


metaDataMetaDatadeprecated - use pagingMetadata instead

Deprecated. Use pagingMetadata instead. This property will be removed on June 30, 2023.

Details on the paged set of results returned.


pagingMetadataPagingMetadata

Details on the paged set of results returned.

Query Draft Posts Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/draft-posts/query' \ --data-binary '{ "filter": { "title": { "$startsWith": "Places to visit" } } }' \ } -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "draftPosts": [ { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } ], "metaData": { "count": 1, "offset": 0, "total": 1 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?