Skip To Content

Download Notebook Snapshot

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

snapshot-f58ebdb43b184235a89d0a4acc2ec04b.json
f

(Optional)

The response format. The default response format is html.

Values: html | json | pjson

Example usage


https://notebookserver.domain.com:11443/arcgis/admin/notebooks/snapshots/download?f=json
&itemId=5dbacb22922d4ead9b8b065f3ea448b8
&resourceKey=snapshot-62c03cdfc00f4f7c9c94a0e4af9a0458.json

JSON Response example


{
  "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
}