How to work with data services

1. Create a service

To create a data service, you use a data management tool to publish a new service. The most common workflow is to import data from external data sources to create new feature layers in a feature service. Once a feature layer (and feature service) is created, you can publish additional types of services such as vector tile services and map tile services. For each service published, a hosted layer (item) is also created so you can access and manage the service and the layers within it. The diagram below illustrates the workflow.

Data hosting
Use data management tools to import data and create data services.

2. Manage a service

To manage a data service, you use a data management tool to access a service's hosted layer (item). The tool you use depends on the type of ArcGIS product and account you have, and the type of management operation you would like to perform. You can update hosted layer (item) properties such as the item name and description, data service capabilities, and sharing and security settings. You can also perform other administration operations such as setting the data cache timeouts, uploading and replacing data, and exporting data. The diagram below illustrates the workflow.

Data hosting
Use data management tools to manage and administer data services with hosted layer (items).

3. Access a service

After you create and manage a data service, you access the underlying data with an HTTP request to the service. The structure of the request is defined by the ArcGIS REST API. The URL assigned to each service is unique and can be found in the hosted layer (item) or item page for the service. To access the service, you can use ArcGIS Maps SDKs, open source libraries, or scripting APIs. An access token is also required if the sharing level is not public.

The URLs below illustrate how to make requests to get data from different data services.

Feature service

Use dark colors for code blocksCopy
1
https://{host}/{organizationId}/arcgis/rest/services/{serviceName}/FeatureServer/{id}/query?{parameters}&token={access_token}

Vector tile service

Use dark colors for code blocksCopy
1
https://{host}/{organizationId}/arcgis/rest/services/{serviceName}/VectorTileServer/tile/{z}/{y}/{x}.pbf?token={access_token}

Map tile service

Use dark colors for code blocksCopy
1
https://{host}/{organizationId}/arcgis/rest/services/{serviceName}/MapServer/tile/{z}/{y}/{x}?token={access_token}
Data hosting
Use APIs to access data services with a URL request and access token.

Tutorials

Tools

Import data to create a feature layer

Use data management tools to import files and create a feature layer in a feature service.


Define a new feature layer

Use data management tools to define and create a new empty feature layer in a feature service.


Manage a feature layer

Use a hosted feature layer item to set the properties and settings of a feature layer in a feature service.


Create a vector tile service

Use data management tools to create a new vector tile service from a feature service.


Create a map tile service

Use ArcGIS Online or scripting APIs to publish a map tile service.


APIs

Add a vector tile layer

Access and display a vector tile layer in a map.


Add a map tile layer

Access and display a map tile layer in a map.


Query a feature layer (spatial)

Execute a spatial query to get features from a feature layer.


Edit feature data

Add, update, and delete features in a feature service.


Display a popup

Format a popup to show attributes in a feature layer.


Workflows

Services

API support

Use data management tools or Client APIs to create, manage, and access data services. The table below outlines the level of support for each API.

CreateManageAccess
ArcGIS Maps SDK for JavaScript1
ArcGIS Maps SDK for Kotlin1
ArcGIS Maps SDK for Swift1
ArcGIS Maps SDK for Java1
ArcGIS Maps SDK for .NET1
ArcGIS Maps SDK for Qt1
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2
MapLibre GL JS23
OpenLayers23
Full supportPartial supportNo support
  • 1. Use portal class and direct REST API requests
  • 2. Access via ArcGIS REST JS
  • 3. Requires manually setting styles for renderers

Tools

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.