get_datalab¶
- DatalabsApi.get_datalab(role_id, id, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get datalab details
Returns a datalab’s configuration and current status. Requires read-only access or higher. For a studio datalab, DatalabURL carries a sign-in URL once both the datalab and the caller’s own workspace are in service. When the caller is missing dataset or domain access, DatalabURL is omitted and Message explains what is missing.
- Parameters:
role_id (str) – User role id (required)
id (str) – Identifier of the datalab. (required)
projection_expression (str) – Comma-separated list of fields to return; all other fields are omitted.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /datalabs/{id}
Success (HTTP 200)¶
Successful API response
Request / response example
{
"DatalabId": "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
"DatalabName": "ml-exploration",
"DatalabType": "sagemaker-notebook",
"Description": "Notebook workspace for the sales model",
"AccessType": "owner",
"DatalabStatus": "InService",
"CreatedBy": "jdoe",
"CreationTime": "2026-08-01 09:14:22",
"LastModifiedBy": "jdoe",
"LastModifiedTime": "2026-08-12 11:03:07",
"ComputeMetadata": {
"InstanceList": [
"ml.t3.medium"
],
"VolumeSizeInGB": "20",
"DirectInternetAccess": "Enabled"
},
"AdditionalMetadata": {
"Keywords": [
"ml",
"sales"
],
"IsSessionsEnabled": false,
"NotebookType": "sagemaker",
"LifecycleConfiguration": "install-team-packages"
},
"ResourceAccessMetadata": {
"ResourceAccessStatus": "completed"
}
}
Errors¶
Documented error codes: IPV-1002, AUTH-1002, DLB-1002.
HTTP 400
Invalid input
DatalabId does not exist
{
"Message": "IPV-1002 - Invalid DatalabId - b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f, resource not found."
}
Caller has no access on the datalab
{
"Message": "AUTH-1002 - User action is not permitted"
}
HTTP 500
Something went wrong at backend
Request / response example
{
"Message": "DLB-1002 - Datalab b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f doesn't exist"
}