Help Center/ ServiceStage/ API Reference/ CSE APIs/ Engine Management/ Querying Details About an Exclusive Microservice Engine Job
Updated on 2024-10-16 GMT+08:00

Querying Details About an Exclusive Microservice Engine Job

Function

Querying Details About an Exclusive Microservice Engine Job

URI

GET /v2/{project_id}/enginemgr/engines/{engine_id}/jobs/{job_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant sub-project ID, which must be unique. The value contains 1 to 64 characters. See Obtaining a Project ID.

engine_id

Yes

String

ID of an exclusive microservice engine. See Querying the Exclusive Microservice Engine List.

job_id

Yes

String

ID of an exclusive microservice engine. See Querying Details About an Exclusive Microservice Engine.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

X-Enterprise-Project-ID

No

String

Enterprise project ID.

If this parameter is not set, the default enterprise project is default and the ID is 0.

Response

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

Integer

Job ID.

engineId

String

ID of an exclusive microservice engine.

type

String

Job type.

Create

Delete

Upgrade

Configure

description

String

Job description.

status

String

Current status of a job.

Init

Executing

Error

Timeout

Finished

scheduling

Integer

Whether a job is being executed. 0: no; 1: yes.

createUser

String

Creator of a job.

startTime

Integer

Start time of a job.

endTime

Integer

End time of a job.

context

String

Job execution context.

tasks

Array of TaskSteps objects

Job phases.

Table 4 TaskSteps

Parameter

Type

Description

taskName

String

Name of a phase.

taskNames

Array of String

List of procedures contained in the current phase.

status

String

Status of the phase.

startTime

Integer

Start time of a phase.

endTime

Integer

End time of a phase.

taskExecutorBrief

Object

Job metadata.

tasks

Array of Task objects

Sub-jobs in the phase.

Table 5 TaskExecutorBrief

Parameter

Type

Description

duration

Integer

Duration of a sub-job.

description

String

Sub-job description.

Table 6 Task

Parameter

Type

Description

jobId

Integer

ID of the job to which the sub-job belongs.

id

Integer

Sub-job ID, which is in UUID format.

type

String

Sub-job type.

assigned

String

Executor of a sub-job.

taskName

String

Sub-job name.

engineName

String

Name of the engine to which the sub-job belongs.

taskOrder

Integer

Sequence in which sub-jobs are executed, in ascending order.

status

String

Sub-job status.

startTime

Integer

Start time of a sub-job.

endTime

Integer

End time of a sub-job.

createTime

Integer

Creation time of a sub-job.

updateTime

Integer

Update time of a sub-job.

timeout

Integer

Whether a sub-job times out.

log

String

Sub-job details, which are auxiliary information generated during the execution.

output

String

Sub-job output information.

taskExecutorBrief

Object

Sub-job metadata.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error message.

detail

String

Location details.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error message.

detail

String

Location details.

Example Request

Query details about a job with specified job_id in an exclusive engine with specified engine_id.

GET /v2/{project_id}/enginemgr/engines/{engine_id}/jobs/{job_id}

Example Response

{
	"id": 12339,
	"engineId": "ad76972c-a743-4770-859c-c98a680f4d98",
	"type": "Create",
	"description": "",
	"status": "Finished",
	"scheduling": 0,
	"createUser": "test",
	"startTime": 1636540095901,
	"endTime": 1636540460230,
	"context": "",
	"tasks": [{
		"taskName": "resourcePrepare",
		"taskNames": ["TenantTaskExecutor"],
		"status": "Finished",
		"startTime": 1636540100216,
		"endTime": 1636540110215,
		"taskExecutorBrief": {
			"duration": 60000,
                        "description": "Resource preparation"
		},
		"tasks": [{
			"jobId": 12339,
			"id": 89117,
			"type": "Create",
			"assigned": "",
			"taskName": "TenantTaskExecutor",
			"engineName": "test",
			"taskOrder": 0,
			"status": "Init",
			"startTime": 1636540100216,
			"endTime": 1636540110215,
			"createTime": 1636540095910,
			"updateTime": 1636540110230,
			"timeout": -1,
			"log": "",
			"output": "{}",
			"taskExecutorBrief": {
				"duration": 60000,
                                "description": "Tenant processing"
			}
		}]
	}]
}

Status Code

Status Code

Description

200

OK

400

Bad Request

500

Internal Server Error

Error Code

See CSE Error Codes.