Content api filter does not work as expected

If you aren’t running the latest version of Ghost, the first thing we will ask you to do is update to the latest version of Ghost.

  • What’s your URL? Still on local, just trying out the API
  • What version of Ghost are you using? The latest one, just pulled today via ghost cli on 27 of July 2020

And

  • How was Ghost installed and configured? Local with sqllite
  • What Node version, database, OS & browser are you using? Chrome, NPM lts v12.18.1

Hey guys,

I just started using ghost today. Was planning to use it for my company’s small internal blog. I’ve followed and skimmed all the docs, its clear, concise and easy to follow!

I was ready to integrate it with our system, our front end is using React so its straightforward. However we might need it to go through our backend first to filter request according to role etc etc.

The point is i may not be able to use javascript SDK, thus I’m reading how to use the api without it.

My problem is with the filtering, now i’m in postman and here’s the url

{{host}}/ghost/api/v3/content/posts?key={{contentKey}}&include=authors,tags&order=published_at%20DESC&filter=author%3Arobert%2Btag%3Ahursville

As you can see, i’m trying to filter with filter=author:robert+tag:hursville

If i filter with each one of them, it works. However combining them doesn’t seem to work. Any chance i’m missing something?

I’m following official docs and some examples

and Yes, posts that i’m trying to get is by author robert AND tagged hurstville

Really appreciate any help atm… Thanks!

Looks like a typo in your tag name to me :grimacing: filter=author:robert+tag:hursville is missing a t.

Works perfectly on the demo site: https://demo.ghost.io/ghost/api/v3/content/posts/?key=22444f78447824223cefc48062&include=authors,tags&order=published_at%20DESC&filter=author%3Aghost%2Btag%3Agetting-started

Not sure what happened with my postman, but all I did was delete the whole value and rewrite it… possibly some weird invisible char was there

haha thanks!