I have an article type "Lesson" that has a lookup relationship with an object "Chapter". I want to do a SOQL query (via REST API) to get all Lessons that are in a list of Chapters. It looks like this:
SELECT Title, UrlName FROM Lesson__kav WHERE Chapter__r.Id IN ( 'a036100000CCS8jAAH', 'a036100000CCS9sAAH')
However, I am getting this error:
MALFORMED_QUERY: Implementation restriction: When querying or searching the Lesson__kav object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or PublishStatus = [status]. In addition PublishStatus is only permitted in a top-level AND condition.
When I try square brackets instead of parentheses:
SELECT Title, UrlName FROM Lesson__kav WHERE Chapter__r.Id IN [ 'a036100000CCS8jAAH', 'a036100000CCS9sAAH']
MALFORMED_QUERY: Lesson__kav WHERE Chapter__r.Id IN [ 'a036100000CCS8jAAH', 'a036100000CCS9sAAH'] ^ ERROR at Row:1:Column:60 Bind variables only allowed in Apex code
I can't quite figure out if I'm having a format issue or if this is something I simply cannot do outside of Apex code.