Download Notebook Snapshot

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

Description

The download operation allows for the downloading of a notebook snapshot. The snapshot is returned as a JSON representation of the notebook. Only the owner of a notebook item is allowed to download a snapshot.

Request parameters

ParameterDetails

itemId

(Required)

The item ID of the notebook for which to download a snapshot.

resourceKey

(Required)

The resource key of the snapshot to download.

Example

Use dark colors for code blocksCopy
1
snapshot-f58ebdb43b184235a89d0a4acc2ec04b.json

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
https://notebookserver.domain.com:11443/arcgis/admin/notebooks/snapshots/download?f=json
&itemId=5dbacb22922d4ead9b8b065f3ea448b8
&resourceKey=snapshot-62c03cdfc00f4f7c9c94a0e4af9a0458.json

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
  "nbformat_minor": 2,
  "metadata": {
    "language_info": {
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "name": "python",
      "mimetype": "text/x-python",
      "file_extension": ".py",
      "version": "3.6.10"
    },
    "esriNotebookRuntime": {
      "notebookRuntimeName": "ArcGIS Notebook Python 3 Advanced",
      "notebookRuntimeVersion": "5.0"
    },
    "papermill": {
      "duration": 31.091296,
      "exception": null,
      "environment_variables": {},
      "start_time": "2020-09-18T21:35:17.776393",
      "end_time": "2020-09-18T21:35:48.867689",
      "output_path": "/arcgis/home/.tasks/j51fe2d06-4583-4793-8fae-10ebfb36c07a/output.ipynb",
      "parameters": {
        "Abbr": "CA",
        "Name": "California"
      },
      "version": "1.2.1",
      "input_path": "/arcgis/home/.tasks/j51fe2d06-4583-4793-8fae-10ebfb36c07a/c21213a381804c85935f50a1349a390f.ipynb"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "outputs": [],
      "metadata": {
        "trusted": false,
        "papermill": {
          "duration": 0.026293,
          "exception": false,
          "start_time": "2020-09-18T21:35:21.741877",
          "end_time": "2020-09-18T21:35:21.768170",
          "status": "completed"
        },
        "tags": ["injected-parameters"]
      },
      "execution_count": 1,
      "source": "# Parameters\nAbbr = \"CA\"\nName = \"California\"\n",
      "cell_type": "code"
    },
    {
      "metadata": {
        "papermill": {
          "duration": 0.008772,
          "exception": false,
          "start_time": "2020-09-18T21:35:21.782242",
          "end_time": "2020-09-18T21:35:21.791014",
          "status": "completed"
        },
        "tags": []
      },
      "source": "## Welcome to your notebook.\n",
      "cell_type": "markdown"
    },
    {
      "metadata": {
        "papermill": {
          "duration": 0.010163,
          "exception": false,
          "start_time": "2020-09-18T21:35:21.800228",
          "end_time": "2020-09-18T21:35:21.810391",
          "status": "completed"
        },
        "tags": []
      },
      "source": "#### Run this cell to connect to your GIS and get started:",
      "cell_type": "markdown"
    },
    {
      "outputs": [],
      "metadata": {
        "trusted": true,
        "papermill": {
          "duration": 26.139019,
          "exception": false,
          "start_time": "2020-09-18T21:35:21.821189",
          "end_time": "2020-09-18T21:35:47.960208",
          "status": "completed"
        },
        "tags": []
      },
      "execution_count": null,
      "source": "from arcgis.gis import GIS\ngis = GIS(\"home\")\nimport arcpy",
      "cell_type": "code"
    },
    {
      "metadata": {
        "papermill": {
          "duration": 0.019054,
          "exception": false,
          "start_time": "2020-09-18T21:35:47.980314",
          "end_time": "2020-09-18T21:35:47.999368",
          "status": "completed"
        },
        "tags": []
      },
      "source": "#### Now you are ready to start!",
      "cell_type": "markdown"
    },
    {
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": "This is snapshot1\n"
        }
      ],
      "metadata": {
        "trusted": true,
        "papermill": {
          "duration": 0.017816,
          "exception": false,
          "start_time": "2020-09-18T21:35:48.019658",
          "end_time": "2020-09-18T21:35:48.037474",
          "status": "completed"
        },
        "tags": []
      },
      "execution_count": 1,
      "source": "print(\"This is snapshot3\")",
      "cell_type": "code"
    },
    {
      "outputs": [],
      "metadata": {
        "trusted": true
      },
      "execution_count": null,
      "source": "",
      "cell_type": "code"
    }
  ],
  "nbformat": 4
}

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