This integration is work in progress
Integration to Urban Environment Divisions Allu system. Allu contains decisions documents related to public area usage in Helsinki.
Allu API documentation: https://allu.kaupunkiymparisto.fi/external/swagger-ui/index.html.
Relevant parts for paatokset is search endpoints for decision and approval documents. Paatokset runs a migration (@todo UHF-10567) which imports metadata about decision files from these search endpoints to Drupal entities. These entities are indexed to elasticsearch (@todo UHF-10975), which is to render frontend search component (@todo UHF-10566).
The PDF files are not publicly accessible from Allu, since the api requires authentication, so the public links proxy the files from Allu API.
Allu documents are imported with a Drupal migration. The migration imports documents that have been created within one week and older content can be imported with a Drush command. Under the hood, the Drush command just runs the same migration with different parameters.
Import most recent documents:
drush migrate:import allu_decisions
drush migrate:import allu_approvals
Import historical data:
drush allu:run-allu-migration allu_decisions --start="-5 year" --update
Check all available parameters with --help
option.
Using this integration locally requires allu credentials in your local.settings.php
file. The value can be found from Confluence.
// local.settings.php
$config['helfi_api_base.api_accounts']['vault'][] = [
'id' => 'allu',
'plugin' => 'json',
'data' => json_encode([
'username' => 'hel_fi_paatokset_staging',
'password' => '<< password from confluence >>',
]),
];
Optionally, configure Allu base URL to use production environement.
// local.settings.php
$config['paatokset_allu.settings']['base_url'] = 'https://allu.kaupunkiymparisto.fi';