Querying the Execution Result of a Script Instance

Function

This API is used to obtain the execution status and result of a script instance.

During the query, specify the script name and script instance ID.

URI

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

workspace

No

String

Workspace ID.

  • If this parameter is not set, data in the default workspace is queried by default.
  • To query data in other workspaces, this header must be carried.

Response Parameters

Table 3 Response parameters

Parameter

Mandatory

Type

Description

status

Yes

String

Execution status.

LAUNCHING: The script instance is being submitted.

RUNNING: The script instance is running.

FINISHED: The script instance is successfully run.

FAILED: The script instance fails to be run.

results

Yes

List<Result>

Execution result of the script instance.

Table 4 Result data structure description

Parameter

Mandatory

Type

Description

message

No

String

Execution failure message.

duration

No

float

Duration of executing the script instance. Unit: second

rowCount

No

Int

Number of the result rows.

rows

No

List<List<Object>>

Result data.

schema

No

List<Map<String, String>>

Format definition of the result data.

Example Request

GET /v1/b384b9e9ab9b4ee8994c8633aabc9505/scripts/dwsscript/instances/a1ad-448a-9d56-4154193d49c5

Example Response

Status Codes

See Status Codes.