author | title | description | ms.localizationpriority | doc_type | ms.subservice |
---|---|---|---|---|---|
swapnil1993 |
contentType: addCopy |
Add a copy of a site content type to a list. |
medium |
apiPageType |
sharepoint |
Namespace: microsoft.graph
Add a copy of a content type from a site to a list.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
POST /sites/{site-id}/lists/{list-id}/contentTypes/addCopy
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the parameters.
The following table shows the parameters that can be used with this action.
Parameter | Type | Description |
---|---|---|
contentType | string | Canonical URL to the site content type that will be copied to the list. Required. |
If successful, this call returns a 201 Created
response code and a contentType object in the response body.
POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/contentTypes/addCopy
Content-Type: application/json
{
"contentType": "https://graph.microsoft.com/v1.0/sites/{site-id}/contentTypes/0x0101"
}
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
HTTP/1.1 201 Created
{
"id": "0x0101",
"description": "Create a new custom CSR JavaScript Display Template.",
"group": "Display Template Content Types",
"hidden": false,
"name": "JavaScript Display Template",
"parentId": "0x01",
"readOnly": false,
"sealed": false,
"base": {
"id": "0x01",
"description": "Create a new custom CSR JavaScript Display Template.",
"group": "Display Template Content Types",
"hidden": false,
"name": "JavaScript Display Template",
"readOnly": false,
"sealed": false
}
}