Skip to content

Example mapguide4j REST URLs

jumpinjackie edited this page Dec 7, 2012 · 1 revision

Resource Service APIs

Getting the resource content of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/content

Getting the resource header of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/header

List the resource data of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/data

List the resources that reference Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/references

Feature Service APIs

List spatial contexts of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/spatialcontexts

List schema names of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/schemas

Describe Feature Schema (SHP_Schema) of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/schema/SHP_Schema

List class names under the Feature Schema (SHP_Schema) of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/schema/SHP_Schema/classes

Describe Class Definition (SHP_Schema:Parcels) of Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/schema/SHP_Schema/Parcels

List registered FDO providers

GET http://localhost:9000/mapguide/rest/providers

Describe the capabilities of the SDF provider

GET http://localhost:9000/mapguide/rest/providers/OSGeo.SDF/capabilities

List the available data stores for the SQL Server provider based on partial connection parameters (specified in the query string)

GET http://localhost:9000/mapguide/rest/providers/OSGeo.SQLServerSpatial/datastores?Service=(local)\SQLEXPRESS&Username=myuser&Password=mypass

Get the available connection values for the SDF connection property (ReadOnly)

GET http://localhost:9000/mapguide/rest/providers/OSGeo.SDF/connectvalues/ReadOnly

Feature Service APIs - CRUD

Return first 1000 features from (SHP_Schema:Parcels) in Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/features/SHP_Schema/Parcels?maxfeatures=1000

Return parcels whose owner starts with "SCHMITT" (note the %25 to escape the % wildcard)

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/features/SHP_Schema/Parcels?filter=RNAME LIKE 'SCHMITT%25'

Return first 1000 features with restricted list of properties from (SHP_Schema:Parcels) in Library://Samples/Sheboygan/Data/Parcels.FeatureSource

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/features/SHP_Schema/Parcels?properties=Autogenerated_SDF_ID,RNAME,SHPGEOM&maxfeatures=1000

Return first 1000 features from (SHP_Schema:Parcels) in Library://Samples/Sheboygan/Data/Parcels.FeatureSource transformed to WGS84.PseudoMercator (the Google/Bing/OSM coordinate syste,)

GET http://localhost:9000/mapguide/rest/library/Samples/Sheboygan/Data/Parcels.FeatureSource/features/SHP_Schema/Parcels?maxfeatures=1000&transformto=WGS84.PseudoMercator

Coordinate System APIs

List coordinate system categories

GET http://localhost:9000/mapguide/rest/coordsys/categories

List coordinate systems under category of Australia

GET http://localhost:9000/mapguide/rest/coordsys/category/Australia

Get the EPSG code of the coordinate system (mentor code: LL84)

GET http://localhost:9000/mapguide/rest/coordsys/mentor/LL84/epsg

Get the WKT of the coordinate system (mentor code: LL84)

GET http://localhost:9000/mapguide/rest/coordsys/mentor/LL84/wkt

Get the mentor code of the coordinate system (EPSG:4326)

GET http://localhost:9000/mapguide/rest/coordsys/epsg/4326/mentor

Get the WKT of the coordinate system (EPSG:4326)

GET http://localhost:9000/mapguide/rest/coordsys/epsg/4326/wkt

Get the mentor code of the coordinate system wkt

GET http://localhost:9000/mapguide/rest/coordsys/tomentor/GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.01745329251994]]

Get the epsg code of the coordinate system wkt

GET http://localhost:9000/mapguide/rest/coordsys/toepsg/GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.01745329251994]]

Site APIs

The following requests require a session id created from an Administrator account. Anonymous MapGuide session ids are denied access.

Get current site status

GET http://localhost:9000/mapguide/rest/site/status

Get current site version

GET http://localhost:9000/mapguide/rest/site/version

List user groups

GET http://localhost:9000/mapguide/rest/site/groups

List roles for WfsUser

GET http://localhost:9000/mapguide/rest/site/user/WfsUser/roles

List groups for WfsUser

GET http://localhost:9000/mapguide/rest/site/user/WfsUser/groups

List users under group "Everyone"

GET http://localhost:9000/mapguide/rest/site/groups/Everyone/users

Clone this wiki locally