Touchgeo Help

REST Endpoints and JSON Objects

 

http://MyServerName/REST/DataService/

Ping test - returns string "Touchgeo REST Data Services";

 

http:// MyServerName /REST/DataService/Map/{mapID}/Feature/{layerID}/Get/New

Get a new blank Feature for client to populate and later insert

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the feature to create

 

http://MyServerName/REST/DataService/Map/{mapID}/Feature/{layerID}/Get/ID/{featureID}

Get a Feature by its primary key ID

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the feature to get
  • featureID – the PK of the feature

 

http://MyServerName/REST/DataService/Map/{mapID}/Feature/{layerID}/Get/Extent/{extent}?primaryIdentifyFieldOnly={pifo}&userID={uId}&role={callerRole}

Get a Feature using an envelope spatial filter

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the feature to get
  • extent – serialized (string) isc.rim.envelope
  • primaryIdentifyFieldOnly – if true, only returns the primary field information and omits all other attributes specified in the layer metadata. This is used by the client identify function.
  • userID – filters the results by the specified user ID
  • role - the caller role. If it matches a role in the RolesWhereQueriesAreLimitedByUserID list, then records are filtered to show only records created/last-updated by this user.

 

http://MyServerName/REST/DataService/Map/{mapID}/Feature/{layerID}/Get/PartialMatchValue/?match={pmv}&userID={uId}&role={callerRole}&limitQueriesToUserID={lqbuid}

Get a result-set of Feature instances based on a partial string match against the Feature’s primary identify field

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the feature to search
  • match – the partial match string
  • userID – filters the results by the specified user ID
  • role - the caller role. If it matches a role in the RolesWhereQueriesAreLimitedByUserID list, then records are filtered to show only records created/last-updated by this user.
  • limitQueriesToUserID – if true, forces filtering by user ID otherwise the filtering requirement is determined by a possible role match above

 

http:// MyServerName /REST/DataService/Map/{mapID}/Feature/{layerID}/Remove

Post a Feature for its removal (deletion)

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the feature to remove
  • Must include an instance of Feature as a POST parameter

 

http:// MyServerName /REST/DataService/Map/{mapID}/Feature/{layerID}/Set

Post a Feature for insertion (if a new record and no PK provided in the Feature) or update (if an existing record with a PK provided in the Feature)

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the feature to insert/update
  • Must include an instance of Feature as a POST parameter

 

http:// MyServerName /REST/DataService/Map/{mapID}/LayerDefinitions

Get a collection of Layer instances for the supplied map

  • mapID – the MapDotNet UX map file map ID
  • Must include an instance of Feature as a POST parameter

 

http:// MyServerName /REST/DataService/Photo/{userID}/Upload

Post a new Photo instance for a specified user to the cloud

 

  • userID – the PK id of the user submitting the photo
  • Must include an instance of Photo as a POST parameter

 

 

http:// MyServerName /REST/DataService/Map/{mapID}/FieldMappings/{layerID}

Get a collection of Mapping instances for the supplied map and layer

  • mapID – the MapDotNet UX map file map ID
  • layerID – the layer ID in the map representing the layer to retrieve mappings

 



Feature (represents a record with storage in SQL Server and optionally Dynamics CRM)

  • public string[] Fields – the human-readable field names
  • public string[] FieldTypes; - the field data types
  • public bool[] FieldDisplay; - true to display in the editor, false to hide
  • public bool[] FieldReadOnly; - true if read-only in the editor
  • public bool[] FieldRequired; - true if a value is required on an insert/update
  • public string[][][] LookupValues; - arrays of lookup values for FieldType ‘lookup’ (each lookup value is an array based on the field list)
  • public string[] LinkTexts; - the display values for hyperlinks
  • public string[] Values; - the values
  • public string ShapeWkt; - the geometry
  • public string Tag; - version tag which is updated when the record is modified
  • public string SessionToken; - authentication token allowing write access

 

Layer (represents the metadata for a layer in the map)

  • public string LayerId; - the layer ID
  • public string LayerName; - human-readable layer name
  • public string FeatureType; - the feature geometry type (polygon, point, line-string, etc.)
  • public string PrimaryIdentifyReadable; - the human-readable field name for the primary identify field
  • public string SqlColumnNameForUserId - the SQL column name for the creator/last-update user ID
  • public string SqlColumnNameForDate; - the SQL column name for a date stamp
  • public string SqlColumnNameForDateStart; - the SQL column name for the start of a date range
  • public string SqlColumnNameForDateEnd; - the SQL column name for the end of a date range
  • public bool DefaultActive; - true if this is the layer initially active (selected) in the legend
  • public string[] RolesWhereLayerIsUnavailable - roles where this layer is unavailable
  • public string[] RolesWhereLayerIsNotEditable - roles where this layer is not editable
  • public string[] RolesWhereQueriesAreLimitedByUserId - roles where queries/searches limited to the user's data
  • public string[] RolesWhereMapFeaturesAreLimitedByUserID - roles where map features are filtered to the user
  • public bool DisableCreate; - true if create (add) is disabled in the application
  • public bool DisableUpdate; - true if update is disabled in the application
  • public bool DisableDelete; - true if delete is disabled in the application
  • public bool ShapeIsReadonlyInUpdateMode; - true if the geometry of the feature is read-only
  • public bool Visible; - true if the layer is initially visible
  • public string[] ClassIds; - collection of classification IDs for the layer
  • public double[] ClassMinScales; - collection of classification minimum scale values
  • public double[] ClassMaxScales; - collection of classification maximum scale values
  • public string[] ClassExacts; - collection of class exact values
  • public double[] ClassMinRanges; - collection of class minimum ranges
  • public double[] ClassMaxRanges; - collection of class maximum ranges

 

Photo (represents a photo image record)

  • public string ImageData; - base64 encoded image data
  • public string Ext; - the image type extension (png or jpg)
  • public string SessionToken; - authentication token allowing create access

 

Mapping (represents an instance of field-mapping metadata [see Touchgeo layer metadata for details])

  • public string Type; - the field data-type
  • public string SqlColumnName; - the optional SQL column name where the field is mapped
  • public string CrmFieldName; - the optional CRM field name where the field is mapped
  • public string CrmLookupEntityName; - optional entity name for a reference entity lookup
  • public string CrmLookupTextField; - the text value field name in the entity reference
  • public List<string> LookupValues; - optional lookup values defined in metadata
  • public bool Display; - true to display in the editor, false to hide
  • public bool ReadOnly; - true if read-only in the editor
  • public bool Required; - true if a value is required on an insert/update
  • public string DefaultValue; - optional default value string
  • public bool PrimaryIdentify – true if this field is the primary identify column