0

I am trying to get all list items in same name lists across the all sub sites having same names list. example list name: 'Action'

Now I want to get all 'Action' lists items across the all sub sites.

How do I write rest search api call for it?

1 Answer 1

1

You can retrieve your list items by using the following Search REST API Query in case you have used the same content type in the all Action Lists :

https://site.sharepoint.com/_api/search/query?querytext='ContentTypeId:0x01007CE30DD1206047728BAFD1C39A85012*'

You can get your content type using the following steps :

  1. Go to https://site.sharepoint.com/_layouts/15/mngctype.aspx
  2. Locate the content type of the list
  3. Click on it then in the URL you will find e.g : ctype=0x01007CE30DD1206047728BAFD1C39A850120

Note : I removed the last 0 from the content type and added a * instead

2
  • Thanks for your help! But if I have same name lists across the subsites which is custom list and their content type is different then what can I do? I want all list items by the list Name not by its content type!
    – Y. Jagtap
    Mar 23, 2018 at 11:47
  • 1
    You can use contentclass=STS_List Action instead, for more details please go to the following link : blogs.msdn.microsoft.com/mvpawardprogram/2015/02/16/… Mar 26, 2018 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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