Skip to main content
A destination is an API that publishes card entries. A destination has versions, a version has endpoints, and an endpoint returns properties of one card. Wherever a command asks for a version, you can pass latest for the highest one.

From nothing to a published API

  1. Create the destination.
  2. Create its first version, with access and languages.
  3. Add an endpoint. In a terminal, you pick a card and its properties.
  4. Publish the version and wait until it is live.

Destinations

JSON for create. description and tags are optional:
The id is 3 to 50 letters and digits. It becomes part of the address of the published API and can’t change.

Publish

Publishes a version, or the pending content of a published version, and waits until it is live. The version defaults to latest. Progress goes to stderr. Ctrl-C stops the waiting, not the publish. occtoo destinations versions show tells you how far it is.

Versions

The first version takes its settings from prompts or JSON. allowedOrigins and description are optional:
  • authentication is Protected (callers send an access token) or AllowAnonymous. It can’t change later.
  • language is the code callers send. sourceLanguage is the language of the card data served for it.
A later version is a copy of the latest one, with its endpoints, and takes no input. The latest version has to be published first. JSON for versions edit. Every field is optional:

Endpoints

JSON for endpoints create. description, alias, facet, segments and relations are optional:
JSON for endpoints edit. content replaces everything the endpoint returns, so send all of it:
To start from what is there:

Endpoints on a published version

Before its version is published, an endpoint changes at once. On a published version, new content waits as pending until the next occtoo destinations publish. Pending content can add properties, relations and facets, but can’t remove them or change an alias. The name and description are fixed.

Search what an endpoint publishes

Finds the entries that one endpoint publishes, each as the endpoint shows it.