Start with File

This section describes the endpoint that allows you to create a job, upload a CSV file, and start the job in one simple combined step.

Authentication & Authorization

  • Use application tokens to authenticate your request using these instructions: Authorization & Authentication
  • Required application permission on token: Update Model

URI

Request URI

POST https://{region}.vena.io/api/public/v1/etl/templates/{templateId}/startWithFile

URI Parameter

Name Required Type Description
region Yes string The name of your region (e.g. "us1")
templateid Yes string The template ID (18 or 19 digits)

Headers

Content-type: multipart/form-data

Request Body

Name Type Description
file (the value must be the same as that of the partName in the metadata) file File path
metadata JSON Metadata of file to be uploaded. The information stored in the JSON is described in the table below.

Metadata Fields

Name Type Description
partName String Field name for storing file in request body.
fileFormat CSV, PSV, TDF Type of file to be uploaded.
fileEncoding UTF-8, UTF-16, Windows Latin-1 The encoding of file to be uploaded.
fileName String File name

Response

Name Type Description
200 OK ETLJob a Vena job

Examples

Sample Request

curl --location --request POST 'https://us2.vena.io/api/public/v1/etl/templates/1050582343200276480/startWithFile' \
-u 498265219441623040.498264904105459712:db30a250930e4b1e975c7a3f139bb7bf \
--form 'file=@"data.csv"' \
--form 'metadata="{\"input\":{\"partName\":\"file\",\"fileFormat\":\"CSV\",\"fileEncoding\":\"UTF-8\",\"fileName\":\"data.csv\"}}"'

Sample file and metadata

A1,B1,C1
A2,B2,C2
A3,B3,C3
{"input": {"partName": "file", "fileFormat": "CSV", "fileEncoding": "UTF-8", "fileName": "data.csv"}}

Sample Response
Status code: 200

{
"id": "1099180598582312960",
"name": "LoadGL",
"status": "RUNNING",
"modelId": "988930839071293441",
"modelName": "Financial Model",
"createdDate": 1623338765403,
"updatedDate": 1623338873829,
"userName": "Admin User"
}