Share via


SP.ListCollection.ensureSitePagesLibrary Method (sp.js)

Gets a list that is the default location for wiki pages.

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

SP.ListCollection.ensureSitePagesLibrary()

Return value

Type: SP.List

The list that is the default location for wiki pages.

Remarks

If the list does not exist, this method creates and returns the list that is the default location for wiki pages.

REST resource endpoint

See ListCollection resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/lists/ensureSitePagesLibrary()

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/lists/ensureSitePagesLibrary()