Description
Obtains description of a job. The response varies with the type of job description. Currently, two types of description are supported: DAG and App.
Request syntax
GET /jobs/{Id}?description
Attribute description
| Attribute | Type | Required | Description |
|---|---|---|---|
| Id | string | Yes | ID of a job. |
Response
Success
The 200 status code and the following job resource information are returned:
Example of DAG job
{"Id": "job-0000000058184218000008150000000D","Name": "testJob","Description": "BatchCompute demo job","JobFailOnInstanceFail": true,"Priority": 1,"Type": "DAG","AutoRelease": false,"Notification": {"Topic": {"Name": "test-topic","Endpoint": "http://[UserId].mns.[Region].aliyuncs.com/","Events": ["OnJobWaiting","OnJobRunning","OnJobStopped","OnJobFinished","OnJobFailed","OnTaskWaiting","OnTaskRunning","OnTaskStopped","OnTaskFinished","OnTaskFailed","OnInstanceWaiting","OnInstanceRunning","OnInstanceStopped","OnInstanceFinished","OnInstanceFailed","OnPriorityChange" // The preceding events are related to the job.]}},"DAG": {"Dependencies": {},"Tasks": {"taskA": {"AutoCluster": {"Configs": {"Disks": {"DataDisk": {"MountPoint": "/home/mydisk/","Size": 0,"Type": "ephemeral"},"SystemDisk": {"Size": 40,"Type": "ephemeral"}},"Mounts": {"Entries": [{"Destination": "/home/admin/mount-dest","Source": "oss://your-bucket/mount-source","WriteSupport": true}],"Locale": "GBK","Lock": false,"NAS": {"AccessGroup": ["group1","group2"],"FileSystem": ["filesystem1","filesystem2"]},"OSS": {"AccessKeyId": "","AccessKeySecret": "","AccessSecurityToken": ""}},"Networks": {"Classic": {"AllowIpAddress": [],"AllowIpAddressEgress": [],"AllowSecurityGroup": [],"AllowSecurityGroupEgress": []},"VPC": {"CidrBlock": "10.0.0.0/8",}}},"ECSImageId": "","ImageId": "img-ubuntu","InstanceType": "bcs.a2.large","ResourceType": "OnDemand","SpotStrategy": "SpotAsPriceGo","SpotPriceLimit": 0.0,"UserData": {}},"ClusterId": "","InputMapping": {"oss://bucket/tmp/": "/home/mount1/"},"InstanceCount": 1,"LogMapping": {},"MaxRetryCount": 0,"OutputMapping": {"/home/mount1": "oss://bucket/tmp/"},"Mounts": {"Entries": [{"Destination": "/home/admin/mount-dest","Source": "oss://your-bucket/mount-source","WriteSupport": true}],"Locale": "GBK","Lock": false,"NAS": {"AccessGroup": ["group1","group2"],"FileSystem": ["filesystem1","filesystem2"]},"OSS": {"AccessKeyId": "","AccessKeySecret": "","AccessSecurityToken": ""}},"Parameters": {"Command": {"CommandLine": "python worker.py","EnvVars": {},"PackagePath": "oss://bucket/tests/worker.tar.gz"},"InputMappingConfig": {"Locale": "GBK","Lock": false},"StderrRedirectPath": "oss://bucket/tests/logs/","StdoutRedirectPath": "oss://bucket/tests/logs/"},"Timeout": 172800,"WriteSupport": true}}}}
For specific parameter meanings, see the interface parameter description in CreateJob.
Example of App job
{"Name": "job_name","Description": "job description","Type": "App","App": {"AppName": "myapp","Inputs": {"inputFile": "oss://bucket/a"},"Outputs": {"outputFile": "oss://bucket/b"},"Config": {"ResourceType": "OnDemand","InstanceType": "ecs.s3.large","InstanceCount": 3,"MinDiskSize": 40,"DiskType": "cloud_efficiency","MaxRetryCount": 0,"Timeout": 100000,"ReserveOnFail": false},"Logging": {"StdoutPath": "oss://bucket/logging/","StderrPath": "oss://bucket/logging/"}}}
For specific parameter meanings, see the interface parameter description in CreateJob.
Error codes
| Error code | Error message | Status code | Syntax |
|---|---|---|---|
| InvalidResource.NotFound | Specified resource is not found. | 404 | The user requested resource does not exist. |