I need to create SharePoint Sub-Sites under a Site Collection from a Java application.
The first set of Sub-Sites were created in a few seconds per Sub-Site(parent Site). As more and more subpages are being created, the process gets slower and slower.
Now a sub-site is created in 150 seconds and I cannot figure out why.
String json =
{
"parameters": {
"__metadata":{
"type":"SP.WebInfoCreationInformation"
},
"Title":"TITLE",
"Url":"URL",
"Description":"DESCRIPTION",
"WebTemplate":"STS",
"Language":"1038",
"UseUniquePermissions":"false"
}
}
HttpPost post = new HttpPost("http://x.sharepoint.com/sites/x/_api/web/webinfos/add");
post.setHeader("Authorization", "Bearer " + token);
post.setHeader("Accept", "application/json;odata=verbose");
post.setHeader("Content-Type", "application/json;odata=verbose");
post.setEntity(new StringEntity(json, "UTF-8"));
httpclient.execute(post);
The last row is processed for a duration of 150 seconds.
Thanks in advance if anyone can help me with what is causing the slowdown.