0

I'm trying to extract list data from a site (with REST query) and its subsites based on their content type and put everything in a different list.

For example from https://mytenant.sharepoint.com/sites/siteA, https://mytenant.sharepoint.com/sites/siteA/siteB and so on.

The content type is custom made, lets call it CT1 with ID 0x011100F324658D0CFE9E46B6B8FD21A38FE5A7

I'm trying to get all list from my site A and its subsites with the ID of the content type im looking for like this:

             /_api/search/query? 
          querytext='ContentTypeId:0x011100F324658D0CFE9E46B6B8FD21A38FE5A7* 
         + path:https://mytenant/sites/siteA*'&selectproperties='Title,Path'

But this doesn't return anything at all.

  • Please refer to my answer, hope it helps! – Sohail Shaikh Oct 24 '18 at 16:35
0

Try below url:

/_api/search/query?querytext='ContentTypeId:0x011100F324658D0CFE9E46B6B8FD21A38FE5A7*+path:https://mytenant/sites/siteA/*'&selectproperties='Title,Path'

"/" was missing in the sitecollection url.

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.