VocalDocscontracts 1.65.0

Read a decision corpus

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

PropertyValue
Operationget_decision_corpus
GroupDecision corpora
Scopeagents:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A metadata read; a corpus holds no case content.
Released in1.58.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Request

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

curl "$VOCAL_API/v1/agents/agt_.../decision-corpora/dcp_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

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.

Responses

StatusContent typeShapeError codes
200application/jsonDecisionCorpus
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
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.