VocalDocscontracts 1.65.0

Archive a decision corpus

DELETE /v1/agents/{agent_id}/decision-corpora/{corpus_id}

PropertyValue
Operationarchive_decision_corpus
GroupDecision corpora
Scopeagents:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited decision_corpus.archive (mutation)
Released in1.58.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Archives the corpus (1.58.0): its cases and runs stay readable, and a later write or run answers 409 decision_corpus_archived; archiving it again answers it as it stands.

Request

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

curl -X DELETE "$VOCAL_API/v1/agents/agt_.../decision-corpora/dcp_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"'

Parameters

NameInTypeRequiredDescription
agent_idpathAgentIdyesThe id of an Agent: agt_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
corpus_idpathDecisionCorpusIdyesThe id of a decision corpus: dcp_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Responses

StatusContent typeShapeError codes
200application/jsonDecisionCorpus
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is DecisionCorpus.

FieldTypeRequiredDescription
agent_idAgentIdyes
archived_atTimestamp or nullyes
case_countintegeryes
created_atTimestampyes
descriptionstring or nullyes
idDecisionCorpusIdyes
namestringyes
object"decision_corpus"yes
question_setQuestionSetKeyyes
revisionintegeryesThe ETag; required in If-Match.
updated_atTimestampyes
versionintegeryesRises by one with each case added or deleted; a run records the version it read.