Sharepointデフォルトのテンプレートの場合
設定方法
a. サイトURL:https://test.com/sites/test/Projects/
b. POST
c. Uri: /_api/web/webinfos/add
d. Headers: Use the following header key-value pairs
Accept application/json;odata=verbose
Content-Type application/json;odata=verbose
e. Body: Copy-paste following JSON to the Body input box
{ '__metadata':
{ 'type': 'SP.WebInfoCreationInformation' },
'Url':'@{variables('SiteURL')}',
'Title':'@{variables('Site Title')}',
'Description':'Project Site',
'Language':'1033', (日本語1041)
'WebTemplate':'STS#3',
'UseUniquePermissions':false
}
}
sharepointonline カスタマサイトテンプレートの場合
1.手動でサブサイトを作成
2.作成されたサイトをテンプレートとして設定
設定手順:
サブサイト→サイトの設定
→テンプレートとしてサイトを保存
→ファイル名、テンプレート名、コンテンツを含むを入力
→OKボタンをクリックして保存
3.サイトテンプレートIDを取得
※テンプレートが英語の場合、「言語の選択」を英語に変更しないと、下記の「Custom」タブが出ません。
Finding the SiteTemplate GUID
The quickest way to get the GUID of a site template is to start creating a new site. When prompted to select the template open the “Custom” tab so that your template is shown. Press F12 in IE to open the developer bar and search for the template name.
a. サイトURL:https://test.com/sites/test/Projects/
b. POST
c. Uri: /_api/web/webinfos/add
d. Headers: Use the following header key-value pairs
Accept application/json;odata=verbose
Content-Type application/json;odata=verbose
e. Body: Copy-paste following JSON to the Body input box
{ '__metadata':
{ 'type': 'SP.WebInfoCreationInformation' },
'Url':'@{variables('SiteURL')}',
'Title':'@{variables('Site Title')}',
'Description':'Project Site',
'Language':'1033', (日本語1041)
'WebTemplate':'{84659096-89AD-4CC4-B1E2-5048DE9EDA46}#ProjectSiteTemplate',
'UseUniquePermissions':false
}
}
参考サイト: