getLayer
import { getLayer } from '@esri/arcgis-rest-feature-layer';
//
getLayer({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"
})
  .then(response) // { name: "311", id: 0, ... }
Layer (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 addFeatures response.
| Property | Type | Notes | 
|---|---|---|
| Optional | 
              
                {
  | 
            |
| Optional | boolean | 
               Boolean value indicating whether the geometry of the features in the layer can be edited.  | 
          
| Optional | boolean | |
| Optional | 
              
                {
  | 
            |
| Optional | string | 
               A comma separated list of supported capabilities, e.g. Query,Editing.  | 
          
| Optional | string | 
               String value for the copyright text information for the layer.  | 
          
| Optional | number | 
               Numeric value indicating the server version of the layer.  | 
          
| Optional | 
              
                {
  | 
            |
| Optional | boolean | 
               Boolean value indicating whether the layer's visibility is turned on.  | 
          
| Optional | IDefinitionEditor | 
               Stores interactive filters.  | 
          
| Optional | string | 
               SQL-based definition expression string that narrows the data to be displayed in the layer.  | 
          
| Optional | string | 
               String value of the layer as defined in the map service.  | 
          
| Optional | string | 
               A string value that summarizes the feature.  | 
          
| Optional | any | 
               Contains drawing, labeling, and transparency information.  | 
          
| Optional | 
              
                {
  | 
            |
| Optional | IEditingInfo | 
               An object defining the editing info (last edit date).  | 
          
| Optional | IExtent | null | 
               An object defining the rectangular area.  | 
          
| Optional | any | 
               Feature reductions declutter the screen by hiding features that would otherwise intersect with other features on screen.  | 
          
| Optional | IField[] | IField | 
               An array of field objects containing information about the attribute fields for the feature collection or layer.  | 
          
| Optional | GeometryType | 
               A string defining the type of geometry. Possible geometry types are: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon, and esriGeometryEnvelope.  | 
          
| Optional | string | 
               The unique identifier for a feature or table row within a geodatabase.  | 
          
| Optional | boolean | 
               Indicates whether attachments should be loaded for the layer.  | 
          
| Optional | boolean | 
               Boolean value indicating whether data changes. True if it does not.  | 
          
| Optional | "esriServerHTMLPopupTypeNone" | "esriServerHTMLPopupTypeAsURL" | "esriServerHTMLPopupTypeAsHTMLText" | 
               String value indicating the HTML popup type.  | 
          
| Optional | number | 
               The identifier assigned to the layer.  | 
          
| Optional | any[] | any | |
| Optional | boolean | 
               Boolean value indicating whether the data is versioned.  | 
          
| Optional | number | 
               Numeric value indicating tbe maximum number of records that will be returned at once for a query.  | 
          
| Optional | number | 
               Represents the maximum scale at which the layer definition will be applied. This does not apply to layers of type: ArcGISMapServiceLayer, ImageServiceVectorLayer or ImageServiceLayer.  | 
          
| Optional | number | 
               Represents the minimum scale at which the layer definition will be applied. This does not apply to layers of type: ArcGISMapServiceLayer, ImageServiceVectorLayer or ImageServiceLayer.  | 
          
| Optional | string | 
               Contains a unique name for the layer that can be displayed in a legend.  | 
          
| Optional | string | 
               Indicates the name of the object ID field in the dataset.  | 
          
| Optional | boolean | |
| Optional | boolean | 
               Dictates whether a client can support having an end user modify symbols on individual features.  | 
          
| Optional | boolean | |
| Optional | number | |
| Optional | any | 
               Indicates range information  | 
          
| Optional | any[] | any | |
| Optional | any | 
               An object indicating the layerDefinition's layer source.  | 
          
| Optional | ISpatialReference | 
               An object containing the WKID or WKT identifying the spatial reference of the layer's geometry.  | 
          
| Optional | string | |
| Optional | string | 
               String value indicating the output formats that are supported in a query.  | 
          
| Optional | boolean | 
               Boolean value indicating whether the layer supports orderByFields in a query operation.  | 
          
| Optional | boolean | |
| Optional | boolean | 
               Boolean value indicating whether the layer supports uploading attachments with the Uploads operation. This can then be used in the Add Attachment and Update Attachment operations.  | 
          
| Optional | boolean | 
               Boolean value indicating whether the layer supports the Calculate REST operation when updating features.  | 
          
| Optional | boolean | 
               Boolean value indicating whether the layer supports rolling back edits made on a feature layer if some of the edits fail.  | 
          
| Optional | boolean | 
               Boolean value indicating whether feature layer query operations support statistical functions.  | 
          
| Optional | boolean | |
| Optional | boolean | 
               Boolean value indicating whether the validateSQL operation is supported across a feature service layer.  | 
          
| Optional | boolean | |
| Optional | ITemplate[] | ITemplate | 
               A property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types.  | 
          
| Optional | any | 
               The time info metadata of the layer. May be set for feature layers inside a feature collection item.  | 
          
| Optional | "Feature Layer" | "Table" | 
               Indicates whether the layerDefinition applies to a Feature Layer or a Table.  | 
          
| Optional | string | 
               Contains the name of the field holding the type ID for the features.  | 
          
| Optional | any | 
               Contains information about an attribute field.  | 
          
| Optional | boolean | |
| Optional | string | 
               String value indicating the attribute field that is used to control the visibility of a feature. If applicable, when rendering a feature the client should use this field to control visibility. The field's values are 0 = do not display, 1 = display.  | 
          
| Optional Inherited | boolean | |
| Optional Inherited | boolean | 
Function defined in packages/arcgis-rest-feature-layer/src/getLayer.ts:22