APIs & Integrations

PDeT
Participant

Blog Posts API filter query error in documentation?

Hi,

 

I'm trying a bit some tests with the blog posts API, more specifically I want to filter blog posts based on their slug.

According to https://developers.hubspot.com/docs/api/cms/blog-post I should be able to filter on slug with the case sensitive contains. This (?slug__contains=abc) results in a filter violation error:

Filter violation: Filtering by \"slug contains\" is not allowed"

 

The error does not occur when using slug__icontains. So I think there is a small error in the documentation. (makes no sense to do case sensitive contains on a slug, so the implemented behaviour makes sense)

 

Also, as a suggestion: given slug is kind of a text field, it would make much sense to also support startswith in the future 🙂

0 Upvotes
2 Replies 2
psjavi
Participant

Blog Posts API filter query error in documentation?

Hi, how is it going this issue?? I'm having the same problem.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Blog Posts API filter query error in documentation?

@PDeT 

Thanks for reporting.  I will check it out and confirm 👍

0 Upvotes