import { WebApiSDK } from "@parable-platform/web-api-sdk";
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 query = {};
const result = await sdk.artifacts.artifactDataPreview(
"example",
query
);import os
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"]},
)
)
result = sdk.artifacts.artifact_data_preview('example', limit=None)use parable_web_api_sdk::{namespaces, 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 query = namespaces::artifacts::ArtifactDataPreviewQueryParams {
limit: None,
};
let result = sdk.artifacts.artifact_data_preview(
serde_json::from_value(serde_json::json!("example"))?,
Some(&query),
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
}
query := &namespaces.ArtifactsArtifactDataPreviewQueryParams{}
result, err := sdk.ArtifactsNamespace.ArtifactDataPreview(ctx, "example", query){
"data": {
"rows": [
{}
],
"schema": {},
"truncated": true,
"inference": {
"columnMetadata": [
{
"confidence": "low",
"demoted": true,
"fieldPath": "<string>",
"sampleFailures": 0,
"sampleSeen": 0,
"firstSampleError": "<string>"
}
],
"model": "<string>",
"schema": {},
"tokenInputCount": 0,
"tokenOutputCount": 0,
"processor": "VERTEX"
}
},
"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>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Preview an Artifact's rows
Returns the first few rows of an uploaded file so you can see what is in it before doing anything with it.
import { WebApiSDK } from "@parable-platform/web-api-sdk";
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 query = {};
const result = await sdk.artifacts.artifactDataPreview(
"example",
query
);import os
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"]},
)
)
result = sdk.artifacts.artifact_data_preview('example', limit=None)use parable_web_api_sdk::{namespaces, 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 query = namespaces::artifacts::ArtifactDataPreviewQueryParams {
limit: None,
};
let result = sdk.artifacts.artifact_data_preview(
serde_json::from_value(serde_json::json!("example"))?,
Some(&query),
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
}
query := &namespaces.ArtifactsArtifactDataPreviewQueryParams{}
result, err := sdk.ArtifactsNamespace.ArtifactDataPreview(ctx, "example", query){
"data": {
"rows": [
{}
],
"schema": {},
"truncated": true,
"inference": {
"columnMetadata": [
{
"confidence": "low",
"demoted": true,
"fieldPath": "<string>",
"sampleFailures": 0,
"sampleSeen": 0,
"firstSampleError": "<string>"
}
],
"model": "<string>",
"schema": {},
"tokenInputCount": 0,
"tokenOutputCount": 0,
"processor": "VERTEX"
}
},
"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>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Preview an Artifact's rows
preview_artifact_rowsAuthorizations
A personal access token, which starts with pat_. A Parable token can call each operation that the roles of its owner allow. An MCP token can call only the read operations that are open to agents. A SQL token does not work on this API.
Headers
Workspace slug. Overrides subdomain-based workspace resolution when provided.
"acme"
Optional request correlation ID echoed back in the response.
"550e8400-e29b-41d4-a716-446655440000"
Path Parameters
artifactId parameter UUID v4 with automatic base62 encoding for client-facing APIs
Query Parameters
Response
Successful response
Server-side preview of the data backing an artifact, used by the schema editor. The schema describing the row shape is returned alongside the data so consumers can render without a separate fetch.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?