Loading data from any system
API sources are used to represent various systems contributing data to your DCN. Examples of systems from which you may be sourcing data into an API source include DMPs, CDPs, CRMs, and private databases.
You can create a new API source from your DCN UI or using the CLI by running
optable-cli source create api <name>, for example:
$ optable-cli source create api my-example-source
On success, the CLI displays a description of the newly created API source in JSON. You can then push data into the source referring to its displayed
idas described below.
You can specify a data expiry time when creating the API source with the
--expiryoption. The default is that loaded data should never expire. Otherwise the option accepts a positive integer suffixed with either
hto indicate the amount of time elapsed since the last record update (in seconds, minutes, or hours, respectively) until loaded data is automatically purged.
You can also update the
--expiryvalue by updating your API source with the
optable-cli source update apicommand.
You can list all API sources with the CLI by running the
optable-cli source listcommand. The command returns a list of sources encoded in JSON. You can use the excellent jq utility to parse and manipulate JSON from the command line. For example, to list just the names of all API sources:
$ optable-cli source list | jq 'select(.kind == "SOURCE_KIND_API") | .name'
You can push ID profile data into an existing API source using the CLI by running
optable-cli source push <id> --format=<format>where
Examples of how you can structure and load ID profile data through the CLI command can be found in the Identifier Profiles reference page here.