Skip to main content

TableProfileService.StartTableProfile

Start profiling a Table recipe in the caller’s workspace. The example inspects metadata for a synthetic events connection and uses event_id as the primary key. Use the actual connection UID, a freshly dated idempotency key and a future deadline within ten minutes. ProtoJSON encodes selector and recipe JSON bytes in base64. An identical retry with the same key returns the original profile UID.

TableProfileService · Installed Web API. Use the HTTPS origin of your Prokrust installation and credentials authorized for this operation.

POST /prokrust.profile.v1.TableProfileService/StartTableProfile

Request headers​

HeaderValue and purpose
AuthorizationUse Bearer $PROKRUST_TOKEN for a Kubernetes caller authorized for this operation. Browser calls use the signed-in session.
Content-Typeapplication/json selects ProtoJSON for this unary request.
Connect-Protocol-Version1 selects version 1 of the Connect protocol.

Request fields​

StartTableProfileRequest

JSON fieldTypeMeaning
workspacestringName of the workspace namespace in which the caller starts or reads the profile.
idempotencyKeystringUse v1:<Unix seconds>:<lowercase UUIDv4> dated at creation. Retry with the same key and request body. A new key permits a separate run.
definitionProfileDefinitionConnection, versioned selector and Table conversion recipe to inspect.
modeProfileModeChoose metadata, sample or full scan according to how much source data the caller authorizes.
metricslist of MetricRequestStatistics to compute in sample or full-scan mode. Metadata mode requires an empty list.
budgetBudgetAbsolute deadline within ten minutes, positive source-byte limit and explicit staged-byte limit. Sample and full scan require positive staged bytes.
sampleSampleSpec (explicit presence)Row and partition limits for sample mode.
bucketsTimeBuckets (explicit presence)UTC boundaries and width required when requesting a time-bucket metric.
allowFullScanboolSet true to authorize full-scan mode. Sample and metadata requests must leave this false.
previewRowsuint32Number of converted sample rows to return for inspection, at most 100 and no more than the sample row limit.

Example request​

Set PROKRUST_URL to the installation’s HTTPS origin and PROKRUST_TOKEN to your caller token. Replace the sample values with values from your installation.

curl --fail-with-body --silent --show-error \
-H "Authorization: Bearer $PROKRUST_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Connect-Protocol-Version: 1' \
"$PROKRUST_URL/prokrust.profile.v1.TableProfileService/StartTableProfile" \
--data-binary @- <<'JSON'
{
"workspace": "analytics",
"idempotencyKey": "v1:1773144000:00000000-0000-4000-8000-000000000007",
"definition": {
"connection": {
"apiVersion": "sources.prokrust.ai/v1beta1",
"kind": "SyntheticConnection",
"namespace": "analytics",
"name": "fixture",
"uid": "00000000-0000-4000-8000-000000000003"
},
"selector": {
"schemaVersion": "v1",
"canonicalJson": "eyJkYXRhc2V0IjoiZXZlbnRzIn0="
},
"canonicalRecipeJson": "eyJjb2x1bW5zIjpbeyJuYW1lIjoiZXZlbnRfaWQiLCJwaHlzaWNhbFR5cGUiOiJVdGY4Iiwic2VtYW50aWNUeXBlIjoiSWQiLCJmZWF0dXJlIjpmYWxzZX1dLCJwcmltYXJ5S2V5IjoiZXZlbnRfaWQiLCJmZWF0dXJlVGltZVBvbGljeSI6IlN0YXRpYyJ9"
},
"mode": "PROFILE_MODE_METADATA",
"budget": {
"deadline": "2026-03-10T12:02:00Z",
"maxSourceBytes": "1048576",
"maxStagedBytes": "0"
}
}
JSON

Response fields​

StartTableProfileResponse

JSON fieldTypeMeaning
profileUidstringUID to pass to GetTableProfile or CancelTableProfile.
idempotencyExpiresAtRFC 3339 timestampTime at which the idempotency key expires, 30 days after its issue time. An expired key cannot start a new operation.

Example response​

{
"profileUid": "00000000-0000-4000-8000-000000000006",
"idempotencyExpiresAt": "2026-04-09T12:00:00Z"
}