items.GetSite
Overview¶
This is the "GetSite Method" of the "Items Object". It gets site information based on the specified site ID.
Limitations¶
1.5.10.0
- When run by a user who does not have the "Site Administration Permission" for the site to get (excluding Privileged Users),
SiteSettings(the site settings, such as the labels and choices of the items) cannot be retrieved. This also applies to tenant managers who do not have the "Site Administration Permission". Site information such asSiteIdandTitlecan be retrieved. In processing that refers toSiteSettings, make sure that it has a value before using it.
Syntax¶
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | object | Yes | Specify the site ID |
Return Value¶
Return an array of "apiModel" for the corresponding site.
In version 1.5.10.0 and later, the API key in the AI integration settings of SiteSettings is masked (********).
Usage Examples¶
The following example gets site information for site ID 123.
const sites = Array.from(items.GetSite(123));
if (sites.length) {
context.Log(sites[0].SiteId);
context.Log(sites[0].Title);
context.Log(sites[0].ReferenceType);
}
Supported Versions¶
| Supported Version | Details |
|---|---|
| 1.5.10.0 and later | Changed so that SiteSettings cannot be retrieved when run by a user without the "Site Administration Permission" |