SP.View.contentTypeId property (sp.js)

Gets or sets the identifier of the content type with which the view is associated so that the view is available only on folders of this content type.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var value = SP.View.get_contentTypeId ()
var value = SP.View.set_contentTypeId ()

Return value

Type: SP.ContentTypeId

REST resource endpoint

See View resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/lists(listid)/Views(viewid)/contentTypeId

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/lists(listid)/Views(viewid)/contentTypeId

GET syntax

GET http://<sitecollection>/<site>/_api/web/lists(listid)/Views(viewid)/contentTypeId