Get a version and its files
curl --request GET \
--url https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}', 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.ploti.ai/v1/datasets/{datasetId}/versions/{version}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"datasetId": "<string>",
"version": 123,
"schemaVersion": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"rowCount": 123,
"counts": {
"added": 123,
"changed": 123,
"removed": 123
},
"files": {
"snapshot": [
{
"url": "<string>",
"format": "geoparquet",
"rows": 123,
"bytes": 123,
"sha256": "<string>"
}
],
"changes": [
{
"url": "<string>",
"format": "geoparquet",
"rows": 123,
"bytes": 123,
"sha256": "<string>"
}
],
"schema": {
"url": "<string>",
"format": "geoparquet",
"rows": 123,
"bytes": 123,
"sha256": "<string>"
},
"expiresAt": "2023-11-07T05:31:56Z"
},
"previousVersion": 123,
"sourceFetchedAt": "2023-11-07T05:31:56Z",
"resyncRequired": true
}{
"error": {
"code": "not_found",
"message": "<string>",
"links": {}
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"links": {}
}
}Versions
Get a version and its files
A version with signed links to its files: the full snapshot, the
changes from the version before it, and its schema. Links expire
after files.expiresAt; ask again for fresh ones.
Get a version and its files
curl --request GET \
--url https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}', 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.ploti.ai/v1/datasets/{datasetId}/versions/{version}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ploti.ai/v1/datasets/{datasetId}/versions/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"datasetId": "<string>",
"version": 123,
"schemaVersion": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"rowCount": 123,
"counts": {
"added": 123,
"changed": 123,
"removed": 123
},
"files": {
"snapshot": [
{
"url": "<string>",
"format": "geoparquet",
"rows": 123,
"bytes": 123,
"sha256": "<string>"
}
],
"changes": [
{
"url": "<string>",
"format": "geoparquet",
"rows": 123,
"bytes": 123,
"sha256": "<string>"
}
],
"schema": {
"url": "<string>",
"format": "geoparquet",
"rows": 123,
"bytes": 123,
"sha256": "<string>"
},
"expiresAt": "2023-11-07T05:31:56Z"
},
"previousVersion": 123,
"sourceFetchedAt": "2023-11-07T05:31:56Z",
"resyncRequired": true
}{
"error": {
"code": "not_found",
"message": "<string>",
"links": {}
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"links": {}
}
}Authorizations
An API key from Settings, API keys, with the feeds scope.
Query Parameters
File format. GeoParquet unless given.
Available options:
geoparquet, csv Response
The version with its files.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
When Ploti read this version from the source.
True when this version's changes cannot be applied to the version before it (the key columns changed). Load its snapshot instead.