curl --request POST \
--url https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activity_message": "<string>",
"script": {},
"diff_summary": {},
"validation_report": {},
"staged_changes": [
{
"after_data": {},
"catalog_item_id": "<string>",
"catalog_item_entity_type": "<string>",
"before_data": {},
"source_data": {},
"is_new_item": false,
"row_index": 123
}
],
"schema_changes": {},
"taxonomy_changes": {},
"attachments": [
{}
],
"activity_context": {},
"session_context": {},
"base_snapshot_id": "<string>"
}
'import requests
url = "https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform"
payload = {
"activity_message": "<string>",
"script": {},
"diff_summary": {},
"validation_report": {},
"staged_changes": [
{
"after_data": {},
"catalog_item_id": "<string>",
"catalog_item_entity_type": "<string>",
"before_data": {},
"source_data": {},
"is_new_item": False,
"row_index": 123
}
],
"schema_changes": {},
"taxonomy_changes": {},
"attachments": [{}],
"activity_context": {},
"session_context": {},
"base_snapshot_id": "<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({
activity_message: '<string>',
script: {},
diff_summary: {},
validation_report: {},
staged_changes: [
{
after_data: {},
catalog_item_id: '<string>',
catalog_item_entity_type: '<string>',
before_data: {},
source_data: {},
is_new_item: false,
row_index: 123
}
],
schema_changes: {},
taxonomy_changes: {},
attachments: [{}],
activity_context: {},
session_context: {},
base_snapshot_id: '<string>'
})
};
fetch('https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform', 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://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform",
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([
'activity_message' => '<string>',
'script' => [
],
'diff_summary' => [
],
'validation_report' => [
],
'staged_changes' => [
[
'after_data' => [
],
'catalog_item_id' => '<string>',
'catalog_item_entity_type' => '<string>',
'before_data' => [
],
'source_data' => [
],
'is_new_item' => false,
'row_index' => 123
]
],
'schema_changes' => [
],
'taxonomy_changes' => [
],
'attachments' => [
[
]
],
'activity_context' => [
],
'session_context' => [
],
'base_snapshot_id' => '<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://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform"
payload := strings.NewReader("{\n \"activity_message\": \"<string>\",\n \"script\": {},\n \"diff_summary\": {},\n \"validation_report\": {},\n \"staged_changes\": [\n {\n \"after_data\": {},\n \"catalog_item_id\": \"<string>\",\n \"catalog_item_entity_type\": \"<string>\",\n \"before_data\": {},\n \"source_data\": {},\n \"is_new_item\": false,\n \"row_index\": 123\n }\n ],\n \"schema_changes\": {},\n \"taxonomy_changes\": {},\n \"attachments\": [\n {}\n ],\n \"activity_context\": {},\n \"session_context\": {},\n \"base_snapshot_id\": \"<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://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity_message\": \"<string>\",\n \"script\": {},\n \"diff_summary\": {},\n \"validation_report\": {},\n \"staged_changes\": [\n {\n \"after_data\": {},\n \"catalog_item_id\": \"<string>\",\n \"catalog_item_entity_type\": \"<string>\",\n \"before_data\": {},\n \"source_data\": {},\n \"is_new_item\": false,\n \"row_index\": 123\n }\n ],\n \"schema_changes\": {},\n \"taxonomy_changes\": {},\n \"attachments\": [\n {}\n ],\n \"activity_context\": {},\n \"session_context\": {},\n \"base_snapshot_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform")
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 \"activity_message\": \"<string>\",\n \"script\": {},\n \"diff_summary\": {},\n \"validation_report\": {},\n \"staged_changes\": [\n {\n \"after_data\": {},\n \"catalog_item_id\": \"<string>\",\n \"catalog_item_entity_type\": \"<string>\",\n \"before_data\": {},\n \"source_data\": {},\n \"is_new_item\": false,\n \"row_index\": 123\n }\n ],\n \"schema_changes\": {},\n \"taxonomy_changes\": {},\n \"attachments\": [\n {}\n ],\n \"activity_context\": {},\n \"session_context\": {},\n \"base_snapshot_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"status": "<string>",
"staged_count": 123,
"review_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Custom Transform Activity
Create a custom transform activity with full audit metadata.
This is the primary endpoint for MCP tool servers to create reviewable activities with script provenance, diff summaries, and validation reports.
curl --request POST \
--url https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activity_message": "<string>",
"script": {},
"diff_summary": {},
"validation_report": {},
"staged_changes": [
{
"after_data": {},
"catalog_item_id": "<string>",
"catalog_item_entity_type": "<string>",
"before_data": {},
"source_data": {},
"is_new_item": false,
"row_index": 123
}
],
"schema_changes": {},
"taxonomy_changes": {},
"attachments": [
{}
],
"activity_context": {},
"session_context": {},
"base_snapshot_id": "<string>"
}
'import requests
url = "https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform"
payload = {
"activity_message": "<string>",
"script": {},
"diff_summary": {},
"validation_report": {},
"staged_changes": [
{
"after_data": {},
"catalog_item_id": "<string>",
"catalog_item_entity_type": "<string>",
"before_data": {},
"source_data": {},
"is_new_item": False,
"row_index": 123
}
],
"schema_changes": {},
"taxonomy_changes": {},
"attachments": [{}],
"activity_context": {},
"session_context": {},
"base_snapshot_id": "<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({
activity_message: '<string>',
script: {},
diff_summary: {},
validation_report: {},
staged_changes: [
{
after_data: {},
catalog_item_id: '<string>',
catalog_item_entity_type: '<string>',
before_data: {},
source_data: {},
is_new_item: false,
row_index: 123
}
],
schema_changes: {},
taxonomy_changes: {},
attachments: [{}],
activity_context: {},
session_context: {},
base_snapshot_id: '<string>'
})
};
fetch('https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform', 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://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform",
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([
'activity_message' => '<string>',
'script' => [
],
'diff_summary' => [
],
'validation_report' => [
],
'staged_changes' => [
[
'after_data' => [
],
'catalog_item_id' => '<string>',
'catalog_item_entity_type' => '<string>',
'before_data' => [
],
'source_data' => [
],
'is_new_item' => false,
'row_index' => 123
]
],
'schema_changes' => [
],
'taxonomy_changes' => [
],
'attachments' => [
[
]
],
'activity_context' => [
],
'session_context' => [
],
'base_snapshot_id' => '<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://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform"
payload := strings.NewReader("{\n \"activity_message\": \"<string>\",\n \"script\": {},\n \"diff_summary\": {},\n \"validation_report\": {},\n \"staged_changes\": [\n {\n \"after_data\": {},\n \"catalog_item_id\": \"<string>\",\n \"catalog_item_entity_type\": \"<string>\",\n \"before_data\": {},\n \"source_data\": {},\n \"is_new_item\": false,\n \"row_index\": 123\n }\n ],\n \"schema_changes\": {},\n \"taxonomy_changes\": {},\n \"attachments\": [\n {}\n ],\n \"activity_context\": {},\n \"session_context\": {},\n \"base_snapshot_id\": \"<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://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity_message\": \"<string>\",\n \"script\": {},\n \"diff_summary\": {},\n \"validation_report\": {},\n \"staged_changes\": [\n {\n \"after_data\": {},\n \"catalog_item_id\": \"<string>\",\n \"catalog_item_entity_type\": \"<string>\",\n \"before_data\": {},\n \"source_data\": {},\n \"is_new_item\": false,\n \"row_index\": 123\n }\n ],\n \"schema_changes\": {},\n \"taxonomy_changes\": {},\n \"attachments\": [\n {}\n ],\n \"activity_context\": {},\n \"session_context\": {},\n \"base_snapshot_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities/custom-transform")
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 \"activity_message\": \"<string>\",\n \"script\": {},\n \"diff_summary\": {},\n \"validation_report\": {},\n \"staged_changes\": [\n {\n \"after_data\": {},\n \"catalog_item_id\": \"<string>\",\n \"catalog_item_entity_type\": \"<string>\",\n \"before_data\": {},\n \"source_data\": {},\n \"is_new_item\": false,\n \"row_index\": 123\n }\n ],\n \"schema_changes\": {},\n \"taxonomy_changes\": {},\n \"attachments\": [\n {}\n ],\n \"activity_context\": {},\n \"session_context\": {},\n \"base_snapshot_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"status": "<string>",
"staged_count": 123,
"review_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Body
Request to create a custom transform activity with full audit metadata
Human-readable description (e.g., 'Q2 price update')
Transform script metadata: {filename, content, sha256}
Diff summary: {rows_before, rows_after, rows_added, rows_removed, rows_modified, ...}
Bundle validation report
Staged changes
Show child attributes
Show child attributes
Schema changes to apply alongside row changes
Taxonomy changes to apply alongside row changes
Optional attachment metadata used in this session (files, urls, sheet names)
Optional activity context for auditability (tool params, notes, attachment refs, etc.)
Deprecated alias for activity_context.session_context
Optional snapshot ID for audit trail