Updated on 2024-02-18 GMT+08:00

Calling Back a Flow

Function

This API is used to call back a flow.

URI

POST /v2/{project_id}/fgs/workflows/{workflow_id}/callback

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

Minimum: 1

Maximum: 64

workflow_id

Yes

String

Flow definition ID.

Minimum: 1

Maximum: 512

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Workflow-Run-Id

Yes

String

workflow run id

X-Workflow-State-Id

Yes

String

workflow state id

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

result

Yes

String

Execution result.

Minimum: 1

Maximum: 64

Enumeration values:

  • success

  • fail

error

No

String

Error information.

Minimum: 1

Maximum: 64

output

Yes

Object

Flow execution result in JSON format. This parameter has a value only when the status is success.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

execution_id

String

Error code.

Minimum: 1

Maximum: 64

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 36

error_msg

String

Error description.

Minimum: 2

Maximum: 512

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 36

error_msg

String

Error description.

Minimum: 2

Maximum: 512

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 36

error_msg

String

Error description.

Minimum: 2

Maximum: 512

Example Requests

Call back a flow.

POST /v2/{project_id}/fgs/workflows/callback

Example Responses

Status code: 200

Success

{
  "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc13"
}

Status Codes

Status Code

Description

200

Success

400

Bad Request

404

Bad Request

500

Internal Server Error

Error Codes

See Error Codes.