REST Server

Diamond Maps can publish your maps as an ArcGIS feature service using the ArcGIS REST API, the standard Esri uses for sharing GIS data between applications. Any software that can connect to an ArcGIS feature service, such as ArcGIS Pro, ArcGIS Online or QGIS, can view your Diamond Maps layers live and, with the right permissions, edit them.

Changes made in Diamond Maps show up in your GIS application, and edits made to those same layers in your GIS application show up in Diamond Maps. You don't need to export or import anything.

The applications for this Rest server go beyond just connecting to other GIS applications.  Any customer or 3rd party wanting to read or write data directly to Diamond Maps should use this interface.  For example, use it to gather data for custom reports, use it to automate a work flow of entering data into a map, or 3rd party applications such as permitting or billing software can use it to synchronize data between systems.


How to Enable the REST Server

The REST server is off by default and and must be turned on for each map.

  1. Open a map.
  2. Click Menu, then click REST Server Setup.
  3. Check Enable Rest Server.
  4. Under Layers, check each layer you want to share. Use All On or All Off to change them all at once.
  5. Copy one of the two endpoint URLs (see Connecting Your GIS Application below) and paste it into your GIS application.

[Screenshot: REST Server Setup popup]


Layers with more than one geometry type

If a layer can hold more than one kind of shape (points, lines and polygons), the setup screen shows a separate checkbox for each type. Your GIS application sees each one as its own layer, because most GIS applications can hold only one geometry type per layer.

After a geometry type has been turned on, it shows a REST ID. This is the layer number your GIS application uses. It never changes, even if you turn that geometry type off and back on later.


Connecting Your GIS Application

There are three ways to connect. Which one to use depends on what your application supports and whether you need to edit.

Connection method Can view Can edit
Username and password Yes Yes, depending on the edit permissions for this user
Map token Yes No, view only
Public map Yes No, view only

Use the Rest Server Endpoint URL, which has no token. Your GIS application will ask for your Diamond Maps username and password, and Diamond Maps signs you in with the same permissions you have in the web app.

  • Editing permissions in Rest follow the same rules as normal editing permissions in Diamond Maps.  If your username is allowed to edit a certain layer directly in Diamond Maps then you will also be able to edit via Rest.
  • The sign-in expires after a set time (up to 14 days, depending on your application). After that, your application asks you to sign in again.
  • If your 3rd party application asks you to enter the token url or token endpoint use https://diamondmaps.com/rest/generateToken

This is the method to use with ArcGIS Online and ArcGIS Pro, and it's the only method that allows editing. See the ArcGIS Online example video below.


Map Token

Some applications can't sign in with a username and password. For those, use the Rest Server Endpoint With Token URL, which ends in a long token. See the QGIS example video below.

  • A map token always gives view-only access.
  • Keep the token secret. Anyone who has it can view the map's shared layers without signing in.
  • This token never expires until you either disable the Rest Server or regenerate a new token.
  • Click Regenerate Token to make a new token and cancel the old one. Anyone using the old URL loses access right away.

Public Map

If neither method above works for you, you can make the map public and then use the Rest Server Endpoint URL. In this scenario, neither a login or token is required.  Access is view-only, and fields that are hidden from public viewers come through blank.

We recommend creating a separate map that contains only the layers you want to share, and making that map public. See Making a Map Public.


Not Supported

  • Offline sync, ArcGIS Field Maps and other offline or replica workflows
  • Adding, removing or changing a layer's fields through REST (change fields in Diamond Maps instead)
  • Related tables and relationship queries
  • Map image and tile services (MapServer)
  • Z (elevation) and M (measure) values
  • Time-aware queries

Example Videos


Testing Sandbox

For developers and GIS staff who want to try the REST server directly. This video is a quick start guide on how to open our public demo map, list its layers, query a layer through the ArcGIS REST API, and find the endpoint for a specific customer's map.  Below are some of the testing resources referred to in the video.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us