List events
curl --request GET \
--url https://api.ploti.ai/v1/subscriptions/{subscriptionId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ploti.ai/v1/subscriptions/{subscriptionId}/events"
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/subscriptions/{subscriptionId}/events', 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/subscriptions/{subscriptionId}/events",
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/subscriptions/{subscriptionId}/events"
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/subscriptions/{subscriptionId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ploti.ai/v1/subscriptions/{subscriptionId}/events")
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{
"events": [
{
"id": "evt_0000018f2a9c",
"type": "dataset.added",
"createdAt": "2023-11-07T05:31:56Z",
"subscriptionId": "<string>",
"data": {
"datasetId": "<string>",
"version": 123,
"previousVersion": 123,
"schemaVersion": "<string>",
"counts": {
"added": 123,
"changed": 123,
"removed": 123
},
"schemaChange": {
"kind": "additive",
"previousSchemaVersion": "1.4",
"added": [
{
"name": "issued_date",
"type": "string",
"nullable": true,
"description": "The date the permit was issued.",
"sourceName": "ISSUE_DT"
}
],
"removed": [
"<string>"
],
"retyped": [
{
"name": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"keyColumnsChanged": true
},
"reason": "key_columns_changed",
"links": {
"version": "<string>",
"changes": "<string>",
"schema": "<string>"
}
}
}
],
"hasMore": true
}{
"error": {
"code": "not_found",
"message": "<string>",
"links": {}
}
}Events
List events
Events in the order they happened, after after. Store the last
event id you applied and pass it next time. Events are kept for 90
days; a cursor older than that returns 410 and you reload from the
manifest. The same events are sent to webhooks subscribed to them.
List events
curl --request GET \
--url https://api.ploti.ai/v1/subscriptions/{subscriptionId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ploti.ai/v1/subscriptions/{subscriptionId}/events"
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/subscriptions/{subscriptionId}/events', 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/subscriptions/{subscriptionId}/events",
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/subscriptions/{subscriptionId}/events"
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/subscriptions/{subscriptionId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ploti.ai/v1/subscriptions/{subscriptionId}/events")
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{
"events": [
{
"id": "evt_0000018f2a9c",
"type": "dataset.added",
"createdAt": "2023-11-07T05:31:56Z",
"subscriptionId": "<string>",
"data": {
"datasetId": "<string>",
"version": 123,
"previousVersion": 123,
"schemaVersion": "<string>",
"counts": {
"added": 123,
"changed": 123,
"removed": 123
},
"schemaChange": {
"kind": "additive",
"previousSchemaVersion": "1.4",
"added": [
{
"name": "issued_date",
"type": "string",
"nullable": true,
"description": "The date the permit was issued.",
"sourceName": "ISSUE_DT"
}
],
"removed": [
"<string>"
],
"retyped": [
{
"name": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"keyColumnsChanged": true
},
"reason": "key_columns_changed",
"links": {
"version": "<string>",
"changes": "<string>",
"schema": "<string>"
}
}
}
],
"hasMore": true
}{
"error": {
"code": "not_found",
"message": "<string>",
"links": {}
}
}Authorizations
An API key from Settings, API keys, with the feeds scope.
Path Parameters
Query Parameters
The id of the last event you applied. From the start when left out.
Comma-separated event types to keep.
Required range:
1 <= x <= 500