komrad

write_document_type

Create a document type, or rewrite the one id names, passing the version last read.

writesnot idempotentdestructiveCLI onlyAgent

Calling it#

curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/WriteDocumentType \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "<name>",
  "context": "<context>"
}'

Request#

WriteDocumentTypeRequest#

FieldTypeDescription
iduuid

The document type to rewrite, by id. Unset creates a document type.

namestring*

at most 100 characters

must not contain control characters

The document type's name. Renaming a type renames it on its documents too.

contextstring*

at most 1048576 bytes

The markdown an agent reads before writing a document of this type.

versionint32

more than 0

The document type's version when last read. Required on a rewrite.

Response#

WriteDocumentTypeResponse#

FieldTypeDescription
document_typeDocumentType

The document type as written.

Types#

DocumentType#

DocumentType is one kind of document, with the context an agent reads before writing one.

FieldTypeDescription
iduuid*

The document type's id.

namestring

The document type's name, which each document of the type carries as type.

contextstring

The markdown an agent reads before writing a document of this type.

versionint32

How many times the document type has been written.

updated_attimestamp

When the document type was last written.