site 资源Site resource

site 资源提供 SharePoint 网站的元数据和关系。The site resource provides metadata and relationships for a SharePoint site.

方法Methods

方法Method 返回类型Return type 说明Description
获取根网站Get root site 网站Site 访问租户内的根 SharePoint 网站。To access the root SharePoint site within a tenant:
获取网站Get site 网站Site 使用 siteId 访问 SharePoint 网站。Access a sharePoint site using the siteId.
根据路径获取网站Get site by path 网站Site 通过相对路径访问根 SharePoint 网站。To access the root SharePoint site with a relative path:
获取组的网站Get site for a group 网站Site 访问组的团队网站。To access the team site for a group:
获取分析结果Get analytics itemAnalyticsitemAnalytics 对此资源可获取分析。Get analytics for this resource.
按间隔获取活动Get activities by interval itemActivityStatitemActivityStat 在指定的时间间隔内获取 itemActivityStats 的集合。Get a collection of itemActivityStats within the specified time interval.
搜索网站Search for sites 网站集合collection of site 在 SharePoint 租户中搜索与所提供的关键字匹配的 网站。Search across a SharePoint tenant for sites that match provided keywords.

属性Properties

属性Property 类型Type 说明Description
idid stringstring 项的唯一标识符。只读。The unique identifier of the item. Read-only.
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 创建项目的日期和时间。只读。The date and time the item was created. Read-only.
说明description stringstring 网站的描述性文本。The descriptive text for the site.
displayNamedisplayName stringstring 网站的完整标题。只读。The full title for the site. Read-only.
eTageTag stringstring 该项目的 ETag。只读。ETag for the item. Read-only.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 上次修改项目的日期和时间。只读。The date and time the item was last modified. Read-only.
namename stringstring 项目名称/标题。The name / title of the item.
root root 如果存在,则表示这是网站集中的根网站。只读。If present, indicates that this is the root site in the site collection. Read-only.
sharepointIdssharepointIds sharepointIdssharepointIds 返回对 SharePoint REST 兼容性有用的标识符。只读。Returns identifiers useful for SharePoint REST compatibility. Read-only.
siteCollectionsiteCollection siteCollectionsiteCollection 提供有关该网站的网站集的详细信息。仅在根网站上可用。只读。Provides details about the site's site collection. Available only on the root site. Read-only.
webUrlwebUrl string (url)string (url) 在浏览器中显示此项目的 URL。只读。URL that displays the item in the browser. Read-only.

关系Relationships

关系Relationship 类型Type 说明Description
analyticsanalytics itemAnalytics 资源itemAnalytics resource 此网站上发生的查看活动的相关分析。Analytics about the view activities that took place in this site.
columnscolumns Collection(columnDefinition)Collection(columnDefinition) 可以在此网站下方的列表中重复使用的列定义集合。The collection of column definitions reusable across lists under this site.
contentTypescontentTypes Collection(contentType)Collection(contentType) 为此网站定义的内容类型集合。The collection of content types defined for this site.
drivedrive drivedrive 此网站的默认驱动器(文档库)。The default drive (document library) for this site.
驱动器drives 集合(driveCollection(drive) 网站下方的驱动器集合(文档库)。The collection of drives (document libraries) under this site.
项目items 集合 (baseItem)Collection(baseItem) 用于处理包含在此网站中的任何项目。不能枚举该集合。Used to address any item contained in this site. This collection cannot be enumerated.
listslists Collection(list)Collection(list) 此网站下方的列表集合。The collection of lists under this site.
sitessites 集合(网站Collection(site) 网站下方的子网站的集合。The collection of the sub-sites under this site.
onenoteonenote onenoteonenote 调用 OneNote 服务执行笔记本相关操作。Calls the OneNote service for notebook related operations.

JSON 表示形式JSON representation

下面是 site 资源的 JSON 表示形式。Here is a JSON representation of a site resource.

site 资源派生自 baseItem,并继承此资源的属性。The site resource is derived from baseItem and inherits properties from that resource.

{
  "id": "string",
  "root": { "@odata.type": "microsoft.graph.root" },
  "sharepointIds": { "@odata.type": "microsoft.graph.sharepointIds" },
  "siteCollection": {"@odata.type": "microsoft.graph.siteCollection"},
  "displayName": "string",

  /* relationships */
  "analytics": { "@odata.type": "microsoft.graph.itemAnalytics" },
  "contentTypes": [ { "@odata.type": "microsoft.graph.contentType" }],
  "drive": { "@odata.type": "microsoft.graph.drive" },
  "drives": [ { "@odata.type": "microsoft.graph.drive" }],
  "items": [ { "@odata.type": "microsoft.graph.baseItem" }],
  "lists": [ { "@odata.type": "microsoft.graph.list" }],
  "sites": [ { "@odata.type": "microsoft.graph.site"} ],
  "columns": [ { "@odata.type": "microsoft.graph.columnDefinition" }],
  "onenote": { "@odata.type": "microsoft.graph.onenote"},

  /* inherited from baseItem */
  "name": "string",
  "createdDateTime": "datetime",
  "description": "string",
  "eTag": "string",
  "lastModifiedDateTime": "datetime",
  "webUrl": "url"
}