Provides a JSON-LD representation of the consolidated delta-notifier messages. The services is based on the mu-javascript-template.
The following assumes a semantic works application stack
Include the service in docker-compose.yml
.
jsonld-delta-service:
image: lblod/jsonld-delta-service:1.0.0
volumes:
- ./data/files:/share
- ./config/kalliope:/config
environment:
SECURITY_CONFIG_PATH: "/config/security.json"
DUMP_SUBJECT: "http://data.lblod.info/datasets/delta-producer/dumps/OrganizationsCacheGraphDump"
links:
- db:database
Add the jsonld-delta-service routes to the dispatcher configuration. e.g.:
match "/consolidated/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://jsonld-delta-service/consolidated/"
end
/config/kalliope/security.json
{
"enabled": true,
"allowedIpAddresses": [
"127.0.0.1",
"172.18.0.0/16"
],
"authSource": "/config/source.json",
"authOutput": "/config/output.json"
}
/config/kalliope/source.json
/config/kalliope/output.json
.Example of /config/kalliope/source.json
:
[
{
"username": "boris",
"password": "5678"
},
{
"username": "nordine",
"password": "1234"
}
]
Boot your microservices-enabled system using docker-compose.
cd /path/to/mu-project
docker-compose up
You can shut down using docker-compose stop
and remove everything using docker-compose rm
.
/consolidated
The JSON-LD response contains:
...
],
"@id": "http://mu.semte.ch/graphs/kalliope/consolidated",
"date": "2021-05-27T09:26:03.351256816Z",
"@context": {
"date": {
"@id": "http://purl.org/dc/terms/date",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
}
}