Skip To Content
ArcGIS Developer
Dashboard

Query Assets (Feature Service/Layer)

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

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

Example

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:

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

JSON Response syntax

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

JSON Response examples

Example 1: esriTransportTypeEmbedded

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


{
  "assets":[
    {
      "assetHash": "045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18",
      "contentType": "model/gltf-binary",
      "assetData": "Z2xURgIAAACoiRAAsFcAAEpTT057ImFjY2Vzc29ycyI6W3siYnVmZmVyVmlldyI6MSwiY29tcG9uZ..."
    }
  ]
}

Example 2: esriTransportTypeUrl

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


{
  "assets":[
    {
      "assetHash": "045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18",
      "contentType": "model/gltf-binary",
      "assetURL": "https://machine.domain.com/webadaptor/rest/services/ESRI3DO/FeatureServer/0/assets/045ef29d382f1c8227bde3a25d37f7a62fe0d2259a3a14dd6486ee53c8faba18.glb" 
    }
  ]
}