Select to view content in your preferred language

How to map layers in Map Service or Feature Service to table names in database ArcGIS

565
0
04-30-2023 07:30 PM
Labels (2)
HaseebAnwar
New Contributor II

Hi, how to know the table name (in Database) for each layer/table in the Map/Feature Service?

 

We can use the ArcGIS Server's REST API to get the layers for a specific service

https://<host>/<instance>/arcgis/rest/services/<folderName>/<serviceName>/<serviceType>?f=json

This just gives the layer's info and no database and table info.

 

And ArcGIS Admin API (Service Manifest API) can be used to get the table names in a service

https://<host>/<instance>/arcgis/admin/services/<folderName>/<serviceName>.<serviceType>/iteminfo/ma...

  "datasets": [
     {
        "onServerName": "table_name_foo"
     },
     {
        "onServerName": "table_name_bar"
     },
     {
        "onServerName": "table_name_baz"
     }
  ]

This only gives the table names used for the service but doesn't tell which table name is linked to which layer/table in the service.

 

How can we create a relationship between the layer in a service and the table used for it in the database? If there is no API designed for it, please mention any workaround that can be used.

Thanks

0 Replies