In FEED, there is the possibility to set up external jobs, as well as set up a scheduler for these. A typical use case is to communicate with integration services for external systems, such as ERP, Industry Databases, Websites, etc.

You need access to both import and export in the feed API to set up the external job configuration and make it available in feed for executing scheduled jobs. 

Configuration

API endpoints for external jobs are located at https://<hostname>/import. Swagger documentation can be found at https://<hostname>/import/swagger-ui/index.html

To set up an external configuration in feed, the following endpoint can be used:


Here, you must specify at least nameauthMethod, and urlToCall. Additionally, basicUsername and basicPassword must be set.

Note! Only basic auth is supported for authMethod at the moment.

Scheduler

In the scheduler module, you can set up schedules for the service configuration. This is easily done in the GUI by selecting the job type “External”, choosing the desired configuration, and then setting up a cron expression for when this job should run in the feed installation.

Select save cron expression and save scheduler afterwards.


External Service

The external service must implement a trigger endpoint (urlToCall) in the configuration, and communicate with the feed installation by making API calls to update status and add any warnings/errors that occur.

  1. A trigger endpoint that receives calls from the feed installation must be implemented. This must be a POST endpoint and be able to accept a request body. The request body consists of an id field (this is the job ID from the feed and should be used to add log lines and update job status). The name of the external job configuration is also sent in the body (as a String).

Example: 

{ "id": 5, "name": "test konfig" }


  1. Perform API calls to the feed to update the job status.

  2. Perform API calls to the feed to add log lines (warnings/errors/info).


Relevant endpoints in the FEED API


https://<hostname>/import/swagger-ui/index.html


https://<hostname>/export/swagger-ui/index.html

  • No labels