Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Tutorial city & country

Marc Dutoo edited this page Jun 11, 2014 · 6 revisions

Here's a Datacore quickstart tutorial using the existing sample (country and city) :

Using a web browser, go to http://srv2-polenum.fingerprint-technologies.net and use the online UI to do the following HTTP operations :

WARNING: The following URLs won't work because of authentication, rather use the online UI (Swagger), which allows to provide Basic Auth in development mode or a valid OAuth Access Token (gotten ex. through a Request Bin).

GET http://srv2-polenum.fingerprint-technologies.net/dc/model lists existing models (including sample.city.country, sample.city.city and sample.city.pointOfInterest), with a sample data resource in their "documentation" field

GET http://srv2-polenum.fingerprint-technologies.net/dc/type/sample.city.country lists data resources that are of the sample.city.country type (there are 5 example ones for now)

GET http://srv2-polenum.fingerprint-technologies.net:80/dc/type/sample.city.city lists data resources that are of the sample.city.city type (there are 3 example ones for now)

PUT http://srv2-polenum.fingerprint-technologies.net/dc/type/sample.city.city/France/Lyon updates the Lyon city with the information provided in request body, ex. :

{
    "uri": "http://data.oasis-eu.org/dc/type/sample.city.city/France/Lyon",
    "version": 1, /* must be the latest one */
    "inCountry": "http://data.oasis-eu.org/dc/type/sample.city.country/France",
    "name": "Lyon",
    "populationCount": 500001
}

GET http://srv2-polenum.fingerprint-technologies.net/dc/type/sample.city.city/France/Lyon shows the updated version of Lyon.