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

# Get parsed metadata for a notebook

> Return parsed structure, detected I/O, and inferred config for one notebook.



## OpenAPI

````yaml get /api/notebooks/{s3_key}/metadata
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/notebooks/{s3_key}/metadata:
    get:
      tags:
        - Notebooks
      summary: Get parsed metadata for a notebook
      description: >-
        Return parsed structure, detected I/O, and inferred config for one
        notebook.
      operationId: get_notebook_metadata_api_notebooks__s3_key__metadata_get
      parameters:
        - name: s3_key
          in: path
          required: true
          schema:
            type: string
            title: S3 Key
      responses:
        '200':
          description: Metadata returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotebookMetadata'
        '400':
          description: Invalid s3_key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden — notebook outside caller's home prefix
        '404':
          description: Notebook not found
        '422':
          description: Notebook is not valid JSON
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    NotebookMetadata:
      properties:
        s3_key:
          type: string
          title: S3 Key
          description: Object key under the notebooks bucket.
        owner:
          type: string
          title: Owner
          description: Owner username extracted from the S3 path prefix.
        size_bytes:
          type: integer
          title: Size Bytes
          description: Size of the notebook in bytes.
        last_modified:
          type: string
          format: date-time
          title: Last Modified
          description: S3 LastModified timestamp.
        config:
          $ref: '#/components/schemas/NotebookConfig'
          description: Config parsed from the nx1:config cell (defaults if absent).
        tasks:
          items:
            $ref: '#/components/schemas/NotebookTask'
          type: array
          title: Tasks
          description: >-
            Tasks detected from nx1:task:* tags. Empty list means single-task
            pipeline.
        inputs:
          items:
            $ref: '#/components/schemas/NotebookInput'
          type: array
          title: Inputs
          description: Detected inputs.
        outputs:
          items:
            $ref: '#/components/schemas/NotebookOutput'
          type: array
          title: Outputs
          description: Detected outputs.
        framework:
          anyOf:
            - type: string
            - type: 'null'
          title: Framework
          description: >-
            Detected primary framework: spark | pandas | pytorch | sklearn | ...
            (None if not detected).
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          description: Static-analysis gaps or unresolved patterns to surface to the user.
      type: object
      required:
        - s3_key
        - owner
        - size_bytes
        - last_modified
        - config
      title: NotebookMetadata
      description: Parsed notebook structure, detected I/O, and inferred pipeline config.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    NotebookConfig:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Pipeline name from the config block.
        compute:
          anyOf:
            - type: string
            - type: 'null'
          title: Compute
          description: 'Compute profile: cpu-small | cpu-large | gpu-medium | gpu-large.'
        approval_required:
          type: boolean
          title: Approval Required
          description: Whether model promotion requires human approval.
          default: false
        schedule:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedule
          description: 'Schedule type: asset | cron | manual.'
      type: object
      title: NotebookConfig
      description: Parsed contents of the notebook's 'nx1:config' tagged cell.
    NotebookTask:
      properties:
        name:
          type: string
          title: Name
          description: Task name from the 'nx1:task:{name}' cell tag.
        cell_indices:
          items:
            type: integer
          type: array
          title: Cell Indices
          description: Indices of cells that belong to this task.
      type: object
      required:
        - name
      title: NotebookTask
      description: A logical task block formed by nx1:task:* cell tags.
    NotebookInput:
      properties:
        table:
          anyOf:
            - type: string
            - type: 'null'
          title: Table
          description: Fully-qualified table name if resolved.
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
          description: Format (iceberg, parquet, csv, ...) if detected.
        source:
          type: string
          enum:
            - spark.read.table
            - spark.read.format
            - spark.sql
            - regex
          title: Source
          description: Which detector matched this input.
        cell_index:
          type: integer
          title: Cell Index
          description: Index of the notebook cell where the read was detected.
      type: object
      required:
        - source
        - cell_index
      title: NotebookInput
      description: A detected input (e.g. Iceberg table read) from static analysis.
    NotebookOutput:
      properties:
        table:
          anyOf:
            - type: string
            - type: 'null'
          title: Table
          description: Destination table name if detected.
        mlflow_experiment:
          anyOf:
            - type: string
            - type: 'null'
          title: Mlflow Experiment
          description: MLflow experiment name if detected.
        kind:
          type: string
          enum:
            - spark_write
            - mlflow_experiment
          title: Kind
          description: Output category.
        cell_index:
          type: integer
          title: Cell Index
          description: Index of the notebook cell where the write was detected.
      type: object
      required:
        - kind
        - cell_index
      title: NotebookOutput
      description: >-
        A detected output from static analysis (Spark write or MLflow
        experiment).
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````