Querying Details About a Task

Function

This API is used to query the execution status of an SFS Turbo asynchronous task. For example, you can query the task execution status using the jobId returned after you call the API for creating and binding the LDAP configuration.

URI

GET /v1/{project_id}/sfs-turbo/jobs/{job_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

job_id

Yes

String

job ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Account token

Content-Type

Yes

String

MIME type

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-request-id

String

Request ID

Table 4 Response body parameters

Parameter

Type

Description

status

String

Task status, which can be success, running, failed, or waiting

Enumeration values:

  • success

  • failed

  • waiting

  • running

job_id

String

Task ID

job_type

String

Task type

begin_time

String

Task start time in UTC format, for example, '2016-01-02 15:04:05

end_time

String

Task end time in UTC format, for example, '2016-01-02 15:04:05

error_code

String

Error code returned if the task execution fails

fail_reason

String

Cause of the task execution failure

sub_jobs

Array of GetSubJobDetail objects

List of subtasks

Table 5 GetSubJobDetail

Parameter

Type

Description

status

String

Subtask status, which can be success, running, failed, or waiting

job_id

String

Task ID

job_type

String

Subtask type

begin_time

String

Task start time in UTC format, for example, '2016-01-02 15:04:05

end_time

String

Task end time in UTC format, for example, '2016-01-02 15:04:05

error_code

String

Error code returned if the task execution fails

fail_reason

String

Cause of the task execution failure

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

errCode

String

Error code

Minimum: 8

Maximum: 36

errMsg

String

Error description

Minimum: 2

Maximum: 512

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

errCode

String

Error code

Minimum: 8

Maximum: 36

errMsg

String

Error description

Minimum: 2

Maximum: 512

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

errCode

String

Error code

Minimum: 8

Maximum: 36

errMsg

String

Error description

Minimum: 2

Maximum: 512

Example Requests

None

Example Responses

Status code: 200

Response body parameters

{
  "job_id" : "26f6b565-xxxx-XXXX-xxxx-03f0bd975433",
  "status" : "success",
  "job_type" : "bind_ldap",
  "begin_time" : "2023-07-26 09:33:58",
  "end_time" : "2023-07-26 09:33:58"
}

Status code: 400

Client error

{
  "errCode" : "SFS.TURBO.0001",
  "errMsg" : "parameter error"
}

Status code: 404

Resource not found

{
  "errCode" : "SFS.TURBO.0001",
  "errMsg" : "parameter error"
}

Status code: 500

Internal error

{
  "errCode" : "SFS.TURBO.0005",
  "errMsg" : "Internal server error"
}

Status Codes

Status Code

Description

200

Response body parameters

400

Client error

404

Resource not found

500

Internal error

Error Codes

See Error Codes.