This documentation is archived and is not being maintained.

SP.AppInstance object

SharePoint 2013

Represents an SP.App object (sp.js) object installed to a specific Web site.

Last modified: March 09, 2015

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

var object = new SP.AppInstance()

The AppInstance object has the following members.

Constructor

The AppInstance object has the following constructor.

Constructor

Description

AppInstance

Initializes a new instance of the SP.AppInstance object.

Methods

The AppInstance object has the following methods.

Method

Description

cancelAllJobs

Cancels each currently running lifecycle job for an app instance.

getErrorDetails

Retrieves the details of an error the app instance has encountered.

getPreviousAppVersion

Retrieves the version of the app that is being upgraded from during an upgrade.

install

Starts an install on this app instance.

retryAllJobs

Restarts all jobs for this app instance if there are any.

uninstall

Removes app instances that are either initialized or installed.

upgrade

Uploads a version of an app, and then upgrades the app instance to that version.

Properties

The AppInstance object has the following properties.

Property

Description

appPrincipalId

Gets the encoded claim value for the app principal identifier associated with the app instance.

appWebFullUrl

Gets the absolute URL of the site created during the installation of the app instance that is used to host SharePoint components.

id

Gets the unique identifier of the SP.AppInstance object object.

inError

Gets whether the app instance is in an error state.

remoteAppUrl

Gets the base URL of the remote system deployed during the installation of this app instance.

settingsPageUrl

Gets the settings page URL of the current app instance.

siteId

Gets he SharePoint site containing the Web where this app instance is installed.

startPage

Gets the start page of the app instance.

status

Gets the lifecycle of an app instance based on the constants defined by the SP.AppInstanceStatus enumeration enumeration.

title

Gets the title of the SharePoint app.

webId

Gets the identifier of the web where this app is installed.

Show: