Performs an import of a flow package, which  also applies any specified import rules.

Version: v4

Required Permissions

Request

Request Type: POST

Endpoint:

/v4/flows/package/


Request URI - Example:

/v4/flows/package

Request Body:

The request body must include the following key and value combination submitted as form data. This path is the location of the ZIP package that you are importing.

keyvalue
data"@path-to-file"

Example request - curl:

curl -X POST http://example.com:3005/v4/flows/package \
  -H 'authorization: Basic YWRtaW5AdHJpZmFjdGEubG9jYWw6YWRtaW4=' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data' \
  -F data=@path/to/flow.zip

Response

Response Status Code - Success:  201 - Created

Response Body Example:

{  
    "importRuleChanges":{  
        "object":[],
        "value":[]
    },
    "primaryFlowIds":[  
        6
    ],
    "flows":[  
        {  
            "id":6,
            "name":"[b19d9a70]  2013 POS",
            "description":null,
            "deleted_at":null,
            "cpProject":null,
            "workspaceId":1,
            "createdAt":"2018-04-24T16:11:59.343Z",
            "updatedAt":"2018-04-24T18:26:47.522Z",
            "createdBy":1,
            "updatedBy":1
        }
    ],
    "datasources":[  
        {  
            "id":10,
            "size":"13757",
            "path":"/uploads/1/0b6a7d7a-be8d-46c9-92cd-202f39fa5b1b/REF_PROD.txt",
            "dynamicPath":null,
            "type":"hdfs",
            "cpProject":null,
            "workspaceId":1,
            "bucket":null,
            "connectionId":null,
            "deleted_at":null,
            "blobHost":null,
            "container":null,
            "isSchematized":true,
            "isDynamic":false,
            "disableTypeInference":false,
            "createdAt":"2018-04-24T16:11:59.568Z",
            "updatedAt":"2018-04-24T18:26:47.592Z",
            "createdBy":1,
            "updatedBy":1,
            "parsingScriptId":15
        },
        {  
            "id":11,
            "size":"128761",
            "path":"/uploads/1/0b6a7d7a-be8d-46c9-92cd-202f39fa5b1b/POS-r03.txt",
            "dynamicPath":null,
            "type":"hdfs",
            "cpProject":null,
            "workspaceId":1,
            "bucket":null,
            "connectionId":null,
            "deleted_at":null,
            "blobHost":null,
            "container":null,
            "isSchematized":true,
            "isDynamic":false,
            "disableTypeInference":false,
            "createdAt":"2018-04-24T16:12:00.812Z",
            "updatedAt":"2018-04-24T18:26:47.597Z",
            "createdBy":1,
            "updatedBy":1,
            "parsingScriptId":16
        },
        {  
            "id":12,
            "size":"56976",
            "path":"/uploads/1/0b6a7d7a-be8d-46c9-92cd-202f39fa5b1b/REF_CAL.txt",
            "dynamicPath":null,
            "type":"hdfs",
            "cpProject":null,
            "workspaceId":1,
            "bucket":null,
            "connectionId":null,
            "deleted_at":null,
            "blobHost":null,
            "container":null,
            "isSchematized":true,
            "isDynamic":false,
            "disableTypeInference":false,
            "createdAt":"2018-04-24T16:12:01.431Z",
            "updatedAt":"2018-04-24T18:26:47.600Z",
            "createdBy":1,
            "updatedBy":1,
            "parsingScriptId":17
        },
        {  
            "id":13,
            "size":"281032",
            "path":"/uploads/1/0b6a7d7a-be8d-46c9-92cd-202f39fa5b1b/POS-r02.txt",
            "dynamicPath":null,
            "type":"hdfs",
            "cpProject":null,
            "workspaceId":1,
            "bucket":null,
            "connectionId":null,
            "deleted_at":null,
            "blobHost":null,
            "container":null,
            "isSchematized":true,
            "isDynamic":false,
            "disableTypeInference":false,
            "createdAt":"2018-04-24T16:12:01.848Z",
            "updatedAt":"2018-04-24T18:26:47.603Z",
            "createdBy":1,
            "updatedBy":1,
            "parsingScriptId":18
        },
        {  
            "id":14,
            "size":"1799008",
            "path":"/uploads/1/0b6a7d7a-be8d-46c9-92cd-202f39fa5b1b/POS-schema.csv",
            "dynamicPath":null,
            "type":"hdfs",
            "cpProject":null,
            "workspaceId":1,
            "bucket":null,
            "connectionId":null,
            "deleted_at":null,
            "blobHost":null,
            "container":null,
            "isSchematized":true,
            "isDynamic":false,
            "disableTypeInference":false,
            "createdAt":"2018-04-24T16:12:03.402Z",
            "updatedAt":"2018-04-24T18:26:47.607Z",
            "createdBy":1,
            "updatedBy":1,
            "parsingScriptId":19
        }
    ],
    "flownodes":[  
        {  
            "id":16,
            "scriptId":15,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":false,
            "referenceId":null,
            "createdAt":"2018-04-24T16:11:59.930Z",
            "updatedAt":"2018-04-24T18:26:47.803Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        },
        {  
            "id":17,
            "scriptId":16,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":false,
            "referenceId":null,
            "createdAt":"2018-04-24T16:12:01.048Z",
            "updatedAt":"2018-04-24T18:26:47.821Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        },
        {  
            "id":18,
            "scriptId":17,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":false,
            "referenceId":null,
            "createdAt":"2018-04-24T16:12:01.652Z",
            "updatedAt":"2018-04-24T18:26:47.834Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        },
        {  
            "id":19,
            "scriptId":18,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":false,
            "referenceId":null,
            "createdAt":"2018-04-24T16:12:02.073Z",
            "updatedAt":"2018-04-24T18:26:47.848Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        },
        {  
            "id":20,
            "scriptId":19,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":false,
            "referenceId":null,
            "createdAt":"2018-04-24T16:12:03.664Z",
            "updatedAt":"2018-04-24T18:26:47.861Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        },
        {  
            "id":21,
            "scriptId":20,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":true,
            "referenceId":2,
            "createdAt":"2018-04-24T16:12:14.018Z",
            "updatedAt":"2018-04-24T18:26:47.876Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        },
        {  
            "id":22,
            "scriptId":21,
            "flowId":6,
            "flowNodeId":null,
            "deleted_at":null,
            "wrangled":true,
            "referenceId":null,
            "createdAt":"2018-04-24T17:15:36.199Z",
            "updatedAt":"2018-04-24T18:26:47.886Z",
            "createdBy":1,
            "updatedBy":1,
            "activesampleId":null
        }
    ],
    "outputobjects":[  
        {  
            "id":5,
            "execution":"photon",
            "profiler":true,
            "flowNodeId":21,
            "isAdhoc":true,
            "createdAt":"2018-04-24T16:14:17.153Z",
            "updatedAt":"2018-04-24T18:26:47.896Z",
            "createdBy":1,
            "updatedBy":1
        }
    ]
}

Reference

NodeDescription
flowsInternal identifier of the flow and related data
datasourcesSources of data for the flow.
flowNodesObjects (imported datasets, recipes, and reference objects) within the flow definition
outputobjects

Output objects related to the Run Job settings for the flow. See Run Job Page.