Create Snapshot

URL:
https://<notebookserveradmin>/notebooks/snapshots/create
Methods:
POST
Required Capability:
Administrator or Create and Edit
Version Introduced:
10.9

Description

The create operation allows you to create a point-in-time, full snapshot of a notebook. Notebook snapshots are full copies of the notebook JSON preserved as a resource associated with the notebook item. By default, a notebook can have up to five snapshots. Once the maximum limit of snapshots is reached, additional snapshots cannot be created until one or more existing snapshots is deleted. Snapshots can only be created by the owner of a notebook item. Snapshots cannot be created for shared notebook items. If you have administrative privileges, you can modify the default limit of snapshots by configuring the maxSnapshotsPerNotebookItem system property.

Request parameters

ParameterDetails

itemId

(Required)

The item ID of the notebook for which a snapshot is created. If no notebookJSON value is provided, the current saved state of the notebook will be stored as the snapshot for the item

name

(Required)

A unique name for the snapshot.

description

(Optional)

A description of the snapshot.

notebookJSON

(Optional)

By default, a snapshot will be created from the item currently saved as the itemID value. However, you can pass in a notebook JSON to save as the snapshot.

privateAccess

(Optional)

A Boolean property. When set to true, the snapshot will be accessible only to the owner of the notebook item. When set to false, the snapshot will be accessible to users with whom the notebook is shared.

Values: true | false

executeNotebookSnapshot

Supported in ArcGIS Notebook Server 11.0.

Indicates whether the snapshot is intended to be used to create or overwrite a web tool. This snapshot will not count toward the default snapshot limit of five.

A maximum of two notebook snapshots are allowed.

Use the resourceKey value of the resulting snapshot as the snapshotId value in the creatService or edit service operations.

Values: true | false

f

(Optional)

The response format. The default response format is html .

Values: html | json | pjson

Example usage

Use dark colors for code blocksCopy
1
2
3
4
https://notebookserver.domain.com:11443/arcgis/admin/notebooks/snapshots/create?f=json
&name=Snapshot_1
&description=This+is+snapshot+1+
&notebookJSON=<{notebook JSON}>

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
{
  "snapshotResourceKey": "<snapshotResourceKey>",
  "status": "success|failure"
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
{
  "snapshotResourceKey": "snapshot-eaafdf1d95c248e6bbf49543b6300975.json",
  "status": "success"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.