Queries a list of jobs and supports pagination, sorting, and filtering by conditions.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
paidlc:ListJobs | get | *All Resources * |
| none |
Request syntax
GET /api/v1/jobs HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DisplayName | string | No | The job name. Fuzzy query is supported. The name is case-insensitive. Wildcards are not supported. For example, if you enter test, test-job1, job-test, job-test2, or job-test can be matched, and job-t1 cannot be matched. The default value null indicates any job name. | tf-mnist-test |
JobType | string | No | The job type. You can query any job type. The default value null indicates any job type. Valid values:
| TFJob |
Status | string | No | The job status. Valid values:
| Running |
StartTime | string | No | The start time of the query. Use the job creation time to filter data. The default value is the current time minus seven days. In other words, if you do not configure the StartTime and EndTime parameters, the system queries the job list in the last seven days. | 2020-11-08T16:00:00Z |
EndTime | string | No | The end time of the query. Use the job creation time to filter data. The default value is the current time. | 2020-11-09T14:45:00Z |
PageNumber | integer | No | The number of the page to return for the current query. Minimum value: 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. | 50 |
SortBy | string | No | The sorting field in the returned job list. Valid values:
| GmtCreateTime |
Order | string | No | The sorting order. Valid values:
| desc |
ShowOwn | boolean | No | Specifies whether to query only the jobs submitted by the current user. | true |
WorkspaceId | string | No | The workspace ID. | 1**** |
ResourceId | string | No | The resource group ID. For information about how to obtain the ID of a dedicated resource group, see Manage resource quota. | r***** |
BusinessUserId | string | No | The ID of the user associated with the job. | 16**** |
Caller | string | No | The caller. | local |
Tags | object | No | The tags. | |
string | No | The tag. | recommandation | |
PipelineId | string | No | The specific pipeline ID used to filter jobs. | flow-******* |
FromAllWorkspaces | boolean | No | Specifies whether to query a list of jobs across workspaces. This parameter must be used together with | false |
JobId | string | No | The job ID. Fuzzy query is supported. The name is case-insensitive. Wildcards are not supported. The default value null indicates any job ID. | dlc******** |
UserIdForFilter | string | No | The user ID used to filter jobs. | 20************** |
Username | string | No | The username used to filter jobs. Fuzzy search is supported. Wildcards are not supported. The default value null indicates that jobs are not filtered by username. | test*** |
ResourceQuotaName | string | No | The resource quota name used to filter jobs. Fuzzy search is supported. Wildcards are not supported. The default value null indicates that jobs are not filtered by resource quota name. | quota*** |
Accessibility | string | No | The job visibility. Valid values:
| PRIVATE |
OversoldInfo | string | No | The Idle resource information. Valid values:
| ForbiddenQuotaOverSold |
Response parameters
Examples
Sample success responses
JSON
format
{
"Jobs": [
{
"JobId": "dlc-20210126170216-mtl37ge7gkvdz",
"CredentialConfig": {
"EnableCredentialInject": true,
"AliyunEnvRoleKey": "",
"CredentialConfigItems": [
{
"Key": "",
"Type": "",
"Roles": [
{
"RoleArn": "",
"RoleType": "",
"AssumeRoleFor": "",
"Policy": "",
"AssumeUserInfo": {
"SecurityToken": "",
"AccessKeyId": "",
"Type": "",
"Id": ""
}
}
]
}
]
},
"JobType": "TFJob",
"DisplayName": "tf-mnist-test",
"UserVpc": "vpc-1",
"UserId": "123456789",
"Username": "pai-dlc-role",
"Status": "Stopped",
"WorkspaceId": "268",
"WorkspaceName": "dlc-workspace",
"ResourceId": "dlc-quota",
"ResourceLevel": "L0",
"ReasonCode": "JobStoppedByUser",
"ReasonMessage": "Job is stopped by user.",
"JobSpecs": [
{
"Type": "Worker",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/tensorflow-training:1.12.2PAI-cpu-py27-ubuntu16.04",
"ImageConfig": {
"DockerRegistry": "registry.cn-hangzhou.aliyuncs.com",
"Username": "",
"Password": "",
"Auth": ""
},
"PodCount": 1,
"EcsSpec": "ecs.c6.large",
"ExtraPodSpec": {
"InitContainers": [
{
"Name": "data-init",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/curl:v1.0.0",
"Command": [
"curl www.aliyun.com"
],
"Args": [
""
],
"WorkingDir": "/root",
"Env": [
{
"Name": "ENABLE_DEBUG",
"Value": "true"
}
],
"Resources": {
"Limits": {
"key": ""
},
"Requests": {
"key": ""
}
}
}
],
"PodAnnotations": {
"key": ""
},
"SideCarContainers": [
{
"Name": "data-init",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/curl:v1.0.0",
"Command": [
"curl www.aliyun.com"
],
"Args": [
""
],
"WorkingDir": "/root",
"Env": [
{
"Name": "ENABLE_DEBUG",
"Value": "true"
}
],
"Resources": {
"Limits": {
"key": ""
},
"Requests": {
"key": ""
}
}
}
],
"Lifecycle": {
"PreStop": {
"Exec": {
"Command": [
""
]
}
},
"PostStart": {
"Exec": {
"Command": [
""
]
}
}
},
"MainContainerSecurityContext": {
"RunAsUser": 1000,
"RunAsGroup": 1000,
"SeccompProfile": {
"Type": "Unconfined",
"LocalhostProfile": "my-profiles/profile-allow.json"
}
},
"SharedVolumeMountPaths": [
"/root/share/"
],
"PodLabels": {
"key": ""
}
},
"ResourceConfig": {
"CPU": "10",
"GPU": "3",
"Memory": "10Gi",
"SharedMemory": "5Gi",
"GPUType": "Tesla-V100-16G"
},
"UseSpotInstance": false,
"SpotSpec": {
"SpotStrategy": "",
"SpotDiscountLimit": 0,
"SpotPriceLimit": 0
},
"AssignNodeSpec": {
"EnableAssignNode": true,
"NodeNames": "lingjxxxxxxxx",
"AntiAffinityNodeNames": "lingjxxxxxxxx"
}
}
],
"UserCommand": "python /root/code/mnist.py",
"DataSources": [
{
"DataSourceId": "data-20210114104214-vf9lowjt3pso",
"MountPath": "/mnt/data"
}
],
"CodeSource": {
"CodeSourceId": "code-20210111103721-85qz78ia96lu",
"Branch": "master",
"Commit": "44da109b59f8596152987eaa8f3b2487bb72ea63",
"MountPath": "/mnt/data"
},
"ThirdpartyLibs": [
"numpy==1.16.1"
],
"NodeNames": [
"i-a"
],
"ThirdpartyLibDir": "/root/code/",
"Envs": {
"key": "ENABLE_DEBUG_MODE"
},
"SystemEnvs": {
"key": "ENABLE_DEBUG_MODE"
},
"GmtCreateTime": "2021-01-12T14:35:01Z",
"GmtSubmittedTime": "2021-01-12T14:35:01Z",
"GmtRunningTime": "2021-01-12T14:35:01Z",
"GmtSuccessedTime": "2021-01-12T14:35:01Z",
"GmtStoppedTime": "2021-01-12T14:35:01Z",
"GmtFailedTime": "2021-01-12T14:35:01Z",
"GmtFinishTime": "2021-01-12T15:36:08Z",
"GmtModifiedTime": "2021-01-12T15:36:08Z",
"Duration": 3602,
"JobMaxRunningTimeMinutes": 1,
"Settings": {
"BusinessUserId": "166924",
"Caller": "SilkFlow",
"Tags": {
"key": ""
},
"PipelineId": "pid-123456",
"EnableTideResource": true,
"EnableErrorMonitoringInAIMaster": false,
"ErrorMonitoringArgs": "--enable-log-hang-detection true",
"EnableRDMA": true,
"EnableOssAppend": true,
"OversoldType": "AcceptQuotaOverSold",
"AdvancedSettings": {
"test": "test",
"test2": 1
},
"Driver": "535.54.03",
"EnableSanityCheck": true,
"SanityCheckArgs": "--sanity-check-timing=AfterJobFaultTolerant --sanity-check-timeout-ops=MarkJobFai",
"JobReservedMinutes": 30,
"JobReservedPolicy": "Always",
"EnableCPUAffinity": true,
"DisableEcsStockCheck": false
},
"EnabledDebugger": false,
"IsDeleted": false,
"EnablePreemptibleJob": false,
"ResourceName": "my_resource_group",
"WorkingDir": "/mnt/data",
"UserScript": "ls ",
"RestartTimes": "1",
"RequestCPU": 1,
"RequestMemory": "1Gi",
"ResourceQuotaName": "test",
"RequestGPU": "1",
"NodeCount": "1",
"Priority": 1,
"SubStatus": "Restarting",
"UseOversoldResource": false,
"ResourceType": "ECS",
"Accessibility": "PUBLIC",
"ClusterId": "",
"TenantId": "",
"StatusHistory": [
{
"Status": "",
"StartTime": "",
"EndTime": "",
"ReasonCode": "",
"ReasonMessage": ""
}
],
"ElasticSpec": {
"EnableElasticTraining": true,
"MinParallelism": 1,
"MaxParallelism": 8,
"AIMasterType": "",
"AIMasterDockerImage": "",
"EnablePsJobElasticWorker": true,
"EnableAIMaster": true,
"EnablePsResourceEstimate": true,
"EnablePsJobElasticPS": true,
"PSMinParallelism": 4,
"PSMaxParallelism": 10,
"ElasticStrategy": "",
"EnableEDP": true,
"EDPMaxParallelism": 16,
"EDPMinParallelism": 8
},
"Pods": [
{
"Status": "Stopped",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [
{
"Status": "Stopped",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [
{
"Status": "Stopped",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [],
"Type": "Worker",
"GmtStartTime": "2021-01-12T14:36:05Z",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"NodeName": "",
"Ip": "10.0.1.2",
"PodId": "dlc-20210126170216-mtl37ge7gkvdz-worker-0",
"SubStatus": "",
"GmtCreateTime": "2021-01-12T14:36:01Z"
}
],
"Type": "Worker",
"GmtStartTime": "2021-01-12T14:36:05Z",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"NodeName": "",
"Ip": "10.0.1.2",
"PodId": "dlc-20210126170216-mtl37ge7gkvdz-worker-0",
"SubStatus": "",
"GmtCreateTime": "2021-01-12T14:36:01Z"
}
],
"Type": "Worker",
"GmtStartTime": "2021-01-12T14:36:05Z",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"NodeName": "",
"Ip": "10.0.1.2",
"PodId": "dlc-20210126170216-mtl37ge7gkvdz-worker-0",
"SubStatus": "",
"GmtCreateTime": "2021-01-12T14:36:01Z"
}
]
}
],
"TotalCount": 2,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2025-01-09 | The request parameters of the API has changed | View Change Details |
2024-11-21 | The request parameters of the API has changed | View Change Details |
2024-04-09 | The request parameters of the API has changed | View Change Details |
2024-01-12 | The request parameters of the API has changed | View Change Details |
2023-12-14 | The request parameters of the API has changed | View Change Details |
2022-11-29 | The request parameters of the API has changed | View Change Details |