SSRS REST API - I Want to get all CatalogItems where Type = Report

Viewed 310

I'm using Postman to test a GET on my SSRS database. The GET is "http://server/reports/api/v2.0/CatalogItems". This works and gives me lots of information. One of the values is "Type": which has values such a "Folder" and "Report". I would like to get only the Reports. I can get a specific report using "http://server/reports/api/v2.0/CatalogItems?$filter=Name eq 'ReportXYZ'". But if I use "?$filter=Type eq 'Report'" I get the error "The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Model.CatalogItemType' and 'Edm.String' for operator kind 'Equal'."

Any ideas how to do this? Thanks!

1 Answers

FINALLY found the answer! "?$filter=Type eq Model.CatalogItemType'Report'". I don't know why this isn't documented better on the Swagger site or one of Microsoft's pages.

Type is a enum, not a string. So for any enum's this should work.

Related