Custom Applications
- class datarobot.CustomApplication
A DataRobot Custom Application with detailed resource information.
This class provides access to the customApplications/ API endpoint which contains more detailed information than the basic applications/ endpoint, including resource allocation, status, and configuration details.
- Variables:
id (
str
) – The ID of the custom application.name (
str
) – The name of the custom application.env_version_id (
str
) – The environment version ID used by the application.custom_application_source_id (
str
) – The ID of the custom application source.custom_application_source_version_id (
str
) – The version ID of the custom application source.lrs_id (
str
) – The LRS (Lifecycle Resource Service) ID.status (
str
) – Current status of the application (e.g., ‘running’, ‘stopped’).user_id (
str
) – The ID of the user who created the application.org_id (
str
) – The organization ID.created_by (
str
) – Email of the user who created the application.creator_first_name (
str
) – First name of the creator.creator_last_name (
str
) – Last name of the creator.creator_userhash (
str
) – Userhash of the creator.permissions (
List[str]
) – List of permissions for the current user.created_at (
str
) – Timestamp when the application was created.updated_at (
str
) – Timestamp when the application was last updated.expires_at (
Optional[str]
) – Expiration timestamp, if any.application_url (
str
) – URL to access the application.external_access_enabled (
bool
) – Whether external access is enabled.allow_auto_stopping (
bool
) – Whether the application can be automatically stopped.external_access_recipients (
List[str]
) – List of external access recipients.resources (
Optional[Dict[str
,Any]]
) – Resource allocation details including CPU, memory, and replicas. May be None if not allocated.required_key_scope_level (
Optional[str]
) – Required key scope level, if any.
- classmethod list(offset=None, limit=None)
Retrieve a list of custom applications.
- Parameters:
offset (
Optional[int]
) – Optional. Retrieve applications in a list after this number.limit (
Optional[int]
) – Optional. Retrieve only this number of applications.
- Returns:
applications – The requested list of custom applications.
- Return type:
List[CustomApplication]
- classmethod get(application_id)
Retrieve a single custom application with full details including resources.
- Parameters:
application_id (
str
) – The ID of the custom application to retrieve.- Returns:
application – The requested custom application with resource details.
- Return type:
- get_resources()
Get resource allocation details for this custom application.
- Returns:
resources – Resource allocation including CPU, memory, replicas, and other settings. Returns None if no resources are allocated.
- Return type:
Optional[Dict[str
,Any]]
- get_resource_summary()
Get a human-readable summary of resource allocation.
- Returns:
summary – A summary of resource allocation with readable units. Returns None if no resources are allocated.
- Return type:
Optional[Dict[str
,Any]]
- property is_running: bool
Check if the custom application is currently running.
- Returns:
True if the application status is ‘running’, False otherwise.
- Return type:
bool
- get_details()
Get comprehensive details about this custom application.
- Returns:
details – Comprehensive application details including metadata and resources.
- Return type:
Dict[str
,Any]
- classmethod get_by_name(name)
Find a custom application by name.
- Parameters:
name (
str
) – The name of the custom application to find.- Returns:
application – The custom application if found, None otherwise.
- Return type:
Optional[CustomApplication]
- delete(hard_delete=False)
Delete this custom application.
- Parameters:
hard_delete (
bool
, optional) – If True, permanently delete the application and all its data. If False (default), soft delete the application (can be recovered).- Return type:
None
Examples
from datarobot import CustomApplication app = CustomApplication.get("app_id") app.delete() # Soft delete app.delete(hard_delete=True) # Permanent delete
- get_logs()
Retrieve logs and build information for this custom application.
- Returns:
logs_info – Dictionary containing: - logs: List[str] - Application runtime logs (up to 1000 entries) - build_log: str - Build log of the custom application (optional) - build_status: str - Build status of the custom application (optional) - build_error: str - Build error message if build failed (optional)
- Return type:
Dict[str
,Any]
Examples
from datarobot import CustomApplication app = CustomApplication.get("app_id") logs_info = app.get_logs() # Print runtime logs for log_line in logs_info['logs']: print(log_line) # Check build status if 'build_status' in logs_info: print(f"Build status: {logs_info['build_status']}") # Check for build errors if 'build_error' in logs_info: print(f"Build error: {logs_info['build_error']}")