list_datalabs¶
- DatalabsApi.list_datalabs(role_id, offset=None, limit=None, sortorder=None, sortby=None, projection_expression=None, filter_expression=None, action=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List accessible datalabs
Returns the datalabs the caller has access to, with their current status and access level. With action set, returns the available instance types and their prices for that kind of datalab instead.
- Parameters:
role_id (str) – User role id (required)
offset (int) – 1-based index of the first item to return, so offset=1 is the first page.
limit (int) – Maximum number of items to return in one page.
sortorder (str) – Direction to sort by.
sortby (str) – Datalab field to sort by. Must be a text field present on every datalab, such as DatalabName, DatalabType, DatalabStatus, CreatedBy, CreationTime, LastModifiedBy or LastModifiedTime.
projection_expression (str) – Comma-separated list of fields to return; all other fields are omitted. When omitted, the listing returns a default subset of fields rather than the full item.
filter_expression (str) – Filter as one or more Field:Value pairs, comma-separated and combined with AND, for example DatalabName:ml-*,DatalabType:sagemaker-notebook. Matching is case-insensitive; DatalabName also supports * as a wildcard against the whole value. Pairs without a colon are ignored, and a filter with no valid pairs returns everything. Only these listing fields can be filtered: - Identity: DatalabId, DatalabName, DatalabType, Description - State: DatalabStatus, AccessType - Audit: CreatedBy, CreationTime, LastModifiedBy, LastModifiedTime
action (str) – Omit to list datalabs. Set it to return the available instance types and their prices for notebook or studio datalabs instead.
_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
Success (HTTP 200)¶
Successful API response
Default listing
{
"Datalabs": [
{
"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"
}
],
"count": 1,
"total_count": 1,
"next_available": "no"
}
action=get_sagemaker_notebook_instance_pricing
{
"Instances": [
{
"Name": "ml.t3.medium",
"Price": "0.05"
}
],
"Currency": "USD",
"TimeUnit": "Hrs"
}
Errors¶
Documented error codes: IPV-1050.
HTTP 400
Invalid input
limit above the page cap
{
"Message": "IPV-1050 - Out of range for items per page, Limit is 1000"
}
HTTP 500
Something went wrong at backend
Request / response example
{
"Message": "An error occurred (ThrottlingException) when calling the DescribeNotebookInstance operation (reached max retries: 4): Rate exceeded"
}