Common methods and utilities for ArcGIS REST JS packages.
Node.js
To use ArcGIS REST JS in a backend or Node.js application, first install the package using your preferred package manager, such as NPM or Yarn.
npm install @esri/arcgis-rest-requestOnce installed, you can import or require modules depending on your Node setup.
ES modules
import { ApiKeyManager } from "@esri/arcgis-rest-request"CommonJS
const ApiKeyManager = require("@esri/arcgis-rest-request");CDN
You can load ArcGIS REST JS directly in the browser using CDN with a global object or with an import map.
Global object
<script src="https://unpkg.com/@esri/arcgis-rest-request@4.9.0/dist/bundled/request.umd.min.js"
integrity="sha512-uVR2uX8UP2E3gX0fCaIUATszpyJ0JkFiqpBbkj19Qltejejs8AXdAwssxD0CvhOVhvRJ1NQ2amOwPe5zka4RPg==">
</script>
<script>
import { ApiKeyManager } from "@esri/arcgis-rest-request";
</script>Import map
<script type="importmap">
{
"imports": {
"@esri/arcgis-rest-request": "https://esm.run/@esri/arcgis-rest-request@4.9.0"
}
}
</script>
<script type="module">
import { ApiKeyManager } from "@esri/arcgis-rest-request";
</script>Exports
- ApiKeyManager
- ApplicationCredentialsManager
- ArcGISAccessDeniedError
- ArcGISAuthError
- ArcGISIdentityManager
- ArcGISJobError
- ArcGISRequestError
- ArcGISTokenRequestError
- Job
- appendCustomParams
- canUseOnlineToken
- checkForErrors
- cleanUrl
- decodeParam
- decodeQueryString
- encodeFormData
- encodeParam
- encodeQueryString
- exchangeToken
- fetchToken
- getDefaultRequestOptions
- getFetch
- getOnlineEnvironment
- getRegisteredNoCorsDomains
- isFederated
- isNoCorsDomain
- isNoCorsRequestRequired
- isOnline
- normalizeOnlinePortalUrl
- processParams
- registerNoCorsDomains
- request
- requiresFormData
- revokeToken
- sendNoCorsRequest
- setDefaultRequestOptions
- validateAppAccess
- warn
- withOptions
- ArcGISTokenRequestErrorCodes
- ErrorTypes
- JOB_STATUSES
- IApiKeyOptions
- IAppAccess
- IApplicationCredentialsManagerOptions
- IArc
- IArcGISIdentityManagerOptions
- IAuthenticatedRequestOptions
- IAuthenticationManager
- IBezierCurve
- ICircularArc
- ICredential
- IExtent
- IFeature
- IFeatureSet
- IFetchTokenParams
- IFetchTokenResponse
- IField
- IFromTokenOptions
- IGenerateTokenParams
- IGeometry
- IGroup
- IGroupAdd
- IHasZM
- IJobInfo
- IJobOptions
- ILocation
- IMultipoint
- IOAuth2Options
- IOAuthState
- IOldCircularArc
- IParamBuilder
- IParams
- IParamsBuilder
- IPoint
- IPolygon
- IPolygonWithCurves
- IPolyline
- IPolylineWithCurves
- IRequestOptions
- IRevokeTokenOptions
- IRevokeTokenResponse
- IServerInfo
- ISignInOptions
- ISpatialReference
- ISubmitJobOptions
- ISymbol
- ITokenRequestOptions
- IUser
- IUserRequestOptions
- Blob
- File
- FormData
- NODEJS_DEFAULT_REFERER_HEADER
- AuthenticationProvider
- DomainType
- ElipticArc
- FieldType
- GeometryType
- GrantTypes
- GroupMembership
- HTTPMethods
- ICodedValue
- IDomain
- IRetryAuthError
- InternalRequestOptions
- JsonCurve
- Position
- Position2D
- ResponseFormats
- SymbolType
- Units