curl --request POST \
--url https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buildInstructions": {
"sources": [
{
"sourceEntityId": "<string>",
"materializedTableId": "<string>",
"physicalTableName": "<string>",
"sourceID": "<string>"
}
],
"referenceManifest": [
{
"sourceEntityId": "<string>",
"physicalTableName": "<string>"
}
],
"strictUpstreams": false
},
"forceRefresh": false,
"sourceNames": [
"<string>"
]
}
'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations"
payload = {
"buildInstructions": {
"sources": [
{
"sourceEntityId": "<string>",
"materializedTableId": "<string>",
"physicalTableName": "<string>",
"sourceID": "<string>"
}
],
"referenceManifest": [
{
"sourceEntityId": "<string>",
"physicalTableName": "<string>"
}
],
"strictUpstreams": False
},
"forceRefresh": False,
"sourceNames": ["<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({
buildInstructions: {
sources: [
{
sourceEntityId: '<string>',
materializedTableId: '<string>',
physicalTableName: '<string>',
sourceID: '<string>'
}
],
referenceManifest: [{sourceEntityId: '<string>', physicalTableName: '<string>'}],
strictUpstreams: false
},
forceRefresh: false,
sourceNames: ['<string>']
})
};
fetch('https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations', 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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations",
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([
'buildInstructions' => [
'sources' => [
[
'sourceEntityId' => '<string>',
'materializedTableId' => '<string>',
'physicalTableName' => '<string>',
'sourceID' => '<string>'
]
],
'referenceManifest' => [
[
'sourceEntityId' => '<string>',
'physicalTableName' => '<string>'
]
],
'strictUpstreams' => false
],
'forceRefresh' => false,
'sourceNames' => [
'<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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations"
payload := strings.NewReader("{\n \"buildInstructions\": {\n \"sources\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"materializedTableId\": \"<string>\",\n \"physicalTableName\": \"<string>\",\n \"sourceID\": \"<string>\"\n }\n ],\n \"referenceManifest\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"physicalTableName\": \"<string>\"\n }\n ],\n \"strictUpstreams\": false\n },\n \"forceRefresh\": false,\n \"sourceNames\": [\n \"<string>\"\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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"buildInstructions\": {\n \"sources\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"materializedTableId\": \"<string>\",\n \"physicalTableName\": \"<string>\",\n \"sourceID\": \"<string>\"\n }\n ],\n \"referenceManifest\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"physicalTableName\": \"<string>\"\n }\n ],\n \"strictUpstreams\": false\n },\n \"forceRefresh\": false,\n \"sourceNames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations")
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 \"buildInstructions\": {\n \"sources\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"materializedTableId\": \"<string>\",\n \"physicalTableName\": \"<string>\",\n \"sourceID\": \"<string>\"\n }\n ],\n \"referenceManifest\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"physicalTableName\": \"<string>\"\n }\n ],\n \"strictUpstreams\": false\n },\n \"forceRefresh\": false,\n \"sourceNames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"environmentId": "<string>",
"packageName": "<string>",
"status": "PENDING",
"manifest": {
"builtAt": "2023-11-07T05:31:56Z",
"entries": {},
"strict": true
},
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}Create a materialization
Creates a materialization and starts building. Behavior depends on the request body (see CreateMaterializationRequest):
- Orchestrated build — supply
buildInstructions. The publisher builds directly into the caller-assigned names derived from the package’s already-compiled build plan (read offPackage.buildPlan). Returns the materialization already building. - Auto-run (standalone, default) — omit
buildInstructions; the publisher self-assigns names and runs all phases in one pass.
curl --request POST \
--url https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buildInstructions": {
"sources": [
{
"sourceEntityId": "<string>",
"materializedTableId": "<string>",
"physicalTableName": "<string>",
"sourceID": "<string>"
}
],
"referenceManifest": [
{
"sourceEntityId": "<string>",
"physicalTableName": "<string>"
}
],
"strictUpstreams": false
},
"forceRefresh": false,
"sourceNames": [
"<string>"
]
}
'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations"
payload = {
"buildInstructions": {
"sources": [
{
"sourceEntityId": "<string>",
"materializedTableId": "<string>",
"physicalTableName": "<string>",
"sourceID": "<string>"
}
],
"referenceManifest": [
{
"sourceEntityId": "<string>",
"physicalTableName": "<string>"
}
],
"strictUpstreams": False
},
"forceRefresh": False,
"sourceNames": ["<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({
buildInstructions: {
sources: [
{
sourceEntityId: '<string>',
materializedTableId: '<string>',
physicalTableName: '<string>',
sourceID: '<string>'
}
],
referenceManifest: [{sourceEntityId: '<string>', physicalTableName: '<string>'}],
strictUpstreams: false
},
forceRefresh: false,
sourceNames: ['<string>']
})
};
fetch('https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations', 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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations",
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([
'buildInstructions' => [
'sources' => [
[
'sourceEntityId' => '<string>',
'materializedTableId' => '<string>',
'physicalTableName' => '<string>',
'sourceID' => '<string>'
]
],
'referenceManifest' => [
[
'sourceEntityId' => '<string>',
'physicalTableName' => '<string>'
]
],
'strictUpstreams' => false
],
'forceRefresh' => false,
'sourceNames' => [
'<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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations"
payload := strings.NewReader("{\n \"buildInstructions\": {\n \"sources\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"materializedTableId\": \"<string>\",\n \"physicalTableName\": \"<string>\",\n \"sourceID\": \"<string>\"\n }\n ],\n \"referenceManifest\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"physicalTableName\": \"<string>\"\n }\n ],\n \"strictUpstreams\": false\n },\n \"forceRefresh\": false,\n \"sourceNames\": [\n \"<string>\"\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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"buildInstructions\": {\n \"sources\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"materializedTableId\": \"<string>\",\n \"physicalTableName\": \"<string>\",\n \"sourceID\": \"<string>\"\n }\n ],\n \"referenceManifest\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"physicalTableName\": \"<string>\"\n }\n ],\n \"strictUpstreams\": false\n },\n \"forceRefresh\": false,\n \"sourceNames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/materializations")
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 \"buildInstructions\": {\n \"sources\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"materializedTableId\": \"<string>\",\n \"physicalTableName\": \"<string>\",\n \"sourceID\": \"<string>\"\n }\n ],\n \"referenceManifest\": [\n {\n \"sourceEntityId\": \"<string>\",\n \"physicalTableName\": \"<string>\"\n }\n ],\n \"strictUpstreams\": false\n },\n \"forceRefresh\": false,\n \"sourceNames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"environmentId": "<string>",
"packageName": "<string>",
"status": "PENDING",
"manifest": {
"builtAt": "2023-11-07T05:31:56Z",
"entries": {},
"strict": true
},
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Name of the environment
Name of the package
Body
Options for starting a materialization. Two modes — (1) auto-run (default), omit buildInstructions and the publisher self-assigns names and runs all phases in one pass; (2) orchestrated build, supply buildInstructions and the publisher builds directly into the caller-assigned names from the package's already-compiled build plan (read off Package.buildPlan).
Orchestrated build. When present, the publisher creates the materialization already building these caller-assigned sources (table id, physical name, realization) into the exact names provided — the caller derived these instructions from Package.buildPlan up front. Omit for auto-run (the publisher self-assigns names and builds all persist sources).
Show child attributes
Show child attributes
Build a new table even when a source's sourceEntityId is unchanged.
Restrict the plan/build to these persist source names. Omit = all persist sources.
Response
Materialization created
A record of one materialization run for a package.
Phase-aware status of a materialization run.
PENDING, MANIFEST_ROWS_READY, MANIFEST_FILE_READY, FAILED, CANCELLED Build output. Null until status = MANIFEST_FILE_READY.
Show child attributes
Show child attributes
Error message if the materialization failed
Materialization metadata including build options, source counts, and durations
Was this page helpful?