Preview record edits against compiled Tool contracts without changing running state
curl --request POST \
--url https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 4503599627370495,
"expectedSourceDigest": "<string>",
"expectedBuildHash": "<string>",
"collection": {
"packageId": "<string>",
"namespace": "<string>",
"instanceId": "<string>"
},
"records": [
{
"rowId": "<string>",
"value": {}
}
]
}
'import requests
url = "https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate"
payload = {
"expectedVersion": 4503599627370495,
"expectedSourceDigest": "<string>",
"expectedBuildHash": "<string>",
"collection": {
"packageId": "<string>",
"namespace": "<string>",
"instanceId": "<string>"
},
"records": [
{
"rowId": "<string>",
"value": {}
}
]
}
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({
expectedVersion: 4503599627370495,
expectedSourceDigest: '<string>',
expectedBuildHash: '<string>',
collection: {packageId: '<string>', namespace: '<string>', instanceId: '<string>'},
records: [{rowId: '<string>', value: {}}]
})
};
fetch('https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate', 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.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate",
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([
'expectedVersion' => 4503599627370495,
'expectedSourceDigest' => '<string>',
'expectedBuildHash' => '<string>',
'collection' => [
'packageId' => '<string>',
'namespace' => '<string>',
'instanceId' => '<string>'
],
'records' => [
[
'rowId' => '<string>',
'value' => [
]
]
]
]),
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.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate"
payload := strings.NewReader("{\n \"expectedVersion\": 4503599627370495,\n \"expectedSourceDigest\": \"<string>\",\n \"expectedBuildHash\": \"<string>\",\n \"collection\": {\n \"packageId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"instanceId\": \"<string>\"\n },\n \"records\": [\n {\n \"rowId\": \"<string>\",\n \"value\": {}\n }\n ]\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.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedVersion\": 4503599627370495,\n \"expectedSourceDigest\": \"<string>\",\n \"expectedBuildHash\": \"<string>\",\n \"collection\": {\n \"packageId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"instanceId\": \"<string>\"\n },\n \"records\": [\n {\n \"rowId\": \"<string>\",\n \"value\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate")
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 \"expectedVersion\": 4503599627370495,\n \"expectedSourceDigest\": \"<string>\",\n \"expectedBuildHash\": \"<string>\",\n \"collection\": {\n \"packageId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"instanceId\": \"<string>\"\n },\n \"records\": [\n {\n \"rowId\": \"<string>\",\n \"value\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schemaVersion": 1,
"source": {
"organizationId": "<string>",
"projectId": "<string>",
"sourceDraftId": "<string>",
"revision": 1073741824,
"version": 4503599627370495,
"sourceDigest": "<string>"
},
"buildHash": "<string>",
"collection": {
"packageId": "<string>",
"namespace": "<string>",
"instanceId": "<string>"
},
"status": "valid",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
],
"file": {
"sourceDraftId": "<string>",
"revision": 1073741824,
"path": "<string>",
"digest": "<string>",
"content": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"source": "platform",
"retryAfterMs": 123,
"operationId": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": {},
"evidence": {
"sessionId": "<string>",
"runId": "<string>",
"journalSeq": 4503599627370495,
"buildHash": "<string>"
}
}Preview record edits against compiled Tool contracts without changing running state
Preview record edits against compiled Tool contracts without changing running state
curl --request POST \
--url https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 4503599627370495,
"expectedSourceDigest": "<string>",
"expectedBuildHash": "<string>",
"collection": {
"packageId": "<string>",
"namespace": "<string>",
"instanceId": "<string>"
},
"records": [
{
"rowId": "<string>",
"value": {}
}
]
}
'import requests
url = "https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate"
payload = {
"expectedVersion": 4503599627370495,
"expectedSourceDigest": "<string>",
"expectedBuildHash": "<string>",
"collection": {
"packageId": "<string>",
"namespace": "<string>",
"instanceId": "<string>"
},
"records": [
{
"rowId": "<string>",
"value": {}
}
]
}
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({
expectedVersion: 4503599627370495,
expectedSourceDigest: '<string>',
expectedBuildHash: '<string>',
collection: {packageId: '<string>', namespace: '<string>', instanceId: '<string>'},
records: [{rowId: '<string>', value: {}}]
})
};
fetch('https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate', 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.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate",
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([
'expectedVersion' => 4503599627370495,
'expectedSourceDigest' => '<string>',
'expectedBuildHash' => '<string>',
'collection' => [
'packageId' => '<string>',
'namespace' => '<string>',
'instanceId' => '<string>'
],
'records' => [
[
'rowId' => '<string>',
'value' => [
]
]
]
]),
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.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate"
payload := strings.NewReader("{\n \"expectedVersion\": 4503599627370495,\n \"expectedSourceDigest\": \"<string>\",\n \"expectedBuildHash\": \"<string>\",\n \"collection\": {\n \"packageId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"instanceId\": \"<string>\"\n },\n \"records\": [\n {\n \"rowId\": \"<string>\",\n \"value\": {}\n }\n ]\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.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedVersion\": 4503599627370495,\n \"expectedSourceDigest\": \"<string>\",\n \"expectedBuildHash\": \"<string>\",\n \"collection\": {\n \"packageId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"instanceId\": \"<string>\"\n },\n \"records\": [\n {\n \"rowId\": \"<string>\",\n \"value\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firedrill.run/v1/projects/{projectId}/source-drafts/{sourceDraftId}/baseline/validate")
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 \"expectedVersion\": 4503599627370495,\n \"expectedSourceDigest\": \"<string>\",\n \"expectedBuildHash\": \"<string>\",\n \"collection\": {\n \"packageId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"instanceId\": \"<string>\"\n },\n \"records\": [\n {\n \"rowId\": \"<string>\",\n \"value\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schemaVersion": 1,
"source": {
"organizationId": "<string>",
"projectId": "<string>",
"sourceDraftId": "<string>",
"revision": 1073741824,
"version": 4503599627370495,
"sourceDigest": "<string>"
},
"buildHash": "<string>",
"collection": {
"packageId": "<string>",
"namespace": "<string>",
"instanceId": "<string>"
},
"status": "valid",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
],
"file": {
"sourceDraftId": "<string>",
"revision": 1073741824,
"path": "<string>",
"digest": "<string>",
"content": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"source": "platform",
"retryAfterMs": 123,
"operationId": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": {},
"evidence": {
"sessionId": "<string>",
"runId": "<string>",
"journalSeq": 4503599627370495,
"buildHash": "<string>"
}
}Authorizations
Opaque control credential
Path Parameters
Pattern:
^prj_[0-9a-z]{12,32}$Pattern:
^draft_[0-9a-z]{12,32}$Body
application/json
Required range:
0 <= x <= 9007199254740991Pattern:
^sha256:[0-9a-f]{64}$Pattern:
^sha256:[0-9a-f]{64}$Show child attributes
Show child attributes
Maximum array length:
500Show child attributes
Show child attributes
Response
Canonical data preview
Available options:
1 Show child attributes
Show child attributes
Pattern:
^sha256:[0-9a-f]{64}$Show child attributes
Show child attributes
Available options:
valid, invalid, unsupported Maximum array length:
100Show child attributes
Show child attributes
Show child attributes
Show child attributes