esriUrl: Validate or parse the parts of a ESRI REST Server URL

esriUrl_isValidR Documentation

Validate or parse the parts of a ESRI REST Server URL

Description

A collection of functions that pull select parts out of a ESRI Service URL. All urls should be a form similar to:

  • https://<host>/<instance>/rest/services/<folderPath>/serviceName>/<serviceType>/<featureID>

  • http://<host>/<instance>/rest/services/serviceName>/<serviceType>

  • <host>/<instance>/rest/services/<folderPath>/serviceName>/<serviceType>

  • https://<host>/<instance>/rest/services/serviceName>/<serviceType>/<featureID>

  • https://<host>/<instance>/rest/services/<folderPath>

  • https://<host>/<instance>/rest/services

And having these rules:

  • The scheme: https:// or http:// part is optional

  • The host part is the domain of the url.

  • The instance is the first subpage after the domain in the url.

  • The /rest/services is the second and third subpage in the url. These are standard for all ESRI REST Services.

  • The folderPath part is optional and indicates the file structure in the REST Service. It consists of all subpages between /rest/services/ and the serviceName part (if available).

  • The serviceName part is the last subpage betore the <serviceType> in the url.

  • The serviceType specifies the type of service. Currently this package works to manage the following serviceTypes: 'MapServer', 'FeatureServer', 'GPServer', 'GeocodeServer', 'GeometryServer', 'ImageServer'.

  • The featureID is optional and specifies the layer or table in the map service.

Usage

esriUrl_isValid(url, token = "", displayReason = FALSE)

esriUrl_isValidRoot(url, token = "", displayReason = FALSE)

esriUrl_isValidFolder(url, token = "", displayReason = FALSE)

esriUrl_isValidService(url, token = "", displayReason = FALSE)

esriUrl_isValidID(url, token = "", displayReason = FALSE)

esriUrl_isValidFeature(url, token = "", displayReason = FALSE)

esriUrl_ServerUrl(url, token = "")

esriUrl_serviceUrl(url, token = "")

esriUrl_parseUrl(url, token = "")

Arguments

url

The url for a Map/Feature server or for a layer/table in a Map/Feature Server.

token

String for authentication token (if needed).

displayReason

Should the reason for why a url is not valid be displayed.

Value

Character string of the request part of the url.

Functions

  • esriUrl_isValid: Check if url is valid for an ESRI REST Service. General to include potential layer id too.

  • esriUrl_isValidRoot: Check if url is valid for the root of an ESRI REST Server.

  • esriUrl_isValidFolder: Check if url is valid for a folder of an ESRI REST Server.

  • esriUrl_isValidService: Check if url is valid for a Service of an ESRI REST Server. No feature ID.

  • esriUrl_isValidID: DEPRECATED Use esriUrl_isValidFeature

  • esriUrl_isValidFeature: Check if url is valid for a feature of an ESRI REST Service.

  • esriUrl_ServerUrl: DEPRECATED Use esriUrl_serviceUrl

  • esriUrl_serviceUrl: Retrieve Map/Feature Server URL

  • esriUrl_parseUrl: Parse Url into parts.


yonghah/esri2sf documentation built on June 2, 2022, 8:18 a.m.