Skip navigation

VGI module

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.

VgiObservationService

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

Field Details
URL /rest/vgi/observation
Method POST
Functionality Provides insertion or update of POI into database. Returns ID of inserted POI, or true if POI was updated.
Format Content-Type: multipart/form-data, Result: text/plain
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 (PUT)

Field Details
URL /rest/vgi/observation/{obs_vgi_id}
Method PUT
Functionality Provides update of POI into database. Returns true if POI was updated.
Format text/plain
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

SelectVgiObservations (GET)

Field Details
URL /rest/vgi/observation/
Method GET
Functionality Service provides stored POIs in JSON or GeoJSON format by given filters.
Format JSON, GeoJSON
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

SelectVgiObservation (GET Single)

Field Details
URL /rest/vgi/observation/{obs_vgi_id}
Method GET
Functionality Service provides stored POI in JSON or GeoJSON format by given ID.
Format 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

DeleteVgiObservation (DELETE)

Field Details
URL /rest/vgi/observation/{obs_vgi_id}
Method DELETE
Functionality Service provides deleting of stored POI by given ID.
Format text/plain
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

VgiMedia service

ListVgiMedia

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

InsertVgiMedia

Field Details
URL /rest/vgi/observation/{obs_vgi_id}/media
Method POST
Functionality Provides storing of new POI media
Consume format 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

UpdateVgiMedia

Field Details
URL /rest/vgi/observation/{obs_vgi_id}/media/{media_id}
Method PUT
Functionality Provides update of new POI media
Consume format 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

GetVgiMedia

Field Details
URL /rest/vgi/observation/{obs_vgi_id}/media/{media_id}
Method GET
Functionality Provides stored POI media file
Format 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

DeleteVgiMedia

Field Details
URL /rest/vgi/observation/{obs_vgi_id}/media/{media_id}
Method DELETE
Functionality Provides delete operation of selected POI media file
Format text/plain
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

VgiCategory Service

SelectVgiCategories

Field Details
URL /rest/vgi/category/
Method GET
Functionality Provides stored categories of POIs
Format JSON

SelectVgiCategory

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

SelectVgiCategory descendants

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

VgiDatasetService

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

InsertVgiDataset

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

GetVgiDataset

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

DeleteVgiDataset

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

Last update: 14th February 2017