Share via


SP へContentTypeCollection.addExistingContentType 方法 (sp.js)

指定されたコンテンツ タイプをコレクションに追加します。

**適用対象:**apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.ContentTypeCollection.addExistingContentType()

パラメーター

戻り値

[Type]:の SPコンテンツ タイプ

注釈

特定のコンテンツ タイプの名前は、コレクションにコンテンツ タイプのいずれかのと同じで、できません。

他のリソースのエンドポイント

エンドポイント URI 構造

http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes/addAvailableContentType(contentTypeId)

HTTP 要求

このリソースには、次の HTTP コマンドがサポートしています。

  • 投稿

投稿の書式

POST http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes/addAvailableContentType(contentTypeId)

リソースのパラメーター

  • contentType