Get pageTemplate
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Return the metadata for a pageTemplate in the templates folder in a site.
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Sites.Read.All | Sites.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Sites.Read.All | Sites.ReadWrite.All |
HTTP request
GET /sites/{site-id}/pageTemplates/microsoft.graph.pageTemplate/{page-template-id}
Optional query parameters
This method supports the $select
and $expand
OData query parameters to help customize the response. For general information, see OData query parameters.
You can use the $expand=canvasLayout
query parameter to include the content of an item when you retrieve the metadata of an item if the item has a canvasLayout relationship.
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json. Required. |
Accept | application/json;odata.metadata=none. Optional. Removes all OData metadata from the response. We recommend including this header when the response is used in another request. |
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK
and a pageTemplate object in the response body.
Examples
Request
The following example shows a request.
GET /sites/dd00d52e-0db7-4d5f-8269-90060ac688d1/pageTemplates/microsoft.graph.pageTemplate/f6ed8c43-9923-4c6c-ba09-9c32b8f10aeb
Response
The following example shows the response.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.type": "microsoft.graph.pageTemplate",
"description": "Here's the page description",
"id": "65e59907-59d5-44ff-a038-7c0bf3034567",
"name": "Home.aspx",
"webUrl": "https://a830edad9050849rahmit.sharepoint.com/SitePages/Templates/Home.aspx",
"title": "Organization Home",
"thumbnailWebUrl": "https://cdn.hubblecontent.osi.office.net/m365content/publish/00210d24-bba0-42e6-9a31-1d452a95dd75/thumbnails/large.jpg?file=163352059.jpg",
"promotionKind": "page",
"pageLayout": "home",
"showComments": true,
"showRecommendedPages": false,
"createdBy": {
"user": {
"displayName": "Rahul Mittal",
"email": "rahmit@contoso.com"
}
},
"lastModifiedBy": {
"user": {
"displayName": "Rahul Mittal",
"email": "rahmit@contoso.com"
}
},
"publishingState": {
"level": "published",
"versionId": "1.0"
},
"reactions": {
"commentCount": 1
}
}