Run a Job

A job represents a work being done in Keboola. You can create (run) a job from the UI or via scheduled Orchestrations or Flows. A job can also be created manually via the API. The easiest way to get started is to create a configuration of the component you want to run and run it manually in the UI. Once you’re satisfied with the result, look at the successful job:

Screenshot -- Job Parameters

In the job detail, you can see the parameters required to run the configuration, in this case:

mode: run
component: keboola.ex-db-snowflake
config: 493493

Then create a Storage API token which you will use to run the API requests (if you don’t have one already). We recommend to create as restricted token as possible – in this case limit it to to the component with ID keboola.ex-db-snowflake:

Screenshot -- Token Settings

Then use the Create Job API call to create a job with the same parameters (see example):

curl --location --request POST 'https://queue.keboola.com/jobs' \
--header 'X-StorageApi-Token: YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "mode": "run",
    "component": "keboola.ex-db-snowflake",
    "config": "493493"
}'

Take care to use the right endpoint depending on which Stack are you using. You’ll see Invalid access token error message if you are using the wrong endpoint or token. Read more about the concept of Jobs.