Post File Upload
curl --request POST \
--url https://api.sandbox.isometric.com/mrv/v0/file-uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"content_length": 123,
"file_name": "<string>",
"kind": "time_series_data"
}
'import requests
url = "https://api.sandbox.isometric.com/mrv/v0/file-uploads"
payload = {
"content_length": 123,
"file_name": "<string>",
"kind": "time_series_data"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({content_length: 123, file_name: '<string>', kind: 'time_series_data'})
};
fetch('https://api.sandbox.isometric.com/mrv/v0/file-uploads', 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.sandbox.isometric.com/mrv/v0/file-uploads",
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([
'content_length' => 123,
'file_name' => '<string>',
'kind' => 'time_series_data'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$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.sandbox.isometric.com/mrv/v0/file-uploads"
payload := strings.NewReader("{\n \"content_length\": 123,\n \"file_name\": \"<string>\",\n \"kind\": \"time_series_data\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
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.sandbox.isometric.com/mrv/v0/file-uploads")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content_length\": 123,\n \"file_name\": \"<string>\",\n \"kind\": \"time_series_data\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/mrv/v0/file-uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content_length\": 123,\n \"file_name\": \"<string>\",\n \"kind\": \"time_series_data\"\n}"
response = http.request(request)
puts response.read_body{
"id": "tfu_1DZPAW31R1S0ZESH",
"upload_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Time series data
Post File Upload
POST
/
file-uploads
Post File Upload
curl --request POST \
--url https://api.sandbox.isometric.com/mrv/v0/file-uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"content_length": 123,
"file_name": "<string>",
"kind": "time_series_data"
}
'import requests
url = "https://api.sandbox.isometric.com/mrv/v0/file-uploads"
payload = {
"content_length": 123,
"file_name": "<string>",
"kind": "time_series_data"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({content_length: 123, file_name: '<string>', kind: 'time_series_data'})
};
fetch('https://api.sandbox.isometric.com/mrv/v0/file-uploads', 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.sandbox.isometric.com/mrv/v0/file-uploads",
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([
'content_length' => 123,
'file_name' => '<string>',
'kind' => 'time_series_data'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$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.sandbox.isometric.com/mrv/v0/file-uploads"
payload := strings.NewReader("{\n \"content_length\": 123,\n \"file_name\": \"<string>\",\n \"kind\": \"time_series_data\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
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.sandbox.isometric.com/mrv/v0/file-uploads")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content_length\": 123,\n \"file_name\": \"<string>\",\n \"kind\": \"time_series_data\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/mrv/v0/file-uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content_length\": 123,\n \"file_name\": \"<string>\",\n \"kind\": \"time_series_data\"\n}"
response = http.request(request)
puts response.read_body{
"id": "tfu_1DZPAW31R1S0ZESH",
"upload_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>
Headers
A secret token identifying the client connecting to the API
Example:
"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"
Body
application/json
The size (in bytes) of the file that will be uploaded. The pre-signed URL will only accept a file of this size.
Required range:
x <= 100000000The content type of the file that will be uploaded. This must also be passed as a 'content-type' header during the upload. The pre-signed URL will only accept a file of this content-type.
Available options:
application/vnd.apache.parquet, application/geo+json The original filename of the file that will be uploaded. This is used for display purposes only and does not affect the upload process.
The kind of file that will be uploaded. Kind must match the content type of the file:
time_series_datamust be in Apache Parquet formatsite_geojsonmust be in GeoJSON format
Available options:
time_series_data, site_geojson Was this page helpful?