import { WebApiSDK } from "@parable-platform/web-api-sdk";
import type { PublishArtifactInput } from "@parable-platform/web-api-types";
const sdk = new WebApiSDK({
baseUrl: process.env.PARABLE_API_URL!,
auth: { token: process.env.PARABLE_API_TOKEN! },
requestInterceptor: (config) => ({
...config,
headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
}),
});
const input: PublishArtifactInput = JSON.parse(`{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"artifactId": "550e8400-e29b-41d4-a716-446655440000",
"tableName": "example"
}`);
const result = await sdk.artifacts.publishArtifact(
input
);import json
import os
from parable_types_web_api import PublishArtifactInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = PublishArtifactInput.model_validate(
json.loads("{\"requestId\":\"550e8400-e29b-41d4-a716-446655440000\",\"artifactId\":\"550e8400-e29b-41d4-a716-446655440000\",\"tableName\":\"example\"}"),
)
result = sdk.artifacts.publish_artifact(input_data)use parable_web_api_sdk::{types, ClientConfig, RequestOptions, WebApiSdk};
let sdk = WebApiSdk::new(ClientConfig::with_base_url(
std::env::var("PARABLE_API_URL")?,
Some(std::env::var("PARABLE_API_TOKEN")?),
None,
))?;
let options = RequestOptions::with_header("X-Tenant", std::env::var("PARABLE_WORKSPACE")?, None, None);
let input: types::PublishArtifactInput = serde_json::from_value(
serde_json::json!({
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"artifactId": "550e8400-e29b-41d4-a716-446655440000",
"tableName": "example"
}),
)?;
let result = sdk.artifacts.publish_artifact(
input,
Some(&options)
).await?;sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.PublishArtifactInput
if err := json.Unmarshal([]byte(`{"requestId":"550e8400-e29b-41d4-a716-446655440000","artifactId":"550e8400-e29b-41d4-a716-446655440000","tableName":"example"}`), &input); err != nil {
return err
}
result, err := sdk.ArtifactsNamespace.PublishArtifact(ctx, input){
"data": {
"artifactId": "<string>",
"state": "PENDING",
"workId": "<string>",
"errorCode": "INVALID_SOURCE",
"errorMessage": "<string>",
"tapId": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Publish an Artifact as a data source
Queues a reviewed CSV Artifact for publication. Captures its schema and immutable input, and makes the table available only after successful processing.
import { WebApiSDK } from "@parable-platform/web-api-sdk";
import type { PublishArtifactInput } from "@parable-platform/web-api-types";
const sdk = new WebApiSDK({
baseUrl: process.env.PARABLE_API_URL!,
auth: { token: process.env.PARABLE_API_TOKEN! },
requestInterceptor: (config) => ({
...config,
headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
}),
});
const input: PublishArtifactInput = JSON.parse(`{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"artifactId": "550e8400-e29b-41d4-a716-446655440000",
"tableName": "example"
}`);
const result = await sdk.artifacts.publishArtifact(
input
);import json
import os
from parable_types_web_api import PublishArtifactInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = PublishArtifactInput.model_validate(
json.loads("{\"requestId\":\"550e8400-e29b-41d4-a716-446655440000\",\"artifactId\":\"550e8400-e29b-41d4-a716-446655440000\",\"tableName\":\"example\"}"),
)
result = sdk.artifacts.publish_artifact(input_data)use parable_web_api_sdk::{types, ClientConfig, RequestOptions, WebApiSdk};
let sdk = WebApiSdk::new(ClientConfig::with_base_url(
std::env::var("PARABLE_API_URL")?,
Some(std::env::var("PARABLE_API_TOKEN")?),
None,
))?;
let options = RequestOptions::with_header("X-Tenant", std::env::var("PARABLE_WORKSPACE")?, None, None);
let input: types::PublishArtifactInput = serde_json::from_value(
serde_json::json!({
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"artifactId": "550e8400-e29b-41d4-a716-446655440000",
"tableName": "example"
}),
)?;
let result = sdk.artifacts.publish_artifact(
input,
Some(&options)
).await?;sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.PublishArtifactInput
if err := json.Unmarshal([]byte(`{"requestId":"550e8400-e29b-41d4-a716-446655440000","artifactId":"550e8400-e29b-41d4-a716-446655440000","tableName":"example"}`), &input); err != nil {
return err
}
result, err := sdk.ArtifactsNamespace.PublishArtifact(ctx, input){
"data": {
"artifactId": "<string>",
"state": "PENDING",
"workId": "<string>",
"errorCode": "INVALID_SOURCE",
"errorMessage": "<string>",
"tapId": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Publish an Artifact as a data source
publish_artifactAuthorizations
Headers
Body
Input for publishing a artifact as a provider connection. The artifact
must be READY with a non-null dataSchema. Publish creates a fresh
TenantConnectorTap whose outputSchema is a snapshot copy of
artifact.dataSchema at publish time; the two diverge thereafter.
Optional name overrides the auto-derived {slug(filename)}-{first 8 hex of artifactId}
default; on a unique-index collision the request returns NAME_ALREADY_EXISTS.
tableName becomes the table's name in the data catalog, and SQL reads
the published data under it. It is also stored as the artifact catalogSlug
/ table identity on the published ARTIFACT tap.
Was this page helpful?