question

YaroslavBilan-8480 avatar image
0 Votes"
YaroslavBilan-8480 asked MichaelHan-MSFT answered

Sharepoint "sites/search" api endpoint not returning some of the sites

We're using Sharepoint as a third-party service and at certain step we need to get the site by the part of it's name.
The endpoint we're using to get it is "v1.0/sites/search=[partOfName]*" and it works, but not for all of the sites.
I suppose there is a setting, which we might turn on on the newly created site to allow showing it in the search result list.

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hi @YaroslavBilan-8480,

Please try to use the endpoint v1.0/sites/search=* to list all the sites, will the newly created sites show in the result list? If they also doesn't display in the all sites list, it may take some time to show the newly created site in the search.




If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



If the response is helpful, please click "Accept Answer" and upvote it.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YaroslavBilan-8480 avatar image
0 Votes"
YaroslavBilan-8480 answered YaroslavBilan-8480 edited

Hi @MichaelHan-MSFT
It's almost 24 hours since I've created new sites, and I'm able to find some of them, but not all. I was experimenting with some configurations and maybe I did something right with some of them, which are available for search now, but maybe you can get me in the certain setup of settings for the site, which might make them available?
BTW we have more than 100 sites, if it matters.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YaroslavBilan-8480 avatar image
0 Votes"
YaroslavBilan-8480 answered

@MichaelHan-MSFT now all of them appeared in the list. Could you please explain how it works and why we need to wait for such a long time to see them? It's not quite great to force our customers to wait 24hours.
Could we somehow make them available manually asap after creation?
Or any other ideas / workarounds?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hi @YaroslavBilan-8480,

After creating the site, you could get the site through endpoint v1.0/sites/yourtenant.sharepoint.com:/sites/siteName:/

Thus the newly created site would appear in the list.



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YaroslavBilan-8480 avatar image
0 Votes"
YaroslavBilan-8480 answered

@MichaelHan-MSFT Unfortunately, it didn't work for me. Yes, I'm able to get the site by the link you described, but it doesn't appear in the full list of sites via the "sites/search=*"
However, I found a way to not wait up to 14 hours by using another API endpoint "POST v1.0/search/query" but it still required to wait at least a couple of hours.
I've been also trying to reindex newly created site as well as the root site, but it didn't help me to reduce a wait-time.
Any other ideas?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YaroslavBilan-8480 avatar image
0 Votes"
YaroslavBilan-8480 answered

Also, don't know if it matters - but community sites appears way much faster than team sites

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

@YaroslavBilan-8480,

Reindex the site would not work. As far as I know, the site need to be crawled to be searched

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.