Update a subscription
curl --request PATCH \
--url https://api.ploti.ai/v1/subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"places": [
"<string>"
],
"topics": [
"<string>"
],
"datasetIds": [
"<string>"
],
"delivery": {
"type": "pull"
},
"format": "geoparquet"
}
'import requests
url = "https://api.ploti.ai/v1/subscriptions/{subscriptionId}"
payload = {
"name": "<string>",
"places": ["<string>"],
"topics": ["<string>"],
"datasetIds": ["<string>"],
"delivery": { "type": "pull" },
"format": "geoparquet"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
places: ['<string>'],
topics: ['<string>'],
datasetIds: ['<string>'],
delivery: {type: 'pull'},
format: 'geoparquet'
})
};
fetch('https://api.ploti.ai/v1/subscriptions/{subscriptionId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'places' => [
'<string>'
],
'topics' => [
'<string>'
],
'datasetIds' => [
'<string>'
],
'delivery' => [
'type' => 'pull'
],
'format' => 'geoparquet'
]),
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.ploti.ai/v1/subscriptions/{subscriptionId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"places\": [\n \"<string>\"\n ],\n \"topics\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"delivery\": {\n \"type\": \"pull\"\n },\n \"format\": \"geoparquet\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.ploti.ai/v1/subscriptions/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"places\": [\n \"<string>\"\n ],\n \"topics\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"delivery\": {\n \"type\": \"pull\"\n },\n \"format\": \"geoparquet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ploti.ai/v1/subscriptions/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"places\": [\n \"<string>\"\n ],\n \"topics\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"delivery\": {\n \"type\": \"pull\"\n },\n \"format\": \"geoparquet\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"places": [
"<string>"
],
"topics": [
"<string>"
],
"datasetIds": [
"<string>"
],
"delivery": {
"type": "pull"
},
"datasetCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"format": "geoparquet",
"lastEventId": "<string>"
}Subscriptions
Update a subscription
Change its name, places, topics, datasets or delivery. Datasets that
join send dataset.added; datasets that leave send dataset.removed.
Update a subscription
curl --request PATCH \
--url https://api.ploti.ai/v1/subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"places": [
"<string>"
],
"topics": [
"<string>"
],
"datasetIds": [
"<string>"
],
"delivery": {
"type": "pull"
},
"format": "geoparquet"
}
'import requests
url = "https://api.ploti.ai/v1/subscriptions/{subscriptionId}"
payload = {
"name": "<string>",
"places": ["<string>"],
"topics": ["<string>"],
"datasetIds": ["<string>"],
"delivery": { "type": "pull" },
"format": "geoparquet"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
places: ['<string>'],
topics: ['<string>'],
datasetIds: ['<string>'],
delivery: {type: 'pull'},
format: 'geoparquet'
})
};
fetch('https://api.ploti.ai/v1/subscriptions/{subscriptionId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'places' => [
'<string>'
],
'topics' => [
'<string>'
],
'datasetIds' => [
'<string>'
],
'delivery' => [
'type' => 'pull'
],
'format' => 'geoparquet'
]),
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.ploti.ai/v1/subscriptions/{subscriptionId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"places\": [\n \"<string>\"\n ],\n \"topics\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"delivery\": {\n \"type\": \"pull\"\n },\n \"format\": \"geoparquet\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.ploti.ai/v1/subscriptions/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"places\": [\n \"<string>\"\n ],\n \"topics\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"delivery\": {\n \"type\": \"pull\"\n },\n \"format\": \"geoparquet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ploti.ai/v1/subscriptions/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"places\": [\n \"<string>\"\n ],\n \"topics\": [\n \"<string>\"\n ],\n \"datasetIds\": [\n \"<string>\"\n ],\n \"delivery\": {\n \"type\": \"pull\"\n },\n \"format\": \"geoparquet\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"places": [
"<string>"
],
"topics": [
"<string>"
],
"datasetIds": [
"<string>"
],
"delivery": {
"type": "pull"
},
"datasetCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"format": "geoparquet",
"lastEventId": "<string>"
}Authorizations
An API key from Settings, API keys, with the feeds scope.
Path Parameters
Body
application/json
Maximum string length:
120Place ids. Every dataset in each place.
Only these topics within places. Every topic when left out.
Datasets to include on their own, in any covered place.
Where a subscription's files are delivered. More destination types are added as customers need them; each receives the same files.
- Pull
- Amazon S3
- Google Cloud Storage
Show child attributes
Show child attributes
The format pushed deliveries are written in.
Available options:
geoparquet, csv Response
200 - application/json
The updated subscription.
Where a subscription's files are delivered. More destination types are added as customers need them; each receives the same files.
- Pull
- Amazon S3
- Google Cloud Storage
Show child attributes
Show child attributes
Available options:
geoparquet, csv