Deleting Jobs

Function

This API is used to delete jobs and data generated by jobs.

URI

DELETE /v1/{project_id}/del-job

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

Training job ID

Request

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Mandatory

Type

Description

job_id

Yes

String

Job ID. The value can contain 1 to 20 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

type

Yes

String

Job type

offline_platform

No

Object

Compute platform information. This parameter is mandatory when type is set to etl, retrieval, filter, or standard but optional in other conditions.

offline_platform contains the following parameters:

  • platform. This parameter is optional. The parameter type is String. Currently, only DLI is supported.
  • platform_parameter. Platform information. This parameter is optional. The parameter type is String. The platform_parameter parameter contains the cluster_name.
    • cluster_name. Cluster name. This parameter is mandatory. The parameter type is String.
  • config_load_path. Path for loading the configuration files. This parameter is optional. The parameter type is String.

Response

Table 3 describes the response parameters.

Table 3 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

Whether the request is successful

message

Yes

String

Prompt message

error_code

Yes

String

Error code that indicates a request has failed. This parameter is unavailable when a request is successful.

error_msg

Yes

String

Error message that indicates a request has failed. This parameter is unavailable when a request is successful.

Example

  • Example request
    {
      "job_id": "aa22ac78f14142eaa7deacc8e88d477e",
      "type":"etl",
      "offline_platform": {
           "platform": "DLI", 
         "platform_parameter": {"cluster_name":"res_one"}, 
        "config_load_path": "<Path for storing the configuration sources>"
        }
    }
  • Example of a successful response
    {
        "is_success": true,
        "message": "Succeed to delete train log."
    }
  • Example of a failed response
    {
        "is_success": false,
        "error_code": "res.2301",
        "error_msg": "Failed to resolve the token from the request."
    }

Status Code

For details about status codes, see Status Codes.