Update notebook contents

put

/20260430/aiDataPlatforms/{aiDataPlatformId}/workspaces/{workspaceKey}/notebook/api/contents/{contentPath}

Updates the contents of an existing notebook with the provided details or saves a new notebook.

Request

Path Parameters
Header Parameters
  • For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. The only valid characters for request IDs are letters, numbers, underscore, and dash.
  • A flag to identify if the recent list should be updated.
    Default Value: false
Body ()
Details to update the notebook content model file.
Root Schema : UpdateContentDetails
Type: object
Content model provides a programmatic interface to interact with notebooks, files and directories within DataLake Notebook environment. Type field is used to describe content types like file, directory or notebook. Other notable fields are content and format. The content and format keys may be null if content is not contained.
Show Source
  • content
    Content if requested (otherwise null). For Notebook model, this contains a nbformat NotebookNode representing the .ipynb file represented by the model. For File model, content field is always of type unicode. For text-format file models, content simply contains the file???s bytes after decoding as UTF-8. Non-text (base64) files are read as bytes, base64 encoded, and then decoded as UTF-8. For Directory model, content field contains a list of content-free models representing the entities in the directory.
  • Allowed Values: [ "NULL", "json", "text", "base64" ]
    Format of content. For Notebook model, format field is always JSON. For File model, format field is either Text or Base64. For Directory model, format field is always JSON.
  • Name of notebook, file or directory, equivalent to the last part of the path
  • Full path for notebook, file, or directory.
  • Allowed Values: [ "notebook", "file", "directory" ]
    Type of Content model
Nested Schema : content
Type: object
Content if requested (otherwise null). For Notebook model, this contains a nbformat NotebookNode representing the .ipynb file represented by the model. For File model, content field is always of type unicode. For text-format file models, content simply contains the file???s bytes after decoding as UTF-8. Non-text (base64) files are read as bytes, base64 encoded, and then decoded as UTF-8. For Directory model, content field contains a list of content-free models representing the entities in the directory.
Back to Top

Response

Supported Media Types

200 Response

Successful operation. Notebook contents are updated.
Headers
Body ()
Root Schema : Content
Type: object
Content model provides a programmatic interface to interact with notebooks, files and directories within the AI Data Platform Workbench Notebook environment. Type field is used to describe content types like file, directory or notebook. Other notable fields are content and format. The content and format keys may be null if content is not contained.
Show Source
  • content
    Content if requested, otherwise is Null. For Notebook model, this contains a nbformat NotebookNode representing the .ipynb file represented by the model. For File model, content field is always Unicode type. For text-format file models, content simply contains the bytes of the file after decoding as UTF-8. Non-text (base64) files are read as bytes, base64 encoded, and then decoded as UTF-8. For Directory model, content field contains a list of content-free models representing the entities in the directory.
  • Creation timestamp.
  • A user-provided description of the file.
  • Allowed Values: [ "NULL", "json", "text", "base64" ]
    Format of content. For Notebook model, format field is always 'json'. For File model, format field is either 'text' or 'base64'. For directory model, format field is always 'json'.
  • [optional] The hexdigest hash string of content, if requested, otherwise null. It cannot be null if hashAlgorithm is defined.
  • [optional] The algorithm used to produce the hash, if requested, (otherwise null). It cannot be null if hash is defined. Available algorithms.
  • Last modified timestamp.
  • Mimetype is only applicable for File model. For other models, it is None. If content is not null, and type is 'file', this contains the mimetype of file. For example, text/plain application/octet-stream. Otherwise this is null.
  • Name of notebook, file or directory, equivalent to the last part of the path.
  • Full path for notebook, file or directory.
  • Size of file or notebook in bytes. If no size is provided, defaults to null.
  • Allowed Values: [ "notebook", "file", "directory" ]
    Type of content model.
  • Indicates whether the requester has permission to edit the file.
Nested Schema : content
Type: object
Content if requested, otherwise is Null. For Notebook model, this contains a nbformat NotebookNode representing the .ipynb file represented by the model. For File model, content field is always Unicode type. For text-format file models, content simply contains the bytes of the file after decoding as UTF-8. Non-text (base64) files are read as bytes, base64 encoded, and then decoded as UTF-8. For Directory model, content field contains a list of content-free models representing the entities in the directory.

400 Response

Bad Request (invalid query parameters, malformed headers, and so on).
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

401 Response

Unauthorized (missing or expired credentials, and so on).
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

404 Response

Not Found. The requested resource was not found.
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

409 Response

Conflict. Request conflicts with the current state of the resource.
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

412 Response

Precondition Failed (One or more conditions in request failed).
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

429 Response

Too Many Requests. Too many requests sent to the server in a short period.
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

500 Response

Internal Server Error. The server encountered an unexpected condition preventing fulfilment of the request.
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source

Default Response

Unknown Error. Error is not recognized by the system.
Headers
  • Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error information.
Show Source
Back to Top