Queries the information about a task.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Id | long | Yes | The task ID. | 1234 |
ProjectEnv | string | No | The environment of the workspace. Valid values:
| Prod |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"Task": {
"Name": "",
"Description": "test",
"WorkflowId": 1234,
"InstanceMode": "T+1",
"Type": "ODPS_SQL",
"BaselineId": 1234,
"Priority": 1,
"Timeout": 3600,
"RerunMode": "AllAllowed",
"RerunTimes": 3,
"RerunInterval": 60,
"Script": {
"Content": "echo \"helloWorld\"",
"Parameters": "para1=$bizdate"
},
"Trigger": {
"Type": "Scheduler",
"Recurrence": "Normal",
"Cron": "00 00 00 * * ?",
"StartTime": "1970-01-01 00:00:00",
"EndTime": "9999-01-01 00:00:00"
},
"RuntimeResource": {
"ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
"Image": "i-xxxxxx\n",
"Cu": "0.25"
},
"DataSource": {
"Name": "mysql_test"
},
"Inputs": {
"Variables": [
{
"Name": "key1",
"Type": "Constant\n",
"Value": "Value1\n"
}
]
},
"Outputs": {
"TaskOutputs": [
{
"Output": "pre.odps_sql_demo_0"
}
],
"Variables": [
{
"Name": "key1",
"Type": "Constant\n",
"Value": "value1"
}
]
},
"Dependencies": [
{
"Type": "Normal",
"UpstreamOutput": "pre.odps_sql_demo_0",
"UpstreamTaskId": "1234"
}
],
"SubTasks": {
"SubTasks": [
{
"Name": "",
"Description": "test",
"WorkflowId": 1234,
"Type": "ODPS_SQL\n",
"BaselineId": 0,
"Priority": 1,
"Timeout": 3600,
"RerunMode": "AllAllowed",
"RerunTimes": 3,
"RerunInterval": 180,
"Trigger": {
"Type": "Scheduler",
"Recurrence": "Normal\n",
"Cron": "00 00 00 * * ?\n",
"StartTime": "1970-01-01 00:00:00\n",
"EndTime": "9999-01-01 00:00:00\n"
},
"RuntimeResource": {
"ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
"Image": "i-xxxxxx",
"Cu": "0.25"
},
"DataSource": {
"Name": "mysql_test\n"
},
"Id": 1234,
"TenantId": 1,
"ProjectId": 100,
"ProjectEnv": "Prod",
"Owner": "1000\n",
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000\n",
"ModifyUser": "1000\n"
}
],
"Type": "Combined"
},
"Tags": [
{
"Key": "key1",
"Value": "value1"
}
],
"Id": 1234,
"TenantId": 1,
"ProjectId": 100,
"ProjectEnv": "Prod",
"Owner": "1000",
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000\n",
"ModifyUser": "1000"
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-20 | The response structure of the API has changed | View Change Details |