Share via


SP.File.unPublish Method (sp.js)

Removes the file from content approval or unpublish a major version.

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

SP.File.unPublish()

Parameters

  • comment
    Type: String

    Specifies the unpublish comment.

    Its length must be equal to or less than 1023.

Return value

Undefined

REST resource endpoint

See File resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getbyurl(filerelativeurl)/unPublish(comment)

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getbyurl(filerelativeurl)/unPublish(comment)

Resource parameters

  • comment