I want to get all lists from subsites etc. based on their content type with REST Api. For particular list ("ProjectList") this works:

 $select=ContentType/Name&$expand=ContentType&$filter=ContentType eq 

But how will I be able to retrieve ALL lists, including subpages etc. by their content type?

I have tried:

   $select=ContentType/Name&$expand=ContentType&$filter=ContentType eq 

Without luck.

  • You want to get the all Items with content Type "Message" from Root site and sub sites or you want to get all the lists where this content Type attached. if it is First then you should use Search Rest API to get the All items from Web with Content Type="Message" sharepoint.stackexchange.com/questions/234200/… – vinit kumar Oct 12 '18 at 12:33

If you want to get list then you don't have to append "items" to your rest url:

/_api/Web/lists?$select=ContentType/Name&$expand=ContentType&$filter=ContentType eq 'Message'
| improve this answer | |
  • Thank you, but I dont get this to work. Both in my code, and in browser. – Arte2 Oct 12 '18 at 11:18
  • @Arte2 What error you get when you try it in browser? – Sohail Shaikh Oct 12 '18 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.