FRAMES | NO FRAMES Description | Parameters | Examples | Response
Attachment Infos - Map Service
URL http://<dynamic-feature-url>/attachments
Parent Resource Feature
Child Resources Attachment
Required Capability Query

Description

The attachment infos resource returns information about attachments associated with a feature. This resource is available only if the dynamic layer has advertised that it has attachments. A dynamic layer has attachments if its hasAttachments property is true.

Each attachment info includes information about the attachment such as its id, content type, size and name.

The attachment infos resource has 1 child resource:

Resource Hierarchy

Attachment Infos

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
layer Description: Dynamic layer / table source definition.

Note:
  • Use "gdbVersion" on dynamic map layer definition to specify an alternate geodatabase version.
Syntax:
  {
    "id": <layerOrTableId>,
    "source": <layer source>
  }
Example:
{
  "id": 101,
  "source":
  {
    "type": "mapLayer",
    "mapLayerId": 0,
    "gdbVersion": "SDE.DynamicLayers"
  }
}

Example Usage

Example 1: Attachment info for a feature (featureId 1) in a dynamic layer (existing map service layer with id 3):

http://myServer/arcgis/rest/services/Census/MapServer/dynamicLayer/1/attachments?layer={"id":101,"source":{"type":"mapLayer","mapLayerId":3}}&where=1=1&f=pjson

JSON Response Syntax

{
 "attachmentInfos": [
  {
   "id": <attachmentId1>,
   "contentType": "<contentType1>",
   "size": <size1>,
   "name": "<name1>"
  },
  {
   "id": <attachmentId2>,
   "contentType": "<contentType2>",
   "size": <size2>,
   "name": "<name2>"
  }
 ]
}

JSON Response Example

{
 "attachmentInfos": [
  {
   "id": 3,
   "contentType": "video/quicktime",
   "size": 397540,
   "name": "360 degree view"
  },
  {
   "id": 2,
   "contentType": "application/pdf",
   "size": 270133,
   "name": "Sales Deed"
  },
  {
   "id": 1,
   "contentType": "image/jpg",
   "size": 45325,
   "name": "Picture of the house"
  }
 ]
}