Create a new session
post
/20260430/aiDataPlatforms/{aiDataPlatformId}/workspaces/{workspaceKey}/notebook/api/sessions
Creates a new session or returns an existing session if a session for the given path already exists.
Request
Path Parameters
-
aiDataPlatformId(required): string
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the AI Data Platform (Data Lake) instance.
-
workspaceKey(required): string
The key of the Workspace
Header Parameters
-
datalake-tenant-id: string
The tenant ID header.
-
opc-request-id: string
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.
-
opc-retry-token: string
Minimum Length:
1Maximum Length:64A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of running that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and removed from the system, then a retry of the original creation request might be rejected.
Details to create a new session.
Root Schema : CreateSessionDetails
Type:
objectDetails to create a session.
Show Source
-
agentFlowKey:
string
Key of the agent flow.
-
cluster_id:
string
Cluster ID.
-
id:
string
UUID of the session.
-
kernel:
object Kernel
Notebook kernel information.
-
name:
string
A user-friendly name for the session.
-
path:
string
Path to the session. A directory where notebook server is started and where notebooks are saved. For example, /data/test.ipynb.
-
type:
string
Type of session.
Nested Schema : Kernel
Type:
objectNotebook kernel information.
Show Source
-
connections:
integer
The number of active connections to this kernel.
-
execution_state:
string
Allowed Values:
[ "unknown", "starting", "idle", "busy", "terminating", "restarting", "autorestarting", "dead" ]Current execution state of Kernel (typically 'idle' or 'busy', but may be other values, such as 'starting'). Added in notebook server 5.0. -
id(required):
string
UUID of kernel.
-
last_activity:
string
ISO 8601 timestamp for last-seen activity on this kernel. Use this in combination with execution_state == 'idle' to identify which kernels have been idle since a given time. Timestamps will be UTC, indicated 'Z' suffix.
-
name:
string
Kernel spec name. (Example python3)
Response
Supported Media Types
- application/json
201 Response
Session created or returned.
Headers
-
Location: string(url)
URL for session commands.
-
etag: string
For optimistic concurrency control. See `if-match`.
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
opc-work-request-id: string
The OCID of the asynchronous work request. Use GetWorkRequest with this ID to track the status of the request.
Root Schema : Session
Type:
objectNotebook Session describes the Session context for a running instance of a Notebook. Each opened Notebook has a separate Session,
but different Notebook kernels can use same Session if user wants to share data across various opened Notebooks.
Show Source
-
agentFlowKey:
string
Agent Flow Key of an agent flow.
-
cluster_id:
string
Cluster ID.
-
id(required):
string
UUID of the notebook session.
-
kernel:
object Kernel
Notebook kernel information.
-
lifecycleState:
string
Allowed Values:
[ "CREATING", "ACTIVE", "FAILED" ]lifecycleState of a Notebook Session. -
name(required):
string
A user-friendly name for the notebook session.
-
path:
string
Path to notebook session. For example, /data/test.ipynb
-
type:
string
Allowed Values:
[ "notebook", "file", "agentflow" ]Notebook session type.
Nested Schema : Kernel
Type:
objectNotebook kernel information.
Show Source
-
connections:
integer
The number of active connections to this kernel.
-
execution_state:
string
Allowed Values:
[ "unknown", "starting", "idle", "busy", "terminating", "restarting", "autorestarting", "dead" ]Current execution state of Kernel (typically 'idle' or 'busy', but may be other values, such as 'starting'). Added in notebook server 5.0. -
id(required):
string
UUID of kernel.
-
last_activity:
string
ISO 8601 timestamp for last-seen activity on this kernel. Use this in combination with execution_state == 'idle' to identify which kernels have been idle since a given time. Timestamps will be UTC, indicated 'Z' suffix.
-
name:
string
Kernel spec name. (Example python3)
401 Response
Unauthorized (missing or expired credentials, and so on).
Headers
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error message.
404 Response
Not Found. The requested resource was not found.
Headers
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error message.
409 Response
Conflict. Request conflicts with the current state of the resource.
Headers
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error message.
429 Response
Too Many Requests. Too many requests sent to the server in a short period.
Headers
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error message.
500 Response
Internal Server Error. The server encountered an unexpected condition preventing fulfilment of the request.
Headers
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error message.
Default Response
Unknown Error. Error is not recognized by the system.
Headers
-
opc-request-id: string
Unique Oracle-assigned ID for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error message.