JSON-LD API

This section provides some examples regarding the JSON-LD API.

API for Search

The JSON-LD API provides also access to search (implemented through an Apache Solr server), altough the results are not in JSON-LD (as results are provided directly from the Solr server in JSON format).

Action (Search) API Call
Search with "Ηρακλειο" (a misspelled version of the Greek city "Ηράκλειο") component/search.tcl, q=Ηρακλειο
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=Ηρακλειο
Search with "Ηρακλειο" with facet "Subsidy" component/search.tcl, q=Ηρακλειο, fq=type:Subsidy
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=Ηρακλειο&fq=type:Subsidy
List all "Subsidy"s component/search.tcl, q=:, fq=type:Subsidy
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=*:*&fq=type:Subsidy
List all "FinancialDecision"s component/search.tcl, q=:, fq=type:FinancialDecision
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=*:*&fq=type:FinancialDecision
List all "NonFinancialDecision"s component/search.tcl, q=:, fq=type:NonFinancialDecision
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=*:*&fq=type:NonFinancialDecision
List all "Decision"s component/search.tcl, q=:, fq=type:Decision
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=*:*&fq=type:Decision
List all "Contract"s component/search.tcl, q=:, fq=type:Contract
http://platform.yourdatastories.eu/api/json-ld/component/search.tcl?q=*:*&fq=type:Contract

API for Component: grid

Action (Grid Component) API Call
Get project with id (Greek): http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project, lang=el, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project&lang=el
Get project with id (English): http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project, lang=en, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project&lang=en
Get project with id (all available languages): http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project, lang=i18n, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project&lang=i18n
Get types (facets) supported by grids for id: http://linkedeconomy.org/resource/Subsidy/519339 (Types depend on the classes of the provided id) component/grid.tcl/types, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl/types?id=http://linkedeconomy.org/resource/Subsidy/519339
Get related projects of project with id: http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project.related.projects, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project.related.projects
Get related decisions of project with id: http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project.decisions, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project.decisions
Get related financial decisions of project with id: http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project.decisions.financial, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project.decisions.financial
Get related non-financial decisions of project with id: http://linkedeconomy.org/resource/Subsidy/519339 component/grid.tcl, type=project.decisions.non_financial, id=...
http://platform.yourdatastories.eu/api/json-ld/component/grid.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&type=project.decisions.non_financial

API for Component: info

Action (Info Component) API Call
Get information about resource with id:
http://linkedeconomy.org/resource/Subsidy/519339
component/info.tcl, lang=..., id=...
http://platform.yourdatastories.eu/api/json-ld/component/info.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339

API for Component: map

Action (Map Component) API Call
Get the route of project id:
http://linkedeconomy.org/resource/Subsidy/519339
component/map.tcl, lang=..., id=...
http://platform.yourdatastories.eu/api/json-ld/component/map.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&lang=en

API for Component: Pie Chart

Action (Pie Chart Component) API Call
Get types (facets) supported by pie charts for id:
http://linkedeconomy.org/resource/Subsidy/519339 (Types depend on the classes of the provided id)
component/piechart.tcl/types, id=...
http://platform.yourdatastories.eu/api/json-ld/component/piechart.tcl/types?id=http://linkedeconomy.org/resource/Subsidy/519339
Get related financial decisions for project id:
http://linkedeconomy.org/resource/Subsidy/519339
component/piechart.tcl, type=project.decisions.financial, lang=..., id=...
http://platform.yourdatastories.eu/api/json-ld/component/piechart.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&lang=en&type=project.decisions.financial
Get related non-financial decisions for project id:
http://linkedeconomy.org/resource/Subsidy/519339
component/piechart.tcl, type=project.decisions.non_financial, lang=..., id=...
http://platform.yourdatastories.eu/api/json-ld/component/piechart.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&lang=el&type=project.decisions.non_financial

API for Component: Line Chart

