occtoo cards to manage card definitions, search their entries, and export entries to a file.
Property changes work in two steps. create and edit save them as pending, and activate rebuilds the entries with them.
List and show
show prints the properties in use and the changes that are pending.
Create a card definition
description, tags, displayOptions and properties are optional:
Edit, activate and discard
edit prompts for the name and description in a terminal, or takes JSON. Every field is optional:
pendingChanges replaces everything that is pending, so send the whole set. set adds a property or changes one in use, and remove drops properties in use. To start from what is pending:
activateputs the pending changes to use and waits until the entries are rebuilt. Ctrl-C stops the waiting, not the rebuild.showtells you whether the card definition is stillUpdatingorActive.discardthrows away the pending changes and keeps the properties in use.
Delete a card definition
Search entries
--properties, entries come without values, so name the ones to show.
Search predicates
--where takes a search predicate as JSON. A predicate names the type of the property it compares:
- Kinds:
text,integer,decimal,timestamp,boolean,list,hasValue,segment,relation,lifecycle. Combine them withand,orandnot. - Comparisons, depending on the kind:
eq,neq,in,contains,pattern,regex,lt,lte,gt,gte.
Full request from a file
--file takes the whole request as the API takes it and reads one page. Use it for what the flags don’t cover, such as paging by cursor or facet options:
Find related entries
--properties, --where and --sort name properties of that card. --sort @position follows the order of the relation itself.
It takes the same flags as entries search, except --segment, --lifecycle, --state and --facet. Run occtoo relations list --source-card <CARD> to see the relations of a card.
Export entries
--id.
You can export at most 500,000 entries at once.