- URL:
- https://<root>/<serviceName>/FeatureServer/<layerId>/<featureId>/attachments
- Methods:
GET
- Child Resources:
- Attachment
- Required Capability:
- Query
- Version Introduced:
- 10.0
Description
The attachment
resource returns information about attachments associated with a feature. This resource is available only if the layer has advertised that it has attachments. A layer has attachments if its has
property is true
.
Each attachment info includes information about the attachment such as its ID, content type, size, and name.
The attachment
resource has the following one child resource:
- Attachment—Streams the content of an individual attachment.
Request parameters
Parameter | Details |
---|---|
|
The geodatabase version to query. This parameter applies only if the Syntax: Example: |
| This option was added at 10.5 and works with ArcGIS Server services only. The historic moment to query. This parameter applies only if the Syntax
Example
|
| If Values: |
| The response format. The default response format is Values: |
Example usage
https://services.myserver.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0/818654/attachments
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"
}
]
}