Querying Job Lists
Function
This API is used to query the job lists.
You can query the following types of jobs: combined jobs, retrieval jobs, filtering jobs, feature engineering jobs, ranking jobs, nearline jobs, and effect evaluation jobs.
URI
GET/v1/{project_id}/jobs?type={type}¤t-page={current-page}&page-size={page-size}&start-time={start-time}&end-time={end-time}
Table 1 describes the URI parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID. |
| type | Yes | String | Type of training jobs that can be queried. The options are retrieval, filter, etl, ranking, nearline, standard, and evaluation. |
| current-page | Yes | Long | Current page |
| page-size | Yes | Long | Number of pages |
| start-time | No | String | Start time |
| end-time | No | String | End time |
| job-name | No | String | Job name |
| job-status | No | String | Job status |
| sortby | No | String | Sorting field |
| order | No | String | Sorting mode. The options are asc and desc. |
| workspace_id | No | String | Workspace ID. The default value is 0. |
Request
N/A
Response
Table 2 describes the response parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_success | Yes | Boolean | Whether the request is successful |
| jobs | Yes | List | Returned job information. For details, see Table 3. |
| total_items | Yes | Integer | Total number of jobs |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| job_id | Yes | String | Training job ID |
| job_name | Yes | String | Training job name. The value can contain a maximum of 20 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed. |
| job_description | No | String | Training job description. The value can contain a maximum of 256 characters. |
| project_id | Yes | String | Project ID, which is used for resource isolation. |
| user_id | Yes | String | User ID |
| operating_time | Yes | Long | Operation time |
| request_info | Yes | Object | Request body |
| response_info | Yes | Object | Response body |
| job_status | Yes | String | Job status |
| resource | Yes | String | Resource. Currently, DLI is supported. |
| is_use | Yes | int | Used or not:
|
| type | Yes | String | Training job type |
Example
- Example of a successful response
{ "jobs": [ { "job_id": "5d041e988e7442eb98c4b14cb3fbdc62", "job_name": "evaluate-cqian", "project_id": "b09d59c4e8724078a5e8efa65049e78f", "user_id": "03cfcb78b4b34ba79c9d5aa43dcfb49a", "operating_time": 1550563630482, "request_info": { "job_name": "evaluate-cqian", "job_description": "", "user_behaviors": { "table_type_id": "GENERAL_FORMAT", "data_format": "json", "data_source_url": "<Path for storing the data sources>" }, "indicators": [ { "indicator_name": "clickPV", "indicator_params": {} }, { "indicator_name": "consumePV", "indicator_params": {} }, { "indicator_name": "avgBhvCount", "indicator_params": { "behavior_type": "consume" } }, { "indicator_name": "avgBhvDuration", "indicator_params": {} }, { "indicator_name": "userAmount", "indicator_params": {} }, { "indicator_name": "activeUserAmount", "indicator_params": { "behavior_type": "consume", "threshold": 5 } } ], "start_time": 1512983142000, "end_time": 1526457087000, "interval": 30, "result_path": "<Path for storing the output data>", "offline_platform": { "platform": "DLI", "platform_parameter": { "cluster_name": "res_cluster" }, "config_load_path": "<Path for storing the configuration sources>", "computing_resource": "" } }, "response_info": { "is_success": true, "job_id": "5d041e988e7442eb98c4b14cb3fbdc62" }, "job_status": "SUCCEEDED", "resource": "DLI", "is_use": 0, "type": "evaluation" } ], "is_success": true, "total_items": 191 } - Example of a failed response
{ "is_success": false, "error_code": "res.3106", "error_msg": "The start time or end time is error." }
Status Code
For details about status codes, see Status Codes.
Last Article: Terminating Operators
Next Article: Querying the Job Details
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.