Preview import asset
curl --request POST \
--url https://api.example.com/v1/assets/{asset_id}/previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": false,
"nullable": true,
"required": true
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"page_number": 1,
"page_size": 50,
"include_load_date": false
}
'import requests
url = "https://api.example.com/v1/assets/{asset_id}/previews"
payload = {
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": False,
"nullable": True,
"required": True
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"page_number": 1,
"page_size": 50,
"include_load_date": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
column_mappings: [
{
source_column_name: '<string>',
target_column_name: '<string>',
data_type: 'STRING',
unique: false,
nullable: true,
required: true
}
],
csv: {
char_encoding: 'UTF_8',
column_separator: ',',
quote_character: '"',
header_row: 1,
first_data_row: 2,
date_format: '',
thousands: '<string>'
},
page_number: 1,
page_size: 50,
include_load_date: false
})
};
fetch('https://api.example.com/v1/assets/{asset_id}/previews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/assets/{asset_id}/previews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'column_mappings' => [
[
'source_column_name' => '<string>',
'target_column_name' => '<string>',
'data_type' => 'STRING',
'unique' => false,
'nullable' => true,
'required' => true
]
],
'csv' => [
'char_encoding' => 'UTF_8',
'column_separator' => ',',
'quote_character' => '"',
'header_row' => 1,
'first_data_row' => 2,
'date_format' => '',
'thousands' => '<string>'
],
'page_number' => 1,
'page_size' => 50,
'include_load_date' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/assets/{asset_id}/previews"
payload := strings.NewReader("{\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"page_number\": 1,\n \"page_size\": 50,\n \"include_load_date\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/assets/{asset_id}/previews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"page_number\": 1,\n \"page_size\": 50,\n \"include_load_date\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/assets/{asset_id}/previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"page_number\": 1,\n \"page_size\": 50,\n \"include_load_date\": false\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Tables
Preview import asset
Preview parsed rows from an uploaded asset before creating or replacing a table. Use column mappings and CSV parsing options to validate how Summation will interpret the file.
POST
/
v1
/
assets
/
{asset_id}
/
previews
Preview import asset
curl --request POST \
--url https://api.example.com/v1/assets/{asset_id}/previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": false,
"nullable": true,
"required": true
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"page_number": 1,
"page_size": 50,
"include_load_date": false
}
'import requests
url = "https://api.example.com/v1/assets/{asset_id}/previews"
payload = {
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": False,
"nullable": True,
"required": True
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"page_number": 1,
"page_size": 50,
"include_load_date": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
column_mappings: [
{
source_column_name: '<string>',
target_column_name: '<string>',
data_type: 'STRING',
unique: false,
nullable: true,
required: true
}
],
csv: {
char_encoding: 'UTF_8',
column_separator: ',',
quote_character: '"',
header_row: 1,
first_data_row: 2,
date_format: '',
thousands: '<string>'
},
page_number: 1,
page_size: 50,
include_load_date: false
})
};
fetch('https://api.example.com/v1/assets/{asset_id}/previews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/assets/{asset_id}/previews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'column_mappings' => [
[
'source_column_name' => '<string>',
'target_column_name' => '<string>',
'data_type' => 'STRING',
'unique' => false,
'nullable' => true,
'required' => true
]
],
'csv' => [
'char_encoding' => 'UTF_8',
'column_separator' => ',',
'quote_character' => '"',
'header_row' => 1,
'first_data_row' => 2,
'date_format' => '',
'thousands' => '<string>'
],
'page_number' => 1,
'page_size' => 50,
'include_load_date' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/assets/{asset_id}/previews"
payload := strings.NewReader("{\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"page_number\": 1,\n \"page_size\": 50,\n \"include_load_date\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/assets/{asset_id}/previews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"page_number\": 1,\n \"page_size\": 50,\n \"include_load_date\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/assets/{asset_id}/previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"page_number\": 1,\n \"page_size\": 50,\n \"include_load_date\": false\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
application/json
Response
Successful Response
⌘I