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
| Header | Value and purpose |
|---|---|
Authorization | Use Bearer $PROKRUST_TOKEN for a Kubernetes caller authorized for this operation. Browser calls use the signed-in session. |
Content-Type | application/json selects ProtoJSON for this unary request. |
Connect-Protocol-Version | 1 selects version 1 of the Connect protocol. |
Request fields
| JSON field | Type | Meaning |
|---|---|---|
workspace | string | Name of the workspace namespace in which the caller starts or reads the profile. |
idempotencyKey | string | Use v1:<Unix seconds>:<lowercase UUIDv4> dated at creation. Retry with the same key and request body. A new key permits a separate run. |
definition | ProfileDefinition | Connection, versioned selector and Table conversion recipe to inspect. |
mode | ProfileMode | Choose metadata, sample or full scan according to how much source data the caller authorizes. |
metrics | list of MetricRequest | Statistics to compute in sample or full-scan mode. Metadata mode requires an empty list. |
budget | Budget | Absolute deadline within ten minutes, positive source-byte limit and explicit staged-byte limit. Sample and full scan require positive staged bytes. |
sample | SampleSpec (explicit presence) | Row and partition limits for sample mode. |
buckets | TimeBuckets (explicit presence) | UTC boundaries and width required when requesting a time-bucket metric. |
allowFullScan | bool | Set true to authorize full-scan mode. Sample and metadata requests must leave this false. |
previewRows | uint32 | Number 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
| JSON field | Type | Meaning |
|---|---|---|
profileUid | string | UID to pass to GetTableProfile or CancelTableProfile. |
idempotencyExpiresAt | RFC 3339 timestamp | Time 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"
}