Sign inSign up

linkeddatacenter/lodmap2d-api

By linkeddatacenter

•Updated almost 7 years ago

A microservice to feed a LODMAP2D

Image
0

464

linkeddatacenter/lodmap2d-api repository overview

ldc

⁠API for LODMAP2D application

LODMAP2D-api is a set of linked data resources to feed a LODMAP2D application⁠. The code queries a Bubble Graph Ontology⁠ contained into a knowledge graph through a SPARQL service endpoint.

LODMAP2D-api exposes the following resources:

resourcepayload
/[domain_id/]app[.extension]common LODMAP2D application layout data.
/[domain_id/]table-view[.extension]LODMAP2D tableview metadata
/[domain_id/]partitions[.extension]LODMAP2D data for all partition views with account index
/[domain_id/]account-view[.extension]LODMAP2D data for AccountView and related perspective
/[domain_id/]accounts-index[.extension]LODMAP2D data for all account
/[domain_id/]account/account_id[.extension]LODMAP2D data for a account_id account.
/[domain_id/]credits[.extension]LODMAP2D application credits data
/[domain_id/]terms[.extension]LODMAP2D application terms & conditions data
/bgo[.extension]returns all BGO data in the knowledge graph

These APIs are designed to support this LODMAP2d config rules:

[
    { "regexp": ".*", "targets": [LODMAP2D_DATA + "app.ttl"] },
    { "regexp": ".*/(table|partition|account).*$", "targets": [LODMAP2D_DATA + "accounts-index.ttl"] },
    { "regexp": ".*/table$", "targets": [LODMAP2D_DATA + "table-view.ttl"], "isLast": true },
    { "regexp": ".*/partition/(\\w+)$", "targets": [LODMAP2D_DATA + "partitions.ttl"], "isLast": true },
    { "regexp": ".*/account/(\\w+)$", "targets": [LODMAP2D_DATA + "account-view.ttl", LODMAP2D_DATA + "account/$1.ttl"], "isLast": true },
    { "regexp": ".*/(credits|terms)$", "targets": [LODMAP2D_DATA + "$1.ttl"], "isLast": true }
 ]

where LODMAP2D_DATA contains the URL of the api server.

LODMAP2D-api recognizes the following environment variables:

  • LODMAP2D_BACKEND refers to the SPARQL service endpoint URL (defaults to http://sdaas:8080/sdaas/sparql⁠ ) of a knowledge graph containing a BGO
  • LODMAP2D_CORS_ALLOWEDORIGINS that defaults to '*'
  • LODMAP2D_CACHE_EXPIRE resource expiration time. Defaults to '+1 hour', accepts any valid DateTime string⁠

See LODMAP2D-api repositoty⁠ for more info,

Tag summary

Content type

Image

Digest

Size

142.8 MB

Last updated

almost 7 years ago

docker pull linkeddatacenter/lodmap2d-api