> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Save notebook

> save notebook. PUT /api/v1/notebooks/{notebook_id}. Save a complete ipynb document using its current revision. Include existing settings to preserve execution settings.

ReferenceApplies to: Unified engine deployments

## Related guidance

[Addresses and access](https://docs.e6data.com/transformation/http/access.md) · [Request identity](https://docs.e6data.com/transformation/http/request-identity.md) · [Errors and recovery](https://docs.e6data.com/transformation/http/errors.md) · [Pagination and results](https://docs.e6data.com/transformation/http/results.md)


## OpenAPI

````yaml openapi/transformation.json PUT /api/v1/notebooks/{notebook_id}
openapi: 3.1.0
info:
  description: >-
    HTTP contracts for the Unified engine. Requests use the connected
    deployment's access model and configured owner. Response examples are
    illustrative; inspect your engine response in your client. SQL-managed
    secrets, credentials, streaming pipelines and maintenance run through
    session operations.
  title: Laminar Unified HTTP API
  version: v1
servers:
  - url: https://engine.example.com
    description: >-
      Example engine origin. Replace it with your deployment URL and any API
      mount prefix.
security: []
paths:
  /api/v1/notebooks/{notebook_id}:
    put:
      tags:
        - Notebooks
      summary: save notebook
      description: >-
        save notebook. PUT /api/v1/notebooks/{notebook_id}. Save a complete
        ipynb document using its current revision. Include existing settings to
        preserve execution settings.
      operationId: save_notebook
      parameters:
        - in: path
          name: notebook_id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                document:
                  description: >-
                    A complete nbformat 4 .ipynb document. Set
                    metadata.kernelspec.name to sql or python3. Code cells have
                    id, cell_type, metadata, source (string or array of lines),
                    outputs:[], execution_count:null. Markdown cells have id,
                    cell_type, metadata and source.
                  type: object
                expected_revision:
                  minimum: 0
                  type: integer
                name:
                  type: string
                settings:
                  additionalProperties: false
                  properties:
                    options:
                      additionalProperties: false
                      properties:
                        compute_requirements:
                          anyOf:
                            - additionalProperties: false
                              properties:
                                cpu_millicores:
                                  minimum: 1
                                  type: integer
                                memory_bytes:
                                  minimum: 1
                                  type: integer
                                tuning:
                                  anyOf:
                                    - additionalProperties: false
                                      properties:
                                        batch_rows:
                                          maximum: 1048576
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        buffer_bytes:
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        file_read_concurrency:
                                          maximum: 32
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        input_prefetch_batches:
                                          maximum: 32
                                          minimum: 0
                                          type:
                                            - integer
                                            - 'null'
                                        output_buffer_batches:
                                          maximum: 32
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        query_memory_bytes:
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        spill_bytes:
                                          minimum: 0
                                          type:
                                            - integer
                                            - 'null'
                                        threads:
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        write_batch_rows:
                                          description: >-
                                            Sink batch row limit. Defaults to 65536
                                            independently of reader batches.
                                          maximum: 1048576
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                        write_parallelism:
                                          description: >-
                                            Concurrent worker-local file writers.
                                            Defaults to execution threads and cannot
                                            exceed them.
                                          minimum: 1
                                          type:
                                            - integer
                                            - 'null'
                                      required: []
                                      type: object
                                    - type: 'null'
                                  description: >-
                                    Optional resource-aware execution overrides;
                                    omitted fields scale with CPU and memory.
                              required:
                                - cpu_millicores
                                - memory_bytes
                              type: object
                            - type: 'null'
                        deployment_profile:
                          description: >-
                            Deployment compute pool. Omit to use its default.
                            Cannot combine with provisioner, profile, or
                            compute_requirements.
                          type:
                            - string
                            - 'null'
                        execution_target:
                          enum:
                            - DataFusion
                            - DuckDb
                            - null
                        execution_timeout:
                          anyOf:
                            - additionalProperties: false
                              properties:
                                nanos:
                                  maximum: 999999999
                                  minimum: 0
                                  type: integer
                                secs:
                                  minimum: 0
                                  type: integer
                              required:
                                - secs
                                - nanos
                              type: object
                            - type: 'null'
                        max_attempts:
                          minimum: 1
                          type:
                            - integer
                            - 'null'
                        missed_run_policy:
                          enum:
                            - RunOnce
                            - RunAll
                            - Skip
                            - null
                        overlap_policy:
                          enum:
                            - Wait
                            - Skip
                            - Allow
                            - null
                        parallelism:
                          description: >-
                            Maximum concurrent tasks. Unset has no per-run
                            limit. Workload scope reuses workers within the run.
                            Compute requirements apply per worker.
                          maximum: 4294967295
                          minimum: 1
                          type:
                            - integer
                            - 'null'
                        profile:
                          description: >-
                            Named compute profile. Do not combine with custom
                            compute_requirements.
                          type:
                            - string
                            - 'null'
                        provisioner:
                          description: >-
                            Named provisioner. Omit to inherit the instance
                            default.
                          type:
                            - string
                            - 'null'
                        queue_timeout:
                          anyOf:
                            - additionalProperties: false
                              properties:
                                nanos:
                                  maximum: 999999999
                                  minimum: 0
                                  type: integer
                                secs:
                                  minimum: 0
                                  type: integer
                              required:
                                - secs
                                - nanos
                              type: object
                            - type: 'null'
                          description: >-
                            Optional time to wait after a task enters the
                            execution queue.
                        worker_scope:
                          description: >-
                            Deployment shares startup pools. Workload reuses
                            workers within a run. Task creates a worker for each
                            attempt.
                          enum:
                            - Deployment
                            - Workload
                            - Task
                            - null
                        xray:
                          description: >-
                            Capture detailed performance for this session
                            operation only. Default false. Requires the Xray
                            feature flag.
                          type: boolean
                      required: []
                      type: object
                    query:
                      anyOf:
                        - additionalProperties: false
                          properties:
                            ansi_enabled:
                              type: boolean
                            case_sensitive:
                              type: boolean
                            current_catalog:
                              type: string
                            namespace:
                              items:
                                type: string
                              type: array
                            time_zone:
                              type: string
                          required:
                            - current_catalog
                            - namespace
                            - time_zone
                            - case_sensitive
                            - ansi_enabled
                          type: object
                        - type: 'null'
                  required: []
                  type: object
              required:
                - expected_revision
                - name
                - document
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/app_notebooks_core_src_models_rs_NotebookResponse
          description: Successful response.
        default:
          content:
            application/json:
              example:
                error:
                  code: invalid_request
                  message: Check the request fields
              schema:
                $ref: '#/components/schemas/ApiError'
          description: A rejected or failed request. Inspect error.code before retrying.
components:
  schemas:
    app_notebooks_core_src_models_rs_NotebookResponse:
      properties:
        notebook:
          $ref: >-
            #/components/schemas/app_notebooks_core_src_models_rs_NotebookSnapshot
      required:
        - notebook
      type: object
    ApiError:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
    app_notebooks_core_src_models_rs_NotebookSnapshot:
      properties:
        created_at:
          $ref: '#/components/schemas/shared_common_src_time_rs_WallClockTimestamp'
        document:
          description: JSON value; fields depend on the enclosing document or provider.
        name:
          type: string
        notebook_id:
          $ref: '#/components/schemas/app_notebooks_core_src_models_rs_NotebookId'
        revision:
          minimum: 0
          type: integer
        settings:
          $ref: >-
            #/components/schemas/app_notebooks_core_src_models_rs_NotebookSettings
        updated_at:
          $ref: '#/components/schemas/shared_common_src_time_rs_WallClockTimestamp'
      required:
        - notebook_id
        - name
        - revision
        - document
        - settings
        - created_at
        - updated_at
      type: object
    shared_common_src_time_rs_WallClockTimestamp:
      properties:
        unix_millis:
          type: integer
      required:
        - unix_millis
      type: object
    app_notebooks_core_src_models_rs_NotebookId:
      format: uuid
      type: string
    app_notebooks_core_src_models_rs_NotebookSettings:
      properties:
        options:
          $ref: >-
            #/components/schemas/shared_common_src_lib_rs_WorkloadSubmissionOptions
        query:
          anyOf:
            - $ref: '#/components/schemas/shared_common_src_lib_rs_QuerySettings'
            - type: 'null'
          description: Omitted query settings use the engine's configured session defaults.
      required:
        - query
        - options
      type: object
    shared_common_src_lib_rs_WorkloadSubmissionOptions:
      properties:
        compute_requirements:
          anyOf:
            - $ref: >-
                #/components/schemas/shared_common_src_lib_rs_ComputeRequirements
            - type: 'null'
        deployment_profile:
          anyOf:
            - type: string
            - type: 'null'
        execution_target:
          anyOf:
            - $ref: '#/components/schemas/shared_common_src_lib_rs_ExecutionTarget'
            - type: 'null'
        execution_timeout:
          anyOf:
            - properties:
                nanos:
                  maximum: 999999999
                  minimum: 0
                  type: integer
                secs:
                  minimum: 0
                  type: integer
              required:
                - secs
                - nanos
              type: object
            - type: 'null'
        max_attempts:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        missed_run_policy:
          anyOf:
            - $ref: '#/components/schemas/shared_common_src_lib_rs_MissedRunPolicy'
            - type: 'null'
        overlap_policy:
          anyOf:
            - $ref: '#/components/schemas/shared_common_src_lib_rs_OverlapPolicy'
            - type: 'null'
        parallelism:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: Maximum assigned tasks in one run. Unset has no run limit.
        profile:
          anyOf:
            - type: string
            - type: 'null'
        provisioner:
          anyOf:
            - type: string
            - type: 'null'
        queue_timeout:
          anyOf:
            - properties:
                nanos:
                  maximum: 999999999
                  minimum: 0
                  type: integer
                secs:
                  minimum: 0
                  type: integer
              required:
                - secs
                - nanos
              type: object
            - type: 'null'
        start_paused:
          type: boolean
        worker_scope:
          anyOf:
            - $ref: '#/components/schemas/shared_common_src_lib_rs_WorkerScope'
            - type: 'null'
        xray:
          type: boolean
      required:
        - queue_timeout
        - worker_scope
        - parallelism
        - execution_target
        - execution_timeout
        - compute_requirements
        - max_attempts
        - missed_run_policy
        - overlap_policy
      type: object
    shared_common_src_lib_rs_QuerySettings:
      properties:
        ansi_enabled:
          type: boolean
        case_sensitive:
          type: boolean
        current_catalog:
          type: string
        namespace:
          items:
            type: string
          type: array
        time_zone:
          type: string
      required:
        - current_catalog
        - namespace
        - time_zone
        - case_sensitive
        - ansi_enabled
      type: object
    shared_common_src_lib_rs_ComputeRequirements:
      properties:
        cpu_millicores:
          minimum: 1
          type: integer
        memory_bytes:
          minimum: 1
          type: integer
        tuning:
          anyOf:
            - $ref: '#/components/schemas/shared_common_src_compute_rs_ComputeTuning'
            - type: 'null'
      required:
        - cpu_millicores
        - memory_bytes
      type: object
    shared_common_src_lib_rs_ExecutionTarget:
      oneOf:
        - const: DataFusion
          type: string
        - const: DuckDb
          type: string
    shared_common_src_lib_rs_MissedRunPolicy:
      oneOf:
        - const: RunOnce
          type: string
        - const: RunAll
          type: string
        - const: Skip
          type: string
    shared_common_src_lib_rs_OverlapPolicy:
      oneOf:
        - const: Wait
          type: string
        - const: Skip
          type: string
        - const: Allow
          type: string
    shared_common_src_lib_rs_WorkerScope:
      oneOf:
        - const: Task
          type: string
        - const: Workload
          type: string
        - const: Deployment
          type: string
    shared_common_src_compute_rs_ComputeTuning:
      properties:
        batch_rows:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        file_read_concurrency:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        input_prefetch_batches:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
        native_parquet_scan:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            False always uses connector-produced Arrow batches. Omitted keeps
            the native Parquet capability enabled when the source can supply it
            safely.
        output_buffer_batches:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        query_memory_bytes:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        spill_bytes:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: >-
            Zero disables disk spill. The directory is controlled by the
            deployment.
        threads:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        write_batch_rows:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        write_parallelism:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
      required:
        - threads
        - query_memory_bytes
        - batch_rows
        - write_batch_rows
        - write_parallelism
        - spill_bytes
        - output_buffer_batches
        - file_read_concurrency
        - input_prefetch_batches
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.