Action (Line Chart Component) API Call
Get types (facets) supported by line charts for id:
http://linkedeconomy.org/resource/Subsidy/519339 (Types depend on the classes of the provided id)
component/linechart.tcl/types, id=...
http://platform.yourdatastories.eu/api/json-ld/component/linechart.tcl/types?id=http://linkedeconomy.org/resource/Subsidy/519339
Plot the amount of related financial decisions over time for project id:
http://linkedeconomy.org/resource/Subsidy/519339
component/linechart.tcl, type=project.decisions.financial.amount.over.date, lang=..., id=...
http://platform.yourdatastories.eu/api/json-ld/component/linechart.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&lang=en&type=project.decisions.financial.amount.over.date
Plot number of related financial decisions over time for project id:
http://linkedeconomy.org/resource/Subsidy/519339
component/linechart.tcl, type=project.decisions.financial.decisions.over.date, lang=..., id=...
http://platform.yourdatastories.eu/api/json-ld/component/linechart.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339&lang=el&type=project.decisions.financial.decisions.over.date

API for Component: HeatMap

Action (HeatMap Component) API Call
List the two countries (benefactor and beneficiary) of Aid Activity with id:
http://linkedeconomy.org/resource/AidActivity/NL-1-PPR-10036
component/heatmap.tcl, id=...
http://platform.yourdatastories.eu/api/json-ld/component/heatmap.tcl?id=http://linkedeconomy.org/resource/AidActivity/NL-1-PPR-11839

API for Model Information

Action API Call
Get a list of all classes, their properties, and property types: model/classes.tcl
http://platform.yourdatastories.eu/api/json-ld/model/classes.tcl
Get a list of all their properties and their types for class "PublicProject":
http://linkedeconomy.org/ontology#PublicProject
model/class.tcl, id=...
http://platform.yourdatastories.eu/api/json-ld/model/class.tcl?id=http://linkedeconomy.org/ontology%23PublicProject
Get a list of all their properties and their types for class "Subsidy":
http://linkedeconomy.org/ontology#Subsidy
model/class.tcl, id=...
http://platform.yourdatastories.eu/api/json-ld/model/class.tcl?id=http://linkedeconomy.org/ontology%23Subsidy
Describe object (type: Subsidy):
http://linkedeconomy.org/resource/Subsidy/519339
model/describe.tcl, id=...
http://platform.yourdatastories.eu/api/json-ld/model/describe.tcl?id=http://linkedeconomy.org/resource/Subsidy/519339
Describe object (type: CommittedItem):
http://linkedeconomy.org/resource/CommittedItem/456Ζ7ΛΚ-ΚΚΙ
model/describe.tcl, id=...
http://platform.yourdatastories.eu/api/json-ld/model/describe.tcl?id=http://linkedeconomy.org/resource/CommittedItem/456Ζ7ΛΚ-ΚΚΙ
Describe object in a compact form (type: Subsidy):
http://linkedeconomy.org/resource/Subsidy/519339
model/describe.tcl, compact=1, id=...
http://platform.yourdatastories.eu/api/json-ld/model/describe.tcl?compact=1&id=http://linkedeconomy.org/resource/Subsidy/519339
Describe object in a compact form (type: CommittedItem):
http://linkedeconomy.org/resource/CommittedItem/456Ζ7ΛΚ-ΚΚΙ
model/describe.tcl, compact=1, id=...
http://platform.yourdatastories.eu/api/json-ld/model/describe.tcl?compact=1&id=http://linkedeconomy.org/resource/CommittedItem/456Ζ7ΛΚ-ΚΚΙ
Describe object in a compact form (type: AidActivity):
http://linkedeconomy.org/resource/AidActivity/NL-1-PPR-10040
model/describe.tcl, compact=1, id=...
http://platform.yourdatastories.eu/api/json-ld/model/describe.tcl?compact=1&id=http://linkedeconomy.org/resource/AidActivity/NL-1-PPR-10040&context=0