getService

Function
import { getService } from '@esri/arcgis-rest-feature-layer';
//
getService({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer"
})
  .then(response) // { name: "311", id: 0, ... }

Feature Service request. See the REST Documentation for more information.

Parameters

Parameter Type Default Notes
options Required IGetLayerOptions

Options for the request.

Returns

A Promise that will resolve with the getService response.

Property Type Notes
advancedEditingCapabilities [key: string]: boolean
allowGeometryUpdates boolean

Boolean value indicating whether the geometry of the features in the layer can be edited.

capabilities string

A comma separated list of supported capabilities, e.g. Query,Editing.

copyrightText string

String value for the copyright text information for the layer.

description string

String value of the layer as defined in the map service.

editorTrackingInfo {
allowOthersToDelete:
boolean
allowOthersToUpdate:
boolean
enableEditorTracking:
boolean
enableOwnershipAccessControl:
boolean
}
extractChangesCapabilities {
supportsLayerQueries:
boolean
supportsReturnAttachments:
boolean
supportsReturnExtentOnly:
boolean
supportsReturnFeature:
boolean
supportsReturnIdsOnly:
boolean
supportsSpatialFilter:
boolean
}
fullExtent IExtent
hasVersionedData boolean
initialExtent IExtent
isLocationTrackingService boolean
isLocationTrackingView boolean
layers ILayerDefinition[] | ILayerDefinition
maxRecordCount number

Numeric value indicating tbe maximum number of records that will be returned at once for a query.

relationships [{
attributed:
boolean
backwardPathLabel:
string
cardinality:
"esriRelCardinalityOneToOne" | "esriRelCardinalityOneToMany" | "esriRelCardinalityManyToMany"
composite:
boolean
destinationForeignKey:
string
destinationLayerId:
number
destinationPrimaryKey:
string
forwardPathLabel:
string
id:
number
name:
string
originForeignKey:
string
originLayerId:
number
originPrimaryKey:
string
relationshipTableId:
number
rules:
[{
destinationMaximumCardinality:
number
destinationMinimumCardinality:
number
destinationSubtypeCode:
number
originMaximumCardinality:
number
originMinimumCardinality:
number
originSubtypeCode:
number
ruleID:
number
}]
}]
serviceDescription string
spatialReference ISpatialReference

An object containing the WKID or WKT identifying the spatial reference of the layer's geometry.

supportedQueryFormats string

String value indicating the output formats that are supported in a query.

supportsDisconnectedEditing boolean
supportsRelationshipsResource boolean
supportsReturnDeleteResults boolean
syncCapabilities {
supportedSyncDataOptions:
number
supportsASync:
boolean
supportsPerLayerSync:
boolean
supportsPerReplicaSync:
boolean
supportsRegisteringExistingData:
boolean
supportsRollbackOnFailure:
boolean
supportsSyncDirectionControl:
boolean
}
syncEnabled boolean
tables ITable[] | ITable
units string
validationSystemLayers {
validationLineErrorlayerId:
number
validationObjectErrortableId:
number
validationPointErrorlayerId:
number
validationPolygonErrorlayerId:
number
}
currentVersion Optional number
documentInfo Optional [key: string]: string
enableZDefaults Optional boolean
hasStaticData Optional boolean

Boolean value indicating whether data changes. True if it does not.

returnServiceEditsHaveSR Optional boolean
zDefault Optional number

Function defined in packages/arcgis-rest-feature-layer/src/getService.ts:22