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

Use dark colors for code blocksCopy
1
assetHashes=["<assetHash1>","<assetHash2>"]

Example

Use dark colors for code blocksCopy
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:

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

JSON Response syntax

Use dark colors for code blocksCopy
1
{"assets": [<asset1>, <asset2>]}

JSON Response examples

Example 1: esriTransportTypeEmbedded

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

Use dark colors for code blocksCopy
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 :

Use dark colors for code blocksCopy
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.