When working with the component configurations API,
you usually need to know the componentId.
You can get a list of all available components with the API index call.
It is one of the few API calls that do not require a Storage API token:
It will give you something like this:
From here, you can select a particular component. In the following examples, we
will use keboola.ex-db-mysql — the MySQL Database Extractor.
To obtain configuration details, use the List Configs call,
which will return all the configuration details. This means
the configuration itself (configuration) — section on configuration follows;
configuration rows (rows) — additional data of the configuration; and
Please note that the contents
of the configuration, rows and state section depend purely on the component itself. For example,
retrieving the configurations for MySQL database extractor, you would call:
and obtain a result similar to this:
The important part is the configuration id sample-database-82, which is required in the
When you update a configuration,
actually a new configuration version is created. In the above calls, only the last (active/published) configuration
is returned. To obtain a list of all recorded versions, use the
list versions call.
For example, to return a list of versions of the sample-database-82 configuration for the
keboola.ex-db-mysql component, you would use
which would give you the following output:
The field version represents the version_id in the following API examples.
Creating a Configuration Copy
When you have chosen a particular version, you can create a new independent
out of it. For example, to create a new configuration called test-copy from version 2 of the sample-database-82 configuration
for the keboola.ex-db-mysql component, you would use:
It will return the ID of the newly created configuration: