Available in VPC
Create a job. ## Request This section describes the request format. The method and URI are as follows:| Method | URI |
|---|---|
| POST | /api/v1/jobs |
Request headers
For information about the headers common to all Data Flow APIs, see Data Flow request headers.
Request body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
|---|---|---|---|
name |
String | Required | Job name
|
type |
String | Required | Job type
|
maxConcurrentRuns |
Integer | Optional | Maximum number of concurrent executions |
jobCondition |
Object | Optional | Job execution settings |
jobCondition.numWorker |
Integer | Optional | Number of workers
|
jobCondition.timeout |
Integer | Optional | Execution timeout (minute)
|
jobCondition.nrn |
String | Optional | NAVER Cloud Platform resource identification value for job |
jobCondition.scriptPath |
String | Optional | Job execution script storage path |
jobCondition.logPath |
String | Optional | Job execution history storage path |
nodes |
Array | Optional | Job node information
|
code |
String | Optional | SCRIPT job execution code |
Request example
The request example is as follows:
curl --location --request POST 'https://dataflow.apigw.ntruss.com/api/v1/jobs' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
"name": "job001",
"type": "VISUAL",
"maxConcurrentRuns": 3,
"jobCondition": {
"numWorker": 2,
"timeout": 360,
"nrn": "nrn:PUB:IAM::*******:Role/********",
"scriptPath": "dataflow-2706412-****/scripts/",
"logPath": "dataflow-2706412-****/sparkHistoryLogs/"
},
"nodes": [
{
"type": "SOURCE_OBS",
"id": 169777*******,
"name": "Object Storage",
"parentNodeIds": [],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"fieldList": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
}
]
},
{
"type": "TRANSFORM_FILTER",
"id": 169777*******,
"name": "Filters",
"parentNodeIds": [
169777*******
],
"filterType": "AND",
"filterConditionList": [
{
"name": "name",
"operator": "EQ",
"value": "A"
}
]
},
{
"type": "TARGET_OBS",
"id": 169777*******,
"name": "Object Storage",
"parentNodeIds": [
169777*******
],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"updateType" : "OVERWRITE",
"fieldList": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
}
]
}
]
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
jobId |
String | - | Job ID |
name |
String | - | Job name |
type |
String | - | Job type
|
status |
String | - | Job status
|
nodes |
Array | - | Job node information
|
runCondition |
Object | - | Job execution option |
runCondition.numWorker |
Integer | - | Number of workers
|
runCondition.timeout |
Integer | - | Execution timeout (minute)
|
runCondition.nrn |
String | - | NAVER Cloud Platform resource identification value for job |
runCondition.scriptPath |
String | - | Job execution script storage path |
runCondition.logPath |
String | - | Job execution history storage path |
createdDate |
String | - | Job creation date and time
|
updatedDate |
String | - | Job modification date and time
|
Response status codes
For information about the HTTP status codes common to all Data Flow APIs, see Data Flow response status codes.
Response example
The response example is as follows:
{
"jobId": "5Yns7J******",
"name": "job001",
"type": "DATAFLOW",
"status": "RUNNABLE",
"nodes": [
{
"type": "SOURCE_OBS",
"id": 169777,
"name": "Object Storage",
"parentNodeIds": [],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"fieldList": [
{
"name": "id",
"type": "string",
"properties": []
},
{
"name": "name",
"type": "string",
"properties": []
},
{
"name": "description",
"type": "string",
"properties": []
}
]
},
{
"type": "TRANSFORM_FILTER",
"id": 169777*******,
"name": "Filters",
"parentNodeIds": [
169777*******
],
"filterType": "AND",
"filterConditionList": [
{
"name": "name",
"operator": "EQ",
"value": "A"
}
]
},
{
"type": "TARGET_OBS",
"id": 169777*******,
"name": "Object Storage",
"parentNodeIds": [
169777*******
],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"updateType" : "OVERWRITE",
"fieldList": [
{
"name": "id",
"type": "string",
"properties": []
},
{
"name": "name",
"type": "string",
"properties": []
},
{
"name": "description",
"type": "string",
"properties": []
}
]
}
],
"runCondition": {
"numWorker": 2,
"timeout": 360,
"nrn": "",
"scriptPath": "dataflow-2706412-****/scripts/",
"logPath": "dataflow-2706412-****/sparkHistoryLogs/"
},
"createdDate": "2025-03-21T10:02:02+09:00",
"updatedDate": "2025-03-21T10:02:02+09:00"
}