Skip to content

CSV Flat File

This section shows how to connect to the local file system of the machine that runs Xtract Core. SAP data is written to a CSV (comma-separated values) flat file.

Connect to the Fiel System

Use the following endpoint to create a new connection to your local file system:

POST /v1/connections/filecsv/{name}
POST /v1/connections/filecsv/csv HTTP/1.1
Host: localhost:1337
Content-Type: application/json
Content-Length: 123

{
"Directory": "C:/output(1)",
"ColumnSeparator": ",",
"ColumnNames": false,
"TrailingLineBreak": true
}
  1. Only provide fully qualified paths that start at the root directory of your system.
curl -X POST \
     -H '[Content-Type: application/json]' \
     -H '[Content-Length: 123]' \
     -d '"Directory": "C:/output", "ColumnSeparator": ",", "ColumnNames": false, "TrailingLineBreak": true' \
     'http://localhost:1337/v1/connections/filecsv/csv'
fetch('http://localhost:1337/v1/connections/filecsv/csv', {
  "method": "POST",
  "headers": {
    "[Content-Type": "application/json]",
    "[Content-Length": "123]"
  },
  "body": JSON.stringify("Directory": "C:/output", "ColumnSeparator": ",", "ColumnNames": false, "TrailingLineBreak": true)"
});

When this endpoint is called, the Xtract Core web server tries to access the target file location before saving the connection.

Tip

The Content-Length property in the header represents the byte size of the JSON string in the request body. When using curl, the Content-Length can be determined automatically. The -v (verbose) option returns the request details, including Content-Length.


Last update: September 5, 2025