Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Walk the folders of an ArcGIS Server Rest API and return all the services as an array
ArcGIS Server is GIS software used by many federal, state, and municipal governments and organizations to publish web-enabled GIS data. ArcGIS Server uses the GeoServices API. This module walks the services and folders of the root GeoServices API for a given URL and returns all services and service types in an array. This could be used to create a repository of dataset names from one or more ArcGIS Server REST URLs.
Links to each dataset URL can be made by concatenating the root GeoServices URL with the dataset item and dataset type. For example, if the root URL is http://sampleserver6.arcgisonline.com/arcgis/rest/services
and one of the datasets in the array is { name: '911CallsHotspot', type: 'MapServer' }
the full URL to the service is http://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/MapServer
.
With Node v8.2.0+ it is not necessary to install ags-walk. You can run:
npx ags-walk <server-url> [options]
See example and available options by entering
npx ags-walk -h
To use as a dependency in a Node.js library you can install ags-walk by running:
npm i ags-walk
then include
var agsWalk = require('ags-walk')
in your script file.
For the browser include the tag:
<script src="https://unpkg.com/ags-walk/ags-walk.min.js"></script>
and agsWalk()
is added as a global function.
Walk the folders of an ArcGIS Server Rest API and return all the services as an array
Parameters
url
string the base url of an ArcGIS Server Rest APIopts
Object? options for the module
opts.limit
number the maximum number of folders to
index at the same time (optional, default 5
)cb
Function the callback function to run after
results have been returnedExamples
// returns [{ name: 'Elevation/earthquakedemoelevation, type: 'MapServer'}...]
agsWalk('http://sampleserver6.arcgisonline.com/arcgis/rest/services', function(err, services) {
if (err) throw err
return services
}
Copyright 2017 Nick Peihl
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
Walks an ArcGIS Server Rest API and returns all services
The npm package ags-walk receives a total of 16 weekly downloads. As such, ags-walk popularity was classified as not popular.
We found that ags-walk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.