Uploading
Initialize upload session
Creates a new session or reports an existing one. Returns 409 if a session is already active.
POST
/
uploading
/
initialize-session
Initialize upload session
curl --request POST \
--url https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session \
--header 'Authorization: <api-key>' \
--header 'Client-Id: <api-key>'import requests
url = "https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session"
headers = {
"Authorization": "<api-key>",
"Client-Id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Client-Id': '<api-key>'}
};
fetch('https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session', 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://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Client-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Client-Id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session")
.header("Authorization", "<api-key>")
.header("Client-Id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Client-Id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"upload_uuid": "<string>",
"message": "<string>",
"previous_upload_uuid": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"session_status": "<string>",
"upload_uuid": "<string>",
"message": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Response
Successful Response
⌘I
Initialize upload session
curl --request POST \
--url https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session \
--header 'Authorization: <api-key>' \
--header 'Client-Id: <api-key>'import requests
url = "https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session"
headers = {
"Authorization": "<api-key>",
"Client-Id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Client-Id': '<api-key>'}
};
fetch('https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session', 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://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Client-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Client-Id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session")
.header("Authorization", "<api-key>")
.header("Client-Id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://etl-api-dev2.datawiz.io/api/v1/uploading/initialize-session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Client-Id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"upload_uuid": "<string>",
"message": "<string>",
"previous_upload_uuid": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"session_status": "<string>",
"upload_uuid": "<string>",
"message": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}