Available in VPC
Edit a workflow.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
PUT | /api/v1/workflows/{workflowId} |
Request headers
For information about the headers common to all Data Flow APIs, see Data Flow request headers.
Request path parameters
You can use the following path parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
workflowId |
String | Required | Workflow ID
|
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
name |
String | Required | Workflow name
|
nodes |
Array | Required | Node information |
nodes
The following describes nodes
.
Field | Type | Required | Description |
---|---|---|---|
id |
String | Required | Node ID
|
name |
String | Required | Node name
|
type |
String | Required | Node type
|
parentNodeIds |
Array | Required | Parent node ID list
|
triggerRule |
String | Optional | Trigger node execution option information
|
jobCondition |
Object | Required | Job execution option information |
jobCondition.workerType |
String | Optional | Worker type
|
jobCondition.numWorker |
Integer | Optional | Number of workers
|
jobCondition.timeout |
Integer | Optional | Execution timeout (minute)
|
jobCondition.nrn |
String | Required | NAVER Cloud Platform resource identification value for job |
jobCondition.scriptPath |
String | Required | Job execution script storage path |
jobCondition.logPath |
String | Required | Job execution history storage path |
Request example
The request example is as follows:
curl --location --request PUT 'https://dataflow.apigw.ntruss.com/api/v1/workflows/3tfNLP******' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
"isTemp": false,
"name": "workflow001",
"nodes": [
{
"id": "gqigvH******",
"name": "job001",
"type": "JOB",
"parentNodeIds": [
"8bjF7E******"
],
"isValid": true,
"jobCondition": {
"workerType": "DEFAULT",
"numWorker": 3,
"timeout": 300,
"nrn": "nrn:PUB:IAM::*******:Role/********-0496-11f0-baf6-246e96591a38",
"scriptPath": "dataflow-2706412-****/scripts/",
"logPath": "dataflow-2706412-****/sparkHistoryLogs/"
}
},
{
"id": "8bjF7E******",
"name": "trigger001",
"type": "TRIGGER",
"parentNodeIds": [],
"triggerRule": "RECURRING",
"isValid": true
}
]
}
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
workflowId |
String | - | Workflow ID |
name |
String | - | Workflow name |
nodes |
Array | - | Node information |
createdDate |
String | - | Workflow creation date and time
|
updatedDate |
String | - | Workflow modification date and time
|
isTemp |
Boolean | - | Temporary storage status
|
nodes
The following describes nodes
.
Field | Type | Required | Description |
---|---|---|---|
id |
String | - | Node ID
|
name |
String | - | Node name
|
type |
String | - | Node type
|
parentNodeIds |
Array | - | Parent node ID list
|
triggerRule |
String | - | Trigger node execution option information
|
jobCondition |
Object | - | Job execution option information |
jobCondition.workerType |
String | - | Worker type
|
jobCondition.numWorker |
Integer | - | Number of workers
|
jobCondition.retry |
Integer | - | Number of job retries
|
jobCondition.timeout |
Integer | - | Execution timeout (minute)
|
jobCondition.nrn |
String | - | NAVER Cloud Platform resource identification value for job |
jobCondition.scriptPath |
String | - | Job execution script storage path |
jobCondition.logPath |
String | - | Job execution history storage path |
isValid |
Boolean | - | Node deletion status (node availability)
|
Response status codes
For response status codes common to all Data Flow APIs, see Data Flow API response status codes.
Response example
The response example is as follows:
{
"isTemp": false,
"name": "workflow001",
"nodes": [
{
"id": "gqigvH******",
"name": "job001",
"type": "JOB",
"parentNodeIds": [
"8bjF7E******"
],
"isValid": true,
"jobCondition": {
"workerType": "DEFAULT",
"numWorker": 3,
"timeout": 300,
"nrn": "nrn:PUB:IAM::*******:Role/********-0496-11f0-baf6-246e96591a38",
"scriptPath": "dataflow-2706412-****/scripts/",
"logPath": "dataflow-2706412-****/sparkHistoryLogs/"
}
},
{
"id": "8bjF7E******",
"name": "trigger001",
"type": "TRIGGER",
"parentNodeIds": [],
"triggerRule": "RECURRING",
"isValid": true
}
]
}