curl --request GET \
--url https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}', 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}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sourceName": "<string>",
"dimension": "<string>",
"modelFilePath": "<string>",
"status": "PENDING",
"error": "<string>",
"stale": true,
"staleSince": "2023-11-07T05:31:56Z",
"staleReasons": [
"FRESHNESS_WINDOW_EXCEEDED"
],
"rowCount": 123,
"lastIndexedAt": "2023-11-07T05:31:56Z",
"scope": "version",
"refresh": "<string>",
"freshnessWindowSeconds": 123,
"freshnessFallback": "live",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Get an index
curl --request GET \
--url https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}', 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}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/environments/{environmentName}/packages/{packageName}/versions/{versionId}/indexes/{indexId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sourceName": "<string>",
"dimension": "<string>",
"modelFilePath": "<string>",
"status": "PENDING",
"error": "<string>",
"stale": true,
"staleSince": "2023-11-07T05:31:56Z",
"staleReasons": [
"FRESHNESS_WINDOW_EXCEEDED"
],
"rowCount": 123,
"lastIndexedAt": "2023-11-07T05:31:56Z",
"scope": "version",
"refresh": "<string>",
"freshnessWindowSeconds": 123,
"freshnessFallback": "live",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
Path Parameters
Response
Index retrieved successfully
A version's serving anchor for one indexed (#(index)-tagged) dimension.
It binds the version to the content-addressed, package-scoped built index
(shared across versions, and — when the source is materialized — derived
from the materialized table). That underlying artifact and its content
address are internal and never exposed here.
True when this index is serving non-current data for any reason
(docs/persistence.md §9.7). Unifies the reused-over-failed-source case
(SOURCE_BUILD_FAILED) with age-based staleness against a declared
index freshness.window (FRESHNESS_WINDOW_EXCEEDED, §9.5). The
machine-readable cause(s) are in staleReasons. Display-only: the
index still serves its prior values. False/absent otherwise.
The machine-readable staleness cause(s) (§9.7). Empty when fresh.
Machine-readable cause for an artifact's staleness (docs/persistence.md
§9.7 — one indicator, orthogonal reasons). Split into GATING reasons
(their presence sets stale=true) and ANNOTATION reasons (they explain
why an already-stale artifact keeps aging, never flip it on their own):
FRESHNESS_WINDOW_EXCEEDED(gating) — data age passed the declaredfreshness.window(§9.3 tables, §9.5 indexes).SOURCE_BUILD_FAILED(gating) — serving prior values because this version's source materialization FAILED (the reused-over-failed case, generalized; symmetric for a source whose latest rebuild failed while a prior generation still serves).REFRESH_IN_PROGRESS(annotation) — a scheduled refresh has fired but no fresher generation has landed yet (self-heals).LAST_REFRESH_FAILED(annotation) — the refresh stream was disarmed after repeated fires without landing a fresher generation.WINDOW_BELOW_BUILD_TIME(annotation) — the declared freshness window is shorter than the estimated build duration, so the objective is physically unachievable (the rebuild cannot complete inside the window). The window needs widening, or what it covers reducing.
FRESHNESS_WINDOW_EXCEEDED, SOURCE_BUILD_FAILED, REFRESH_IN_PROGRESS, LAST_REFRESH_FAILED, WINDOW_BELOW_BUILD_TIME The scope mode this index was built under (replaces the removed
per-dimension sharing): version = version-owned; package =
reusable across the package's own versions when fresh. Null = unknown.
The dimension-grain analog of Materialization.scope, and — like it —
a per-anchor convenience mirror of the canonical Version.scope
(declared once at the package-manifest root, uniform across the
version), not an independent per-dimension knob.
NOTE (current phase): unlike Materialization.scope, this value is
display metadata only — it does NOT isolate the index artifact. Index
artifacts remain content-addressed by index_entity_id and are
reused across versions regardless of scope (identical definition +
data identity ⇒ identical index, so reuse is result-correct). A
version-scoped index therefore records its owning version but may
still share one physical artifact with another version that binds the
same address; per-version artifact isolation lands with the
index-cadence scheduler (persistence.md §9.5).
version, package Was this page helpful?