Skip to main content
A card definition says which properties of which sources make up the entries of a card. Use 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

In a terminal, you pick a source and its properties. Otherwise, pass JSON. description, tags, displayOptions and properties are optional:
The card definition is saved as a draft. A property id is a lowercase letter followed by letters and digits. Its type is the type of the source property, and it can’t change once the property is in use.

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:
  • activate puts the pending changes to use and waits until the entries are rebuilt. Ctrl-C stops the waiting, not the rebuild. show tells you whether the card definition is still Updating or Active.
  • discard throws away the pending changes and keeps the properties in use.

Delete a card definition

Deletes a card definition for good. It is refused while destination endpoints, relations or segments use the card.

Search entries

Finds entries of a card, with their values and how far they have come in a lifecycle. Without --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 with and, or and not.
  • 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:
Finds the entries that a relation links to one entry. The arguments are the card definition, the entry id and the relation id. The entries come from the card on the other side of the relation, so --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

Exports entries of a card to a CSV or Excel file and downloads it. Occtoo writes the file in the background, and the CLI shows the progress, waits and saves the file. Ctrl-C stops the waiting, not the export. Pick it up again with --id. You can export at most 500,000 entries at once.