Service Configuration & Job Execution

There are two steps necessary to start the geo enrichment service.

  1. Create a config and store the config id
  2. Execute a config as a job and monitor the job

Setup enrichment configuration

The following call will setup a enrichment configuration for a specific publisher / datasource with all services enabled.

curl --location --request POST 'https://proxy.opendatagermany.io/api/ts/v1/kg/geo/enrich/configs' \
--header 'X-PUBLISHER: {{publisherUUID}}' \
--header 'X-DATASOURCE: {{datasourceUUID}}' \
--header 'x-api-key: $API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "enablePostalAddressNormalisation": true,
    "enableGeoEnrichment": true,
    "enableWhatThreeWords": true
}'

which should return the following response

{
    "id": "63ea000b3ec7360e1c59747e",
    "publisher": "{{publisherUUID}}",
    "datasource": "{{datasourceUUID}}",
    "enablePostalAddressNormalisation": true,
    "enableGeoEnrichment": true,
    "enableWhatThreeWords": true
}

The important part is the "id": "63ea000b3ec7360e1c59747e"which contains the configuration id.

This config is now also active for each import or update operation.

Note: The endpoint https://proxy.opendatagermany.io/api/ts/v1/kg/geo/enrichalso allows to get or delete all configuration for a certain publisher/datasource pair.

Executing a background job

A HTTP Post call to the endpoint https://proxy.opendatagermany.io/api/ts/v1/kg/geo/enrich/jobs/{{configId}} with the configuration id starts the background job

curl --location --request POST 'https://proxy.opendatagermany.io/api/ts/v1/kg/geo/enrich/jobs/{{configId}}' \
--header 'X-PUBLISHER: {{publisherUUID}}' \
--header 'X-DATASOURCE: {{datasourceUUID}}' \
--header 'x-api-key: $API_KEY' \
--header 'Content-Type: application/json' \

The response of this call contains a job id which can be used to monitor or abort the geo enrichment job.
A HTTP GET on https://proxy.opendatagermany.io/api/ts/v1/kg/geo/enrich/jobs/{executionJobId}returns the current job status and a HTTP DELETE would abort the job