VocalDocscontracts 1.65.0

Compare two versions of a Prompt template, or a version and the draft

GET /v1/prompt-templates/{prompt_template_id}/diff

PropertyValue
Operationget_prompt_template_diff
GroupPrompt templates
Scopeprompts:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A configuration read; a Prompt template is not Call content.
Released in1.55.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers a line diff per variant, the changed declarations, constants and allowed terms, and the lint findings added and resolved (1.55.0; prompt-manager.md section 7). to omitted compares from with the draft.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the prompts:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl "$VOCAL_API/v1/prompt-templates/ptpl_.../diff?from=1" \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
prompt_template_idpathPromptTemplateIdyesThe id of a Prompt template: ptpl_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
fromqueryintegeryesThe version compared from.
toqueryintegernoThe version compared to; the draft when omitted.

Responses

StatusContent typeShapeError codes
200application/jsonPromptTemplateDiff
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is PromptTemplateDiff.

FieldTypeRequiredDescription
declarationsarray of PromptDeclarationDiffyesThe declarations, constants and allowed terms that differ.
from_versionintegeryes
lint_addedarray of PromptLintFindingyesThe findings the to side has and the from side lacks, by code and path.
lint_resolvedarray of PromptLintFindingyesThe findings the from side has and the to side lacks, by code and path.
object"prompt_template_diff"yes
prompt_template_idPromptTemplateIdyes
to_revisioninteger or nullyesThe draft revision compared to when to_version is null; null otherwise.
to_versioninteger or nullyesThe version compared to, or null for the draft.
variantsarray of PromptVariantDiffyesEvery variant key of either side, default first.