# Alibaba Cloud Platform for Artificial Intelligence PAI - Data… API

> Alibaba Cloud Platform for Artificial Intelligence PAI - Data… API on Apizie: 46 endpoints (Diagnoses instance issues, Creates an automatic shutdown policy for a specified instance to automatically stop the Data Science…, Creates a DSW instance, Creates a scheduled stop task for an instance, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://apizie.tech/v1/cloud:aliyun-pai-dsw/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `cloud:aliyun-pai-dsw`
- Category: Cloud
- Status: byok
- Source: https://api.alibabacloud.com/product/pai-dsw
- Page: https://apizie.tech/api/cloud/aliyun-pai-dsw
- OpenAPI: https://apizie.tech/api/cloud/aliyun-pai-dsw/openapi.json

Alibaba Cloud OpenAPI for Platform for Artificial Intelligence PAI - Data Science Workshop (DSW) (pai-dsw, version 2022-01-01). Calls are signed with ACS3-HMAC-SHA256 using your AccessKey ID and secret.

## Endpoints

### Diagnoses instance issues
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-diagnosis` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| GmtFailureTime | string | no | The time when the issue occurred on the instance to be diagnosed |
| InstanceId | string | no | The instance ID |
| ProblemCategory | string | yes | The problem category. Valid values: InstanceStartFailed: The instance failed to start. InstanceRecovering: The instance is recovering |

### Creates an automatic shutdown policy for a specified instance to automatically stop the Data Science…
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-idle-instance-culler` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The ID of the instance for which you want to configure the automatic shutdown policy. For more information about how to obtain the… |
| CpuPercentThreshold | integer | no | The CPU utilization threshold, in percentage. Valid values: 1 to 100. If the CPU utilization is lower than this value, the instance is… |
| GpuPercentThreshold | integer | no | The GPU utilization threshold, in percentage. Valid values: 1 to 100. This parameter takes effect only if the instance is a… |
| MaxIdleTimeInMinutes | integer | no | The maximum idle time threshold, in minutes. If the idle duration exceeds this value, the DSW instance is automatically stopped |

### Creates a DSW instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| AccessRestrictionRules | object | no | The instance access restriction rules |
| Accessibility | string | no | The visibility of the instance |
| Affinity | object | no | The affinity configuration information |
| AssignNodeSpec | object | no | The node scheduling configuration |
| CloudDisks | array | no | The list of cloud disks |
| CredentialConfig | object | no | The credential configuration |
| Datasets | array | no | The list of datasets |
| DockerConfig | object | no | The Docker configuration of the instance |
| Driver | string | no | The NVIDIA driver configuration |
| DynamicMount | object | no | The dynamic mount configuration |
| EcsSpec | string | no | The ECS instance type of the instance. For information about how to obtain the ECS instance type, see… |
| EnvironmentVariables | object | no | The environment variables injected into the DSW instance. The environment variables passed here may override the system preset environment… |
| ImageAuth | string | no | The value after Base64 encoding of the account and password information for user private images. The password part is hidden |
| ImageId | string | no | The image ID. For information about how to obtain the image ID, see https://help.aliyun.com/document_detail/449118.html |
| ImageUrl | string | no | The image URL. For information about how to obtain the image URL, see https://help.aliyun.com/document_detail/449118.html |
| InstanceName | string | no | The instance name. Format requirements: The name can contain only letters, digits, and underscores (_). The name cannot exceed 27… |
| Labels | array | no | The custom labels |
| MigrationOptions | object | no | The instance migration options. This parameter is supported only for Lingjun instances with persistent storage enabled. Supported options:… |
| OversoldType | string | no | The type of off-peak resources. Valid values: ForceQuotaOverSold: Uses only off-peak resources. AcceptQuotaOverSold: Accepts off-peak… |
| Priority | integer | no | The priority. When allocating resources to instances, instances with a higher priority are allocated first. Valid values: 1 to 9. 1: The… |
| RequestedResource | object | no | The resource configuration |
| ResourceId | string | no | The resource group ID. Configure this parameter for subscription resources. For information about how to create a dedicated resource… |
| SpotSpec | object | no | The spot instance configuration |
| Tag | array | no | The list of tags |
| UserCommand | object | no | The custom execution command |
| UserId | string | no | The account ID of the instance owner. Alibaba Cloud accounts and Resource Access Management (RAM) users are supported |
| UserMetricsEndpoints | array | no | The UserMetricsEndpoints |
| UserVpc | object | no | The user VPC configuration |
| WorkspaceId | string | no | The workspace ID. For information about how to obtain the workspace ID, see https://help.aliyun.com/document_detail/449124.html |
| WorkspaceSource | string | no | The storage corresponding to the working directory. You can mount cloud disks or datasets in Datasets to the /mnt/workspace working… |

### Creates a scheduled stop task for an instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-instance-shutdown-timer` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. You can call https://help.aliyun.com/document_detail/470439.html to obtain the instance ID |
| DueTime | string | no | The scheduled stop time |
| RemainingTimeInMs | integer | no | The time duration before the instance is stopped. Unit: milliseconds |

### Creates an instance snapshot
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-instance-snapshot` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |
| ExcludePaths | array | no | The list of excluded file paths. This parameter is supported only for Elastic Container Instance (ECI) instances and is used to ignore… |
| ImageUrl | string | yes | The image URL. For information about how to obtain the image URL, see https://help.aliyun.com/document_detail/449118.html |
| Labels | array | no | The custom labels |
| Overwrite | string | no | Specifies whether to overwrite an existing image tag in the image repository |
| SnapshotDescription | string | no | The instance snapshot description |
| SnapshotName | string | yes | The instance snapshot name. Only lowercase letters, digits, and hyphens (-) are supported. This name is used for the custom image name… |

### Submits an asynchronous health check task for a specified Data Science Workshop (DSW) instance. You must…
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-sanity-check-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| CheckType | string | yes | The type of the check item. Valid values: SSH: triggers a health check for the SSH connectivity of the instance. CustomService: triggers a… |
| CheckArgs | object | no | The additional parameters required for the health check. Example: "ServiceName": "The service name of the custom service to check" |
| InstanceId | string | yes | The instance ID. For more information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/2411819.html |

### Creates a temporary file
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-temp-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Capacity | integer | no | The file upload capacity |
| InstanceId | string | no | The ID of the DSW instance |
| Name | string | no | The name of the temporary file |
| Prefix | string | no | The file prefix |
| TaskId | string | no | The ID of the task to which the file belongs |

### Creates a temporary file task
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-temp-file-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | no | The instance ID |

### Deletes the idle shutdown policy for an instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-idle-instance-culler` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |

### Deletes a specific instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. You can call https://help.aliyun.com/document_detail/470439.html to obtain the instance ID |

### Delete tags from a Data Science Workshop (DSW) instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-instance-labels` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The ID of the DSW instance |
| LabelKeys | string | yes | The keys of the tags that you want to delete. Separate multiple tags with commas (,) |

### Deletes a scheduled stop task of an instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-instance-shutdown-timer` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. You can call https://help.aliyun.com/document_detail/470439.html to obtain the instance ID |

### Deletes an instance snapshot
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-instance-snapshot` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The ID of the instance. For more information, see https://help.aliyun.com/document_detail/470439.html |
| SnapshotId | string | yes | The ID of the instance snapshot. For more information, see https://help.aliyun.com/document_detail/470434.html |

### Deletes multiple instances
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-instances` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceIds | array | no | The list of instance IDs to be deleted |

### Deletes a temporary file
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-temp-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileId | string | yes | The ID of the temporary file |

### Deletes a temporary file task
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-temp-file-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileTaskId | string | yes | The ID of the temporary file task |

### Deletes one or more temporary file tasks
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/delete-temp-file-tasks` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileTaskIds | array | no | The IDs of the temporary file tasks |

### Queries the information about an auto stop policy for a specific idle instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-idle-instance-culler` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. You can call https://help.aliyun.com/document_detail/470439.html to obtain the instance ID |

### Queries the details of a DSW instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |
| Token | string | no | The sharing token information |
| Fields | string | no | The fields to return. If you specify this parameter, only the specified fields are returned. Separate multiple fields with commas |

### Retrieves the system events of a DSW instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-instance-events` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID |
| MaxEventsNum | integer | no | The maximum number of events to retrieve. Default value: 2000 |
| StartTime | string | no | The start time of the query |
| EndTime | string | no | The end time of the query |
| Token | string | no | The token used to share the URL |
| EventLevel | string | no | The event level. Valid values: Warning: Warning event. Normal: Normal event |
| Offset | integer | no | The pagination offset. Default value: 0 |
| Reverse | string | no | Specifies whether to sort the results in descending order. Default value: false |

### Queries the resource metrics of an instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-instance-metrics` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. You can call https://help.aliyun.com/document_detail/470439.html to obtain the instance ID |
| MetricType | string | yes | The metric type. Valid values: GpuCoreUsage: the GPU utilization. GpuMemoryUsage: the GPU memory utilization. CpuCoreUsage: the CPU… |
| StartTime | string | no | The beginning of the time range to query |
| EndTime | string | no | The end of the time range to query |
| TimeStep | string | no | The interval at which metrics are returned. Unit: minutes |

### Retrieves the details of a scheduled shutdown task for an instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-instance-shutdown-timer` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The ID of the instance. For more information, see https://help.aliyun.com/document_detail/470439.html |

### Retrieves the snapshot of a user instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-instance-snapshot` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |
| SnapshotId | string | yes | The instance snapshot ID. For information about how to obtain the instance snapshot ID, see… |

### Retrieves the lifecycle of an instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-lifecycle` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For more information about how to obtain an instance ID, see https://help.aliyun.com/document_detail/470439.html |
| SessionNumber | integer | no | A session is the period from when an instance is started until it fails or is stopped. sessionNumber specifies the ordinal number offset… |
| StartTime | string | no | The start time of the query |
| EndTime | string | no | The end time of the query |
| Limit | integer | no | The maximum number of sessions to return in the query |
| Order | string | no | The order in which to sort the results. Valid values: ASC: ascending order by time. DESC: descending order by time |
| Token | string | no | A token used for sharing URLs |

### Retrieves the metrics of an instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-metrics` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Namespace | string | no | The namespace in CloudMonitor where the metrics are stored |
| InstanceId | string | yes | The ID of the DSW instance |
| Dimensions | string | no | The request parameters |
| Length | string | no | The maximum number of entries to return per page. The value cannot exceed 1440 |
| EndTime | string | no | The end time. Default value: the current time |
| Period | string | no | The time interval |
| NextToken | string | no | The pagination token |
| MetricName | string | no | Required. The name of the monitoring metrics. For more information, see Metric names… |
| StartTime | string | no | The start time. Default value: 1 hour ago |
| Token | string | no | The token issued by the GetToken operation to access the monitoring data of the corresponding instance |

### A resource group provides a set of dedicated machine resources for Platform for AI (PAI). These resources…
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-resource-group-statistics` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| WorkspaceIds | string | yes | The IDs of workspaces. Separate multiple IDs with a comma (,). For more information about how to obtain a workspace ID, see… |
| ResourceId | string | yes | The ID of the resource group (machine group) |
| StartTime | string | yes | The start of the time range for the statistics |
| EndTime | string | yes | The end of the time range for the statistics |

### Queries the status and results of a health check task. You can provide the task ID and check type to…
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-sanity-check-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| CheckType | string | yes | The type of check item. Valid values: SSH: Triggers an SSH health check for the instance |
| TaskId | string | yes | The ID of the health check task |
| Verbose | string | no | Specifies whether to return the details of the health check |

### Gets the details of a temporary file
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-temp-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileId | string | yes | The temporary file ID |

### Retrieves the details of a temporary file task
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-temp-file-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileTaskId | string | yes | The temporary file task ID |

### Retrieves the temporary authentication information for a specified DSW instance
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-token` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |
| ExpireTime | integer | no | The expiration time, in seconds |
| Type | string | no | The type of the issued token. Valid values: Access: used to access the DSW instance and perform operations. This type grants operation… |
| Audience | string | no | The intended holder (consumer) of the token. If you access the DSW page through a self-built web application, set Audience to ThirdParty |

### Retrieves a user-defined command
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-user-command` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| UserCommandId | string | yes | The ID of the user-defined command. You can get this ID by calling API operations such as GetInstance |
| InstanceId | string | no | The ID of the Data Science Workshop (DSW) instance. Specify this parameter to find the user command that is attached to the instance. This… |
| Token | string | no | The token used to access the user command. The token is issued by the GetToken API operation |

### You can call GetUserConfig to query user information
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/get-user-config` (byok)

### Retrieves a list of ECS instance types
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/list-ecs-specs` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| AcceleratorType | string | yes | The accelerator type. Valid values: CPU: No computing acceleration. Only CPUs are used for computing. GPU: Uses GPUs for computing… |
| PageNumber | integer | no | The page number of the ECS instance type list. Pages start from 1. Default value: 1 |
| PageSize | integer | no | The number of ECS instance types to return on each page in a paged query |
| SortBy | string | no | [Deprecated] This field is deprecated. Do not use it |
| Order | string | no | The sort order. Valid values: ASC: Ascending order. DESC: Descending order |
| ResourceType | string | no | The instance resource type |

### Queries the list of instance snapshots
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/list-instance-snapshot` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |
| PageNumber | integer | no | The page number of the instance snapshot list. Pages start from 1. Default value: 1 |
| PageSize | integer | no | The paging settings for the number of instance snapshots to return on each page in a paged query. Default value: 10 |
| SortBy | string | no | The field used to sort the results. Set the value to gmtCreae |
| Order | string | no | The sort order. Valid values: Desc: Descending order. Asc: Ascending order |

### Retrieves statistics information for instances
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/list-instance-statistics` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| WorkspaceIds | string | yes | The IDs of the workspaces. Separate multiple IDs with commas (,). For more information, see… |

### Queries a list of DSW instances
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/list-instances` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| WorkspaceId | string | no | Filters instances by workspace ID. For information about how to obtain the workspace ID, see… |
| InstanceName | string | no | The name of the instance. If you specify this parameter, the system searches for instances whose names match the input value. The search… |
| ResourceId | string | no | Filters instances by resource quota ID. For information about how to obtain the resource quota ID, see ListQuotas… |
| Status | string | no | Filters instances by instance status. The default value is empty. In this case, instances of all statuses are queried |
| PaymentType | string | no | Filters instances by billing method. If this parameter is left empty, instances of all billing methods are queried |
| Accessibility | string | no | Filters instances by workspace visibility. If this parameter is left empty, instances with all visibility settings are queried. Valid… |
| AcceleratorType | string | no | Filters instances by accelerator type. If this parameter is left empty, instances of all accelerator types are queried. Valid values: CPU:… |
| PageNumber | integer | no | The page number for the paged query of instances. The paging starts from 1. Default value: 1 |
| PageSize | integer | no | The paging size for a paged query specifies the number of instances to return per page. Default value: 10 |
| SortBy | string | no | The field by which to sort the instances |
| Order | string | no | The sort order. Valid values: DESC and ASC. Default value: DESC |
| InstanceId | string | no | Filters instances by instance ID. For information about how to obtain the instance ID, see… |
| Labels | string | no | Filters instances by label. You can specify up to 4 labels. If multiple labels are specified, they are combined by using the AND operator… |
| CreateUserId | string | no | Filters instances by the user ID of the creator |
| GpuType | string | no | Filters instances by GPU model |
| MinCpu | string | no | The minimum number of CPUs. Unit: 0.001 CPU. 1000 indicates 1 CPU. If you specify this parameter, instances with a CPU count greater than… |
| MaxCpu | string | no | The maximum number of CPUs. Unit: 0.001 CPU. 1000 indicates 1 CPU. If you specify this parameter, instances with a CPU count less than the… |
| MinGpu | string | no | The minimum number of GPUs. Unit: 0.001 GPU. 1000 indicates 1 GPU. If you specify this parameter, instances with a GPU count greater than… |
| MaxGpu | string | no | The maximum number of GPUs. Unit: 0.001 GPU. 1000 indicates 1 GPU. If you specify this parameter, instances with a GPU count less than the… |
| MinMemory | string | no | The minimum memory size. Unit: GB. If you specify this parameter, instances with a memory size greater than the input value are returned |
| MaxMemory | string | no | The maximum memory size. Unit: GB. If you specify this parameter, instances with a memory size less than the input value are returned |
| MinGpuMemory | string | no | The minimum GPU memory size per GPU. Unit: GB. If you specify this parameter, instances with a GPU memory size greater than the input… |
| MaxGpuMemory | string | no | The maximum GPU memory size per GPU. Unit: GB. If you specify this parameter, instances with a GPU memory size less than the input value… |
| ImageName | string | no | The name of the image. If you specify this parameter, instances are filtered by the specified image name |
| Tag | string | no | The list of tags. You can specify up to 4 tags. If multiple tags are specified, they are combined by using the AND operator (JSON-encoded) |
| OversoldInfo | string | no | The actual off-peak resource type used by the instance. If you specify this parameter, instances are filtered by the actual off-peak… |
| OversoldType | string | no | The off-peak resource type specified by the user. If you specify this parameter, instances are filtered by the off-peak resource type.… |
| CreateTimeAfter | string | no | Filters instances whose creation time is later than or equal to the specified time |
| CreateTimeBefore | string | no | Filters instances whose creation time is earlier than or equal to the specified time |

### List temporary files
`GET https://apizie.tech/v1/cloud:aliyun-pai-dsw/list-temp-files` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | no | The name of the temporary file |
| Prefix | string | no | Filters the results to include only files whose names start with the specified prefix |
| Delimiter | string | no | A character used to group file names. All file names that share the same string between the prefix and the first occurrence of the… |
| InstanceId | string | no | The instance ID |
| PageNumber | integer | no | The page number |
| PageSize | integer | no | The number of entries per page |
| SortBy | string | no | The field to use for sorting |
| Order | string | no | The sort order |

### Retrieves the auto shutdown policies for specified running instances
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/query-auto-shutdown-policies` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceIds | array | no | The IDs of up to 100 DSW instances within the same workspace. This parameter is required for requests that are not made from a share page |
| Token | string | no | The sharing token |
| InstanceId | string | no | The instance ID for the share page |

### Starts a DSW instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/start-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The ID of the instance. For more information, see https://help.aliyun.com/document_detail/470439.html |

### Stops a DSW instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/stop-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The ID of the instance. For information about how to obtain an instance ID, see https://help.aliyun.com/document_detail/470439.html |
| SaveImage | string | no | Specifies whether to save the environment before the instance is stopped. true: The environment is saved before the instance is stopped.… |

### Stops a batch of instances
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/stop-instances` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceIds | array | yes | The list of instance IDs to stop |

### Updates the attributes of a DSW instance
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/update-instance` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| InstanceId | string | yes | The instance ID. For more information about how to obtain the instance ID, see https://help.aliyun.com/document_detail/470439.html |
| Accessibility | string | no | The visibility of the instance |
| Affinity | object | no | The affinity configuration |
| AssignNodeSpec | object | no | The node scheduling configuration |
| CloudDisks | array | no | The list of cloud disks |
| CredentialConfig | object | no | The credential configuration |
| Datasets | array | no | The list of datasets |
| DisassociateAssignNode | string | no | Specifies whether to disable specified node scheduling |
| DisassociateCredential | string | no | Specifies whether to delete the credential injection information |
| DisassociateDatasets | string | no | Specifies whether to delete the associated datasets. Valid values: true: Delete the associated datasets. false: Retain the associated… |
| DisassociateDriver | string | no | Specifies whether to delete the NVIDIA driver configuration |
| DisassociateEnvironmentVariables | string | no | Specifies whether to delete the environment variables passed by the user |
| DisassociateForwardInfos | string | no | Specifies whether to delete the associated port forwarding information |
| DisassociateMigrationOptions | string | no | Specifies whether to delete the migration options |
| DisassociateSpot | string | no | Specifies whether to disable the spot configuration |
| DisassociateUserCommand | string | no | Specifies whether to delete the custom commands specified by the user |
| DisassociateVpc | string | no | Specifies whether to delete the associated user VPC |
| Driver | string | no | The NVIDIA driver configuration |
| DynamicMount | object | no | The dynamic mount configuration |
| EcsSpec | string | no | The ECS instance type of the instance. For more information about how to obtain the ECS instance type, see… |
| EnvironmentVariables | object | no | The environment variables injected into the DSW instance. The environment variables passed here may override the system preset environment… |
| ImageAuth | string | no | The Base64 encoding of the username and password for the user's private image. The password part is hidden |
| ImageId | string | no | The image ID. For more information about how to obtain the image ID, see https://help.aliyun.com/document_detail/449118.html |
| ImageUrl | string | no | The image URL. For more information about how to obtain the image URL, see https://help.aliyun.com/document_detail/449118.html |
| InstanceName | string | no | The instance name. Format requirements: The name can contain only letters, digits, and underscores (_). The name cannot exceed 27… |
| MigrationOptions | object | no | The instance migration options. This parameter is supported only for Lingjun instances with persistent storage enabled. Supported options:… |
| OversoldType | string | no | The type of oversold resources. Valid values: ForceQuotaOverSold: Uses only oversold resources. AcceptQuotaOverSold: Accepts oversold… |
| Priority | integer | no | The priority. When allocating resources to instances, instances with a higher priority are allocated first. Valid values: 1 to 9. 1: The… |
| RequestedResource | object | no | The resource configuration |
| SpotSpec | object | no | The spot instance configuration |
| StartInstance | string | no | The StartInstance |
| UserCommand | object | no | The custom execution command |
| UserId | string | no | The ID of the instance user |
| UserMetricsEndpoints | array | no | The UserMetricsEndpoints |
| UserVpc | object | no | The user VPC configuration |
| WorkspaceSource | string | no | The storage for the working directory. You can mount cloud disks or datasets from Datasets to the /mnt/working directory at the same time.… |

### Updates the tags of a Data Science Workshop (DSW) instance. If the tags do not exist, the system adds tags
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/update-instance-labels` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Labels | array | yes | The tags that you want to update |
| InstanceId | string | yes | The ID of the DSW instance |

### Updates the properties of a temporary file
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/update-temp-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileId | string | yes | The temporary file ID |
| GmtExpiredTime | string | no | The expiration time for the temporary file |
| Status | string | no | The status of the temporary file |

### Updates a temporary file task
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/update-temp-file-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TempFileTaskId | string | yes | The ID of the temporary file task |
| GmtExpiredTime | string | no | The expiration time of the temporary file |

### version
`POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/version` (byok)

## Example
```
curl "https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-diagnosis" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Alibaba Cloud Platform for Artificial Intelligence PAI - Data… API?
Create a free Apizie key, then send POST https://apizie.tech/v1/cloud:aliyun-pai-dsw/create-diagnosis with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Alibaba Cloud Platform for Artificial Intelligence PAI - Data… API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Alibaba Cloud Platform for Artificial Intelligence PAI - Data… itself also needs your own key from aliyuncs.com.

### Can AI agents use the Alibaba Cloud Platform for Artificial Intelligence PAI - Data… API?
Yes. Add the Apizie MCP server (https://apizie.tech/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key cloud:aliyun-pai-dsw.

### What is the status of the Alibaba Cloud Platform for Artificial Intelligence PAI - Data… API?
Needs your own provider key (bring your own key)
