All Products
Search
Document Center

Platform For AI:API overview

Last Updated:Nov 07, 2025

API standard and pre-built SDKs in multi-language

The OpenAPI specification of this product (pai-dsw/2022-01-01) follows the ROA standard. Alibaba Cloud provides pre-built SDKs for popular programming languages to abstract low-level complexities such as request signing. This enables developers to call APIs using language-specific syntax without dealing with HTTP details directly.

Custom signature

If your specific needs, such as a customized signature, are not supported by the SDK, manually sign requests using the signature mechanism. Note that manual signing requires significant effort (usually about 5 business days). For support, join our DingTalk group (ID: 147535001692).

Before you begin

An Alibaba Cloud account has full administrative privileges. A compromised AccessKey pair exposes all associated resources to unauthorized access, posing a significant security risk. Create a Resource Access Management (RAM) user with API-only access and use RAM policies to apply the principle of least privilege (PoLP). Alibaba Cloud accounts are only used when explicitly required.

To call APIs securely, configure the following:

Examples

API

Title

Description

CreateInstance CreateInstance Creates a DSW instance.
DeleteInstance DeleteInstance Deletes a specific instance.
UpdateInstance UpdateInstance Updates the properties of a DSW instance.
StartInstance StartInstance Starts a DSW instance.
StopInstance StopInstance Stops a DSW instance.
GetInstance GetInstance Retrieves the details of a DSW instance.
ListInstances ListInstances Queries a list of Distribution Switch (DSW) instances.
GetInstanceEvents GetInstanceEvents Queries a list of system events for a Data Science Workshop (DSW) instance.
UpdateInstanceLabels UpdateInstanceLabels Updates the tags of a Data Science Workshop (DSW) instance. If the tags do not exist, the system adds tags.
DeleteInstanceLabels DeleteInstanceLabels Delete tags from a Data Science Workshop (DSW) instance.
DeleteInstances DeleteInstances Deletes a batch of instances.
StopInstances StopInstances Stops a batch of instances.

Life Cycle

API

Title

Description

GetLifecycle GetLifecycle Obtains the lifecycle of an instance

Resource Monitoring

API

Title

Description

GetInstanceMetrics GetInstanceMetrics Queries the resource metrics of an instance.

Instance Snapshot

API

Title

Description

CreateInstanceSnapshot CreateInstanceSnapshot Creates an instance snapshot.
DeleteInstanceSnapshot DeleteInstanceSnapshot Deletes an instance snapshot.
GetInstanceSnapshot GetInstanceSnapshot Call the GetInstanceSnapshot operation to retrieve an instance snapshot.
ListInstanceSnapshot ListInstanceSnapshot Lists instance snapshots.

Statistics

API

Title

Description

GetResourceGroupStatistics GetResourceGroupStatistics A resource group is a set of dedicated machine resources for PAI. Your PAI computing tasks and Data Science Workshop (DSW) instances run on these dedicated resources. This operation retrieves statistics about the current and historical statuses of DSW instances in a specified resource group, such as succeeded, failed, and stopped. These statistics help you understand the task history and use your resources more efficiently.
ListInstanceStatistics ListInstanceStatistics Retrieves statistics information about instances.

Instance timing automatic shutdown

API

Title

Description

CreateInstanceShutdownTimer CreateInstanceShutdownTimer Creates a scheduled stop task for an instance.
DeleteInstanceShutdownTimer DeleteInstanceShutdownTimer Deletes a scheduled stop task of an instance.
GetInstanceShutdownTimer GetInstanceShutdownTimer Retrieves the details of a scheduled shutdown task for an instance.

Automatic shutdown of idle instances

API

Title

Description

CreateIdleInstanceCuller CreateIdleInstanceCuller Creates an automatic stop policy for a specific Data Science Workshop (DSW) instance. When the conditions are met, the instance is automatically stopped. You can create only one automatic stop policy for an idle DSW instance. If the specific instance has an automatic stop policy, call DeleteIdleInstanceCuller to delete it first.
DeleteIdleInstanceCuller DeleteIdleInstanceCuller Deletes the automatic stop policy of an instance.
GetIdleInstanceCuller GetIdleInstanceCuller Queries the information about an auto stop policy for a specific idle instance.

ECS specifications

API

Title

Description

ListEcsSpecs ListEcsSpecs Queries a list of specifications of ECS instances.

User Configuration

API

Title

Description

GetUserConfig GetUserConfig You can call GetUserConfig to query user information.

Other

API

Title

Description

CreateDiagnosis CreateDiagnosis Diagnoses problems for an instance.
GetToken GetToken Obtains the temporary authentication information of a DSW instance.
GetMetrics GetMetrics Retrieves the metrics for an instance.
GetUserCommand GetUserCommand Retrieves a user-defined command.
ListSystemLogs ListSystemLogs Retrieves system logs. This API is deprecated and should not be used.