SDI 4 Apps - Uptake of open geographic information through innovative services based on linked data

SensLog API for VGI has been improved during last months. Services and methods were added to meet most of CRUD schema (Create, Retrieve, Update, Delete) of REST services. Other methods will be added during next development.

VGIObservation Service

VGI service alllows to insert new POI, update stored POI, to select POIs by several filters and to add, select, update or delete categories and datasets.

InsertVgiObservation

URL
rest/vgi/observation
Method Functionality Format
POST Provides insertion or update of POI into database. Returns ID of inserted POI, or true if POI was updated. Content-Type: multipart/form-data

Result: plain-text

Parameter Format Role
obs_vgi_id Numerical value Identifier of POI, optional
time_stamp Textual value Timestamp when POI was observed (ISO 8601 compatible), mandatory
category_id Numerical value Identifier of category, mandatory
description Textual value Free text description of POI, optional
attributes Textual value JSON formated additional attributes, optional
dataset_id Numerical value Identifier of dataset, optional
unit_id Numerical value Identifier of device producing POI, mandatory
lon Numerical value Longitude of POI, mandatory
lat Numerical value Latitude of POI, mandatory
alt Numerical value Altitude of POI, optional
dop Numerical value Dilution of precision of position, optional
media File Connected media file, optional
media_type Textual value Name of media type (MIME) of connected file, mandatory if media file is presented

UpdateVgiObservation

URL
rest/vgi/observation/{obs_vgi_id}
Method Functionality Format
PUT Provides update of POI into database. Returns true if POI was updated. plain-text
Parameter Format Role
obs_vgi_id Numerical value Identifier of POI to be updated, mandatory
time_stamp Textual value Timestamp when POI was observed (ISO 8601 compatible), mandatory
category_id Numerical value Identifier of category, mandatory
description Textual value Free text description of POI, optional
attributes Textual value JSON formated additional attributes, optional
dataset_id Numerical value Identifier of dataset, optional
unit_id Numerical value Identifier of device producing POI, mandatory
lon Numerical value Longitude of POI, mandatory
lat Numerical value Latitude of POI, mandatory
alt Numerical value Altitude of POI, optional
dop Numerical value Dilution of precision of position, optional
media File Connected media file, optional
media_type Textual value Name of media type of connected file, mandatory if media file is presented

Select VgiObservations

URL
rest/vgi/observation/
Method Functionality Format
GET Service provides stored POIs in JSON or GeoJSON format by given filters. JSON, GeoJSON

unit_idNumerical valueID of device produced POI, optional

Parameter Format Role
user_name Textual value Name of user that collects POIs, only own user_name or user_name from same group allowed, mandatory
format Textual value Name of output format (geojson, json allowed), optional
dataset_id Numerical value ID of dataset, optional
category_id Numerical value ID of category, optional
extent Textual value Description of extent in format: [Xmin, Ymin, Xmax, Ymax, SRID], optional
from_time Textual value Begin timestamp of frame, optional
to_time Textual value End timestamp of frame, optional

Select VgiObservation

URL
rest/vgi/observation/{obs_vgi_id}
Method Functionality Format
GET Service provides stored POI in JSON or GeoJSON format by given ID. JSON, GeoJSON
Parameter Format Role
obs_vgi_id Numerical value ID of VgiObservation to be selected, mandatory
user_name Textual value Name of user that collects POIs, only own user_name or user_name from same group allowed, mandatory
format Textual value Name of output format (geojson, json allowed), optional

Delete VgiObservation

URL
rest/vgi/observation/{obs_vgi_id}
Method Functionality Format
DELETE Service provides deleting of stored POI by given ID. plain-text
Parameter Format Role
obs_vgi_id Numerical value ID of VgiObservation to be selected, mandatory
user_name Textual value Name of user that collects POIs, only own user_name or user_name from same group allowed, mandatory

Media service

List associated VgiMedia

URL
/rest/vgi/observation/{obs_vgi_id}/media
Method Functionality Format
GET Provides list of stored POI media JSON
Parameter Format Role
obs_vgi_id Numerical value ID of POI
user_name Textual value Name of user

Insert new associated VgiMedia

URL
/rest/vgi/observation/{obs_vgi_id}/media
Method Functionality Consume format
POST Provides storing of new POI media multipart/form-data; charset=UTF-8
Parameter Format Role
obs_vgi_id Numerical value ID of POI, mandatory
media File Connected media file, mandatory
media_type Textual value Name of media type of connected file, mandatory if media file is presented

Update associated VgiMedia file

URL
/rest/vgi/observation/{obs_vgi_id}/media/{media_id}
Method Functionality Consume format
PUT Provides update of new POI media multipart/form-data; charset=UTF-8
Parameter Format Role
obs_vgi_id Numerical value ID of POI, mandatory
media_id Numerical value ID of VgiMedia file, mandatory
media File Connected media file, mandatory
media_type Textual value Name of media type of connected file, mandatory if media file is presented

Get VgiMedia file

URL
/rest/vgi/observation/{obs_vgi_id}/media/{media_id}
Method Functionality Format
GET Provides stored POI media file Depends on media type of stored file
Parameter Format Role
obs_vgi_id Numerical value ID of POI
media_id Numerical value ID of specific VgiMedia file
user_name Textual value Name of user

Delete VgiMedia file

URL
/rest/vgi/observation/{obs_vgi_id}/media/{media_id}
Method Functionality Format
DELETE Provides delete operation of selected POI media file plain-text
Parameter Format Role
obs_vgi_id Numerical value ID of POI
media_id Numerical value ID of specific VgiMedia file
user_name Textual value Name of user

Category service

Select list of VgiCategory

URL
rest/vgi/category/
Method Functionality Format
GET Provides stored categories of POIS JSON

Select specific Vgi Category

URL
rest/vgi/category/{category_id}
Method Functionality Format
GET Provides stored categories of POIS JSON
Parameter Format Role
category_id Numerical value ID of category
user_name Textual value Name of user

Select list of descendats for specific Vgi Category

URL
rest/vgi/category/{category_id}/descendants
Method Functionality Format
GET Provides list of stored categories of POIs JSON
Parameter Format Role
category_id Numerical value ID of category
user_name Textual value Name of user

Dataset service

Select VgiDatasets

URL
rest/vgi/dataset/
Method Functionality Format
GET Provides list of stored datasets of POIs JSON
Parameter Format Role
user_name Textual value Name of user

Insert VgiDataset

URL
rest/vgi/dataset/
Method Functionality Consume format
POST Provides insertion of new dataset of POIs application/json; charset=utf-8
Parameter Format Role
user_name Textual value Name of user

Get VgiDataset

URL
rest/vgi/dataset/{dataset_id}
Method Functionality Format
GET Provides select of specific dataset of POIs application/json; charset=utf-8
Parameter Format Role
dataset_id Numerical value ID of dataset
user_name Textual value Name of user

Delete VgiDataset

URL
rest/vgi/dataset/{dataset_id}
Method Functionality Format
DELETE Provides deletion of specific dataset of POIs plain-text
Parameter Format Role
dataset_id Numerical value ID of dataset
user_name Textual value Name of user
Share this: