Attachment (Feature Service)

URL:
https://<root>/<serviceName>/FeatureServer/<layerId>/<featureId>/attachments/<attachmentId>
Methods:
GET
Required Capability:
Query
Version Introduced:
10.0

Description

An individual attachment resource represents an individual attachment associated with a feature. This resource is available only if the layer has advertised that it has attachments. A layer has attachments if its hasAttachments property is true .

The contents of the attachment are streamed to the client. Attachments are returned within an attachmentInfos resource. If the attachment is not found, an error is returned.

The response returned for this resource is a download of the attachment.

New at 11.1

The following update has been made for non-hosted feature services (referencing enterprise geodatabases) published from ArcGIS Pro:

  • The w parameter is now supported for qualifying non-hosted feature services. The w parameter returns attachments resized to a pixel width based on the value set for w . A non-hosted feature service's support for the w parameter is indicated when the service-level supportsAttachmentsResizing property is set to true .

New at 10.9.1

Hosted feature service attachment resources support the w parameter, which returns attachments resized to a pixel width matching the w parameter's value. The supportsAttachmentsResizing layer property is set to true when the w parameter is supported.

Request parameters

ParameterDetails

w

An integer value that describes the width to resize an attachment image to when returned with the attachment resource. The resizing maintains the aspect ratio and is only applied to attachment images. Images cannot be made larger that the stored image by setting a larger w value. Sizes may also be snapped to the nearest preset size. By default, a value for w is not set, and the full resolution of the image is returned. This parameter is only supported when the supportsAttachmentsResizing layer property is set to true .

Example

Use dark colors for code blocksCopy
1
w=100

Example usage

The following is a sample request URL for an individual attachment resource:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/SanFrancisco/311Incidents/FeatureServer/0/818654/attachments/1?w=100

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