curl --request POST \
--url https://api.erdo.ai/v1/datasets/{datasetSlug}/schema \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"class": "<string>",
"clear_purpose": true,
"dataset_slug": "<string>",
"operations": [
{
"column": "<string>",
"column_type": "<string>",
"columns": [
{
"description": "<string>",
"name": "<string>",
"required": true,
"semantic_role": "<string>",
"type": "<string>"
}
],
"new_name": "<string>",
"type": "<string>"
}
],
"purpose": "<string>",
"purpose_description": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/datasets/{datasetSlug}/schema"
payload = {
"class": "<string>",
"clear_purpose": True,
"dataset_slug": "<string>",
"operations": [
{
"column": "<string>",
"column_type": "<string>",
"columns": [
{
"description": "<string>",
"name": "<string>",
"required": True,
"semantic_role": "<string>",
"type": "<string>"
}
],
"new_name": "<string>",
"type": "<string>"
}
],
"purpose": "<string>",
"purpose_description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
class: '<string>',
clear_purpose: true,
dataset_slug: '<string>',
operations: [
{
column: '<string>',
column_type: '<string>',
columns: [
{
description: '<string>',
name: '<string>',
required: true,
semantic_role: '<string>',
type: '<string>'
}
],
new_name: '<string>',
type: '<string>'
}
],
purpose: '<string>',
purpose_description: '<string>'
})
};
fetch('https://api.erdo.ai/v1/datasets/{datasetSlug}/schema', 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.erdo.ai/v1/datasets/{datasetSlug}/schema",
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([
'class' => '<string>',
'clear_purpose' => true,
'dataset_slug' => '<string>',
'operations' => [
[
'column' => '<string>',
'column_type' => '<string>',
'columns' => [
[
'description' => '<string>',
'name' => '<string>',
'required' => true,
'semantic_role' => '<string>',
'type' => '<string>'
]
],
'new_name' => '<string>',
'type' => '<string>'
]
],
'purpose' => '<string>',
'purpose_description' => '<string>'
]),
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.erdo.ai/v1/datasets/{datasetSlug}/schema"
payload := strings.NewReader("{\n \"class\": \"<string>\",\n \"clear_purpose\": true,\n \"dataset_slug\": \"<string>\",\n \"operations\": [\n {\n \"column\": \"<string>\",\n \"column_type\": \"<string>\",\n \"columns\": [\n {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true,\n \"semantic_role\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"new_name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"purpose\": \"<string>\",\n \"purpose_description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.erdo.ai/v1/datasets/{datasetSlug}/schema")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"class\": \"<string>\",\n \"clear_purpose\": true,\n \"dataset_slug\": \"<string>\",\n \"operations\": [\n {\n \"column\": \"<string>\",\n \"column_type\": \"<string>\",\n \"columns\": [\n {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true,\n \"semantic_role\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"new_name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"purpose\": \"<string>\",\n \"purpose_description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/datasets/{datasetSlug}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"class\": \"<string>\",\n \"clear_purpose\": true,\n \"dataset_slug\": \"<string>\",\n \"operations\": [\n {\n \"column\": \"<string>\",\n \"column_type\": \"<string>\",\n \"columns\": [\n {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true,\n \"semantic_role\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"new_name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"purpose\": \"<string>\",\n \"purpose_description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"class": "<string>",
"columns_added": 123,
"columns_removed": 123,
"columns_renamed": 123,
"columns_retyped": 123,
"contract_reconciled_columns": [
"<string>"
],
"current_columns": [
"<string>"
],
"purpose": "<string>",
"warnings": [
"<string>"
]
}{
"code": "not_found",
"details": {},
"message": "<string>"
}UpdateDatasetSchemaAPI updates a dataset's schema (add/remove/rename columns,
alter types) and/or its class (‘table’ or ‘scratch’ via the `class` field).
curl --request POST \
--url https://api.erdo.ai/v1/datasets/{datasetSlug}/schema \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"class": "<string>",
"clear_purpose": true,
"dataset_slug": "<string>",
"operations": [
{
"column": "<string>",
"column_type": "<string>",
"columns": [
{
"description": "<string>",
"name": "<string>",
"required": true,
"semantic_role": "<string>",
"type": "<string>"
}
],
"new_name": "<string>",
"type": "<string>"
}
],
"purpose": "<string>",
"purpose_description": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/datasets/{datasetSlug}/schema"
payload = {
"class": "<string>",
"clear_purpose": True,
"dataset_slug": "<string>",
"operations": [
{
"column": "<string>",
"column_type": "<string>",
"columns": [
{
"description": "<string>",
"name": "<string>",
"required": True,
"semantic_role": "<string>",
"type": "<string>"
}
],
"new_name": "<string>",
"type": "<string>"
}
],
"purpose": "<string>",
"purpose_description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
class: '<string>',
clear_purpose: true,
dataset_slug: '<string>',
operations: [
{
column: '<string>',
column_type: '<string>',
columns: [
{
description: '<string>',
name: '<string>',
required: true,
semantic_role: '<string>',
type: '<string>'
}
],
new_name: '<string>',
type: '<string>'
}
],
purpose: '<string>',
purpose_description: '<string>'
})
};
fetch('https://api.erdo.ai/v1/datasets/{datasetSlug}/schema', 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.erdo.ai/v1/datasets/{datasetSlug}/schema",
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([
'class' => '<string>',
'clear_purpose' => true,
'dataset_slug' => '<string>',
'operations' => [
[
'column' => '<string>',
'column_type' => '<string>',
'columns' => [
[
'description' => '<string>',
'name' => '<string>',
'required' => true,
'semantic_role' => '<string>',
'type' => '<string>'
]
],
'new_name' => '<string>',
'type' => '<string>'
]
],
'purpose' => '<string>',
'purpose_description' => '<string>'
]),
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.erdo.ai/v1/datasets/{datasetSlug}/schema"
payload := strings.NewReader("{\n \"class\": \"<string>\",\n \"clear_purpose\": true,\n \"dataset_slug\": \"<string>\",\n \"operations\": [\n {\n \"column\": \"<string>\",\n \"column_type\": \"<string>\",\n \"columns\": [\n {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true,\n \"semantic_role\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"new_name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"purpose\": \"<string>\",\n \"purpose_description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.erdo.ai/v1/datasets/{datasetSlug}/schema")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"class\": \"<string>\",\n \"clear_purpose\": true,\n \"dataset_slug\": \"<string>\",\n \"operations\": [\n {\n \"column\": \"<string>\",\n \"column_type\": \"<string>\",\n \"columns\": [\n {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true,\n \"semantic_role\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"new_name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"purpose\": \"<string>\",\n \"purpose_description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/datasets/{datasetSlug}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"class\": \"<string>\",\n \"clear_purpose\": true,\n \"dataset_slug\": \"<string>\",\n \"operations\": [\n {\n \"column\": \"<string>\",\n \"column_type\": \"<string>\",\n \"columns\": [\n {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true,\n \"semantic_role\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"new_name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"purpose\": \"<string>\",\n \"purpose_description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"class": "<string>",
"columns_added": 123,
"columns_removed": 123,
"columns_renamed": 123,
"columns_retyped": 123,
"contract_reconciled_columns": [
"<string>"
],
"current_columns": [
"<string>"
],
"purpose": "<string>",
"warnings": [
"<string>"
]
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Path Parameters
Body
(analysis by-product, hidden from listings by default). Omit to leave the class unchanged. Use this to promote a durable table that was mistakenly filed as scratch, or to demote one. A class-only update needs no operations.
an empty one are the same value, so "leave it alone" and "take it away" need distinct fields to stay distinguishable.
Show child attributes
Show child attributes
ClearPurpose removes one. Correcting a purpose has to be possible: it is the org's answer to "which dataset holds this kind of data", so one stamped on the wrong dataset points every consumer that resolves through the vocabulary at the wrong rows.
purpose is new to the org; ignored when an entry already exists.
Response
Success response
'scratch'; empty for an unclassified legacy row left unchanged).
because the stored file already had them and the contract did not — the drift a promotion to table class would otherwise turn into a write refusal.
it carries none.
already has other dataset(s) carrying it, named by slug.

