Calling APIs to Query the Job Details

Function

This API is used to query job details.

URI

GET/v1/{project_id}/jobs/{job_id}

Table 1 describes the URI parameters.

Table 1 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.

job_id

Yes

String

Job ID

Request

N/A

Response

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

Whether the request is successful

job

Yes

Object

Returned job information. For details, see Table 3.

Table 3 job parameters

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:

  • 1: Used
  • 0: Not used

type

Yes

String

Training job type

Example

  • Example of a successful response
    {
    "is_success": true,
    "job": {
    "job_id": "d7a72d46599e4d32bc79efaf8041b6e5",
    "job_name": "Recall-hotrec-0218-2",
    "project_id": "b09d59c4e8724078a5e8efa65049e78f",
    "user_id": "03cfcb78b4b34ba79c9d5aa43dcfb49a",
    "operating_time": 1550496579694,
    "request_info": {
    "job_name": "Recall-hotrec-0218-2",
    "job_description": "Retrieval-hotrec",
    "offline_platform": {
    "platform": "DLI",
    "platform_parameter": {
    "cluster_name": "res_two"
    },
    "config_load_path": "<Path for storing the configuration sources>",
    "computing_resource": ""
    },
    "storage": {
    "platform": "CloudTable",
    "platform_parameter": {
    "cluster_id": "4c017a11-4657-4192-95d4-31481842470c",
    "cluster_name": "cloudtable-49b6-res",
    "table_name": "hotrec-0218-2"
    }
    },
    "strategy": {
    "name": "Recommendation Based on Specific Behavior Popularity"
    "strategy_type": "retrieval",
    "algorithm_type": "SpecificBehavior",
    "parameter": {
    "data_source_config": {
    "retain_days": 30,
    "behavior_type": "consume",
    "start_time": 1483200000000,
    "end_time": 1548950400000
    },
    "algorithm_config": {},
    "candidate_set_config": {
    "is_recommended_by_category": false
    }
    },
    "candidate_set": [
    {
    "uuid": "8ad7f7eafc094a6a8a650bf232f9627b",
    "description": "Recommendation based on specific behavior popularity"
    }
    ],
    "output_data": [
    {
    "recType": "DIREC",
    "id": "do_hot_rec_offline_candidates",
    "name": "HOT_REC_OFFLINE_CANDIDATES",
    "dataType": "CANDIDATES_SET",
    "description": "Candidate sets generated by the recommendation algorithm of specific behavior popularity"
    }
    ],
    "input_data": [
    {
    "dataType": "USER_BEHAVIOR",
    "description": "User Operation Behavior Table",
    "required": true,
    "preconditions": []
    },
    {
    "dataType": "ITEM_META_CONF",
    "description": "Item attribute configuration list",
    "required": true,
    "preconditions": []
    },
    {
    "dataType": "ITEM_META",
    "description": " Item attribute list\t",
    "required": true,
    "preconditions": [
    {
    "key": "Recommendation based on category",
    "type": "boolean",
    "enumList": [],
    "min": 0,
    "max": 0,
    "flag": true
    }
    ]
    }
    ],
    "data_source": [
    {
    "table_type_id": "ITEM_META",
    "data_format": "csv",
    "data_source_url": "<Path for storing the data sources>"
    "data_param": {
    "header": "false",
    "delimiter": ",",
    "quote": "\"",
    "escape": "\\"
    }
    },
    {
    "table_type_id": "ITEM_META_CONF",
    "data_format": "csv",
    "data_source_url": "<Path for storing the data sources>"
    "data_param": {
    "header": "false",
    "delimiter": ",",
    "quote": "\"",
    "escape": "\\"
    }
    },
    {
    "table_type_id": "USER_BEHAVIOR",
    "data_format": "csv",
    "data_source_url": "<Path for storing the data sources>"
    "data_param": {
    "header": "false",
    "delimiter": ",",
    "quote": "\"",
    "escape": "\\"
    }
    }
    ],
    "strategy_id": 0
    }
    },
    "response_info": {
    "is_success": true,
    "job_id": "d7a72d46599e4d32bc79efaf8041b6e5",
    "strategy": {
    "candidate_set": [
    {
    "uuid": "8ad7f7eafc094a6a8a650bf232f9627b",
    "description": "Recommendation based on specific behavior popularity"
    }
    ],
    "strategy_id": -1
    }
    },
    "job_description": "Retrieval-hotrec",
    "job_status": "SUCCEEDED",
    "resource": "DLI",
    "is_use": 0,
     "type": "retrieval"
    }
    }
  • Example of a failed response
    {
    "is_success": false,
    "error_code": "res.2211",
    "error_msg": "Failed to query."
    }

Status Code

For details about status codes, see Status Codes.