Query Assets (Feature Service/Layer)

URL:
https://<root>/<serviceName>/FeatureServer/<layerId>/queryAssets
Methods:
GET
Version Introduced:
11.1

Description

The queryAssets operation is used to retrieve either multiple assets or asset references. If the assets are small (that is, extruded footprints), it may be more efficient for the client to request multiple assets to be embedded in the response instead of requesting the asset resources individually.

Request parameters

ParameterDetails

assetHashes

An array of SHA256 hashes associated with the assets that the client is requesting information about.

Syntax

1
assetHashes=["<assetHash1>","<assetHash2>"]

Example

1
assetHashes=["045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18"]

transportType

Specifies how the assets will be retrieved. When transportType is set to esriTransportTypeUrl , the response will return asset references. When transportType is set to esriTransportTypeEmbedded , the response will return multiple assets. The default value is esriTransportTypeUrl .

Values: esriTransportTypeUrl | esriTransportTypeEmbedded

f

The response format. The default response format is html .

Values: html | json | pjson

Example usage

The following is a sample request URL for the queryAssets operation:

1
https://machine.domain.com/webadaptor/rest/services/City_Park_Assets/FeatureServer/0/queryAssets?assetHashes=["045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18"]&transportType=esriTransportTypeUrl&f=pjson

JSON Response syntax

1
{"assets": [<asset1>, <asset2>]}

JSON Response examples

Example 1: esriTransportTypeEmbedded

The following response example is returned when transportType is set to esriTransportTypeEmbedded :

1
2
3
4
5
6
7
8
9
{
  "assets":[
    {
      "assetHash": "045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18",
      "contentType": "model/gltf-binary",
      "assetData": "Z2xURgIAAACoiRAAsFcAAEpTT057ImFjY2Vzc29ycyI6W3siYnVmZmVyVmlldyI6MSwiY29tcG9uZ..."
    }
  ]
}

Example 2: esriTransportTypeUrl

The following response example is returned when transportType is set to esriTransportTypeUrl :

1
2
3
4
5
6
7
8
9
{
  "assets":[
    {
      "assetHash": "045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18",
      "contentType": "model/gltf-binary",
      "assetURL": "https://machine.domain.com/webadaptor/rest/services/ESRI3DO/FeatureServer/0/assets/045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18.glb"
    }
  ]
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close