MENU
      createJob

        createJob


        Article summary

        Create a job.

        POST https://dataflow.apigw.ntruss.com/api/v1/jobs
        HTTP

        Request

        Request body

        Parameter nameRequiredTypeRestrictionsDescription
        nameYesString- English letters, starting with an underscore ()
        - English letters, numbers, underscores (
        ) and hyphens (-) are allowed
        - Enter between 3 and 20 characters
        Job name
        nodesYesETLJobNodeJob node

        Response

        Field nameTypeDescriptionRemarks
        jobIdStringTask ID
        nameStringJob name
        typeStringJob type
        statusStringJob status
        nodes[].idNumberNode ID
        nodes[].nameStringNode name
        nodes[].typeStringNode type
        nodes[].parentNodeIdsArrayParent node ID
        runCondtion.workerTypeStringWorker type
        runCondition.numWorkerNumberNumber of workers
        runCondition.timeoutNumberExecution timeout
        runCondition.nrnStringPolicy NRN
        runCondition.scriptPathStringExecutable script storage path
        runCondition.logPathStringExecution log storage path
        createdDateStringJob creation date
        updatedDateStringLast update

        Response status

        HTTP StatusDesc
        201Created (Successfully created)
        400Bad Request
        401Unauthorized
        403Forbidden
        404Not Found
        500Internal Server Error

        Examples

        Request example

        POST /api/v1/jobs
        
        Host: dataflow.apigw.ntruss.com
        x-ncp-iam-access-key: {Access key}
        x-ncp-apigw-signature-v2: {API GW signature}
        x-ncp-apigw-timestamp: {timestamp}
        
        {
          "name": "data-flow",
          "nodes": [
                {
                  "type": "SOURCE_OBS",
                  "id": 1697776914576,
                  "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": 1697776942407,
                  "name": "Filters",
                  "parentNodeIds": [
                    1697776914576
                  ],
                  "filterType": "AND",
                  "filterConditionList": [
                    {
                      "name": "name",
                      "operator": "EQ",
                      "value": "A"
                    }
                  ]
                },
                {
                  "type": "TARGET_OBS",
                  "id": 1697776948956,
                  "name": "Object Storage",
                  "parentNodeIds": [
                    1697776942407
                  ],
                  "regionNo": "1",
                  "bucketName": "aitems",
                  "prefix": "dataflow1",
                  "dataType": "CSV",
                  "updateType" : "OVERWRITE",
                  "fieldList": [
                    {
                      "name": "id",
                      "type": "string"
                    },
                    {
                      "name": "name",
                      "type": "string"
                    },
                    {
                      "name": "description",
                      "type": "string"
                    }
                  ]
                }
              ]
        }
        HTTP

        Response example

        {
          "jobId": "5Yns7JgRt25f",
          "name": "data-flow",
          "description": "",
          "type": "DATAFLOW",
          "status": "RUNNABLE",
          "nodes": [
            {
              "type": "SOURCE_OBS",
              "id": 1697776914576,
              "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": 1697776942407,
              "name": "Filters",
              "parentNodeIds": [
                1697776914576
              ],
              "filterType": "AND",
              "filterConditionList": [
                {
                  "name": "name",
                  "operator": "EQ",
                  "value": "A"
                }
              ]
            },
            {
              "type": "TARGET_OBS",
              "id": 1697776948956,
              "name": "Object Storage",
              "parentNodeIds": [
                1697776942407
              ],
              "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": {
            "workerType": "DEFAULT",
            "numWorker": 2,
            "timeout": 2880,
            "nrn": "",
            "scriptPath": "dataflow-****/scripts/",
            "logPath": "dataflow-****/sparkHistoryLogs/"
          },
          "createdDate": "2023-10-20T13:45:15.000",
          "updatedDate": "2023-10-20T13:46:56.000"
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